Maven,配置具体目标 [英] Maven, configure specific goal
本文介绍了Maven,配置具体目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想配置maven-war-plugin的爆炸目标:
I want to configure "exploded" goal of the 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忽略了我的配置。请告诉我,如何做到这一点:)
I need to run "exploded" goal manually and do not want to attach execution to any lifycycle phase. But when i execute "mvn war:exploded", maven ignores my configuration. Tell me please, how to do this :)
推荐答案
阅读本页面以供参考:
本质上:
如果使用id 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>
这篇关于Maven,配置具体目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文