I see that this has already been asked over here: How to execute maven plugin from command line? but I don't really understand the answer. It looks like the syntax is of the form:
mvn foo:bar
But I'm not really sure what foo and bar are supposed to be.
Specifically I have configured the maven-resource-plugin like this:
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<!--configuration here-->
</configuration>
</execution>
</executions>
</plugin>
I've tried several permutations of mvn artifactId|id|phase|goal:artifactidId|id|phase|goal
but none of them are working. I figured i'd stop trying to brute-force it and just ask the internet. Also, is this documented anywhere?
There are 3 patterns:
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 prefixhelp
. The plugin documentation should give you the exact prefix.