我是Maven的新手并制作了一个hello world maven插件(在此处进行了tutorialed:http://maven.apache.org/guides/plugin/guide-java-plugin-development.html)。
我还有一个hello world maven 项目(不是插件),如下所示:http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
现在,我希望项目包含hello-world插件,因为该插件具有我想要运行的“sayhi”目标。
我该怎么做?什么是绝对最简单,最快捷的方式,以及最“适当”的方式是什么?
答案 0 :(得分:4)
mvn install
,使其安装在您当地的Maven存储库中。<plugin>
下添加<build>
元素:例如:
<build>
<plugins>
<plugin>
<groupId>your-groupid</groupId>
<artifactId>your-artifactId</artifactId>
<version>...</version>
</plugin>
</plugins>
...