I have a pom with multiple assembly executions. When I run, e.g. mvn package
, it runs all the executions. How can I tell it to only run the foo
execution?
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>foo/id>
<phase>package</phase>
<goals><goal>single</goal></goals>
<configuration>...</configuration>
</execution>
<execution>
<id>bar</id>
<phase>package</phase>
<goals><goal>single</goal></goals>
<configuration>...</configuration>
</execution>
What I have above is, in my mind, similar to the following Makefile
:
all: foo bar
foo:
... build foo ...
bar:
... build bar ...
I can run a make all
or simply make
to build everything, or I can run make foo
or make bar
to build individual targets. How can I achieve this with Maven?