我想配置maven-war-plugin的“爆炸”目标:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>exploded</goal>
</goals>
<configuration>
<webappDirectory>war</webappDirectory>
</configuration>
</execution>
</executions>
</plugin>
我需要手动运行“爆炸”目标,并且不希望将执行附加到任何lifycycle阶段。但当我执行“mvn war:explosion”时,maven忽略了我的配置。请告诉我,怎么做:))
答案 0 :(得分:13)
阅读此页面以供参考:
Guide to Configuring Default Mojo Executions
本质上:
如果您使用标识default-cli
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<executions>
<execution>
<id>default-cli</id>
<goals>
<goal>exploded</goal>
</goals>
<configuration>
<webappDirectory>war</webappDirectory>
</configuration>
</execution>
</executions>
</plugin>