Search code examples
mavenmaven-mojo

AbstractMojo implementation


Actually I want to run a java class while running mvn clean install on my project. I found that the best solution is to work with abstractMojo and define the treatment inside the execute method. Can you please give me a simple example that describes this mechanism ? .. Thank you


Solution

  • I finally found thé solution of my problem. . Actually I used an other méthod : I used thé exec-maven-plugin and inside this plugin I defined m'y mainClass. . This class contains the treatment that I want to execute before running thé app.