我有一個可執行多個程序集的pom。當我跑步時,例如它運行所有的執行。我怎麼能告訴它只運行foo
執行?Maven:如何指定運行哪個程序集插件執行
<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>
上面我所是,在我的腦海裏,類似於以下Makefile
:
all: foo bar
foo:
... build foo ...
bar:
... build bar ...
我可以運行make all
或者乾脆make
建立的一切,或者我可以運行make foo
或make bar
到建立個人目標。我如何用Maven實現這一點?