开发者

How can I run a Class with main() when doing mvn clean install

开发者 https://www.devze.com 2023-03-21 02:48 出处:网络
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.

0

精彩评论

暂无评论...
验证码 换一张
取 消