I want to execute a class\'s main method (for this I found this Exec Plugin), what I want to do is to execute this plugin automatically when building the project.
I want to execute a class's main method (for this I found this Exec Plugin), what I want to do is to execute this plugin automatically when building the project.
I
开发者_开发问答 don't need to
mvn exec:exec -Dexec.executable="java"
Any plugin can be added to <build>/<plugins>
section and bound to particular phase to execute automatically. In fact Exec Plugin page has an example.
Here is a guide to configuring plugins with more examples. Search for word phase
.
精彩评论