What is the syntax for running the maven plugin from the command line.

I see that this is already set here: How to execute the maven plugin from the command line? but I do not quite understand the answer. It looks like the syntax is:

mvn foo:bar

But I'm not quite sure what foo and bar are.

In particular, I configured maven-resource-plugin as follows:

<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 tried several permutations mvn artifactId|id|phase|goal:artifactidId|id|phase|goal, but none of them work. I decided that I would stop trying to overcome it and just ask for the Internet. Also, is it documented anywhere?

+2
source share
2 answers

There are 3 patterns:

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

pom.xml , Maven . ( ) artifactId, . maven-help-plugin help. .

+6

:

mvn resources:copy-resources

copy-resources - , POM, resources - maven-resources-plugin (. ).

+4

Source: https://habr.com/ru/post/1660914/


All Articles