What is the syntax to run a maven plugin from the command line.

让人想犯罪 __ 提交于 2019-12-06 08:23:25

There are 3 patterns:

groupId:artifactId:version:goal
groupId:artifactId:goal
prefix:goal

If you run this from a location with a pom.xml and you haven't specified the version, Maven will search for a matching plugin in the build-section. The prefix can often (not always) be recognized as part of the artifactId, e.g. maven-help-plugin has the prefix help. The plugin documentation should give you the exact prefix.

You would call this plugin goal as follows:

mvn resources:copy-resources

where copy-resources is the plugin goal that you configured in the POM, and resources is prefix of the maven-resources-plugin (see this link for plugin prefix resolution).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!