在pom.xml里添加类似的插件:
<build>
<plugins>
<plugin>
<groupId>iron</groupId>
<artifactId>plugin</artifactId>
<version>1.0-SNAPSHOT</version><executions>
<execution>
<phase>compile</phase>
<goals>
<goal>hello</goal>
<goal>world</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
使用插件的方法:
将maven插件与生命周期阶段绑定。如<execution><phase>compile</phase><goals> <goal>hello</goal><goal>world</goal></goals></execution>,即将该插件的目标与生命周期阶段compile绑定,运行命令行mvn compile即可
直接使用命令行mvn 插件名的简写:目标
借鉴:http://www.cnblogs.com/crazy-fox/archive/2012/02/09/2343722.html
转载于:https://blog.51cto.com/xuguangtie/1618083