Maven:如何重命名项目的war文件? [英] Maven: How to rename the war file for the project?
本文介绍了Maven:如何重命名项目的war文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个项目 bird
,其中包含 pom.xml中的以下组件
I have a project bird
with following components in pom.xml
<groupId>com.myorg</groupId>
<artifactId>bird</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>bird</name>
<modules>
<module>persistence</module>
<module>business</module>
<module>service</module>
<module>web</module>
</modules>
和网络模块
<parent>
<artifactId>bird</artifactId>
<groupId>com.myorg</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>web</artifactId>
<packaging>war</packaging>
web模块创建名为的war文件web-1.0-SNAPSHOT.war
我怎样才能使用maven将其重命名为 bird.war
?
web module creates the war file named web-1.0-SNAPSHOT.war
How can I, using maven rename this to bird.war
?
推荐答案
您可以在产生战争的网络模块中使用以下内容:
You can use the following in the web module that produces the war:
<build>
<finalName>bird</finalName>
. . .
</build>
这会导致在使用目标war:war时创建名为bird.war的文件。
This leads to a file called bird.war to be created when goal "war:war" is used.
这篇关于Maven:如何重命名项目的war文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文