如何从war文件中删除版本号 [英] How to remove version number from war file

查看:105
本文介绍了如何从war文件中删除版本号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对子pom有这种依赖性.

I have a Dependency in child pom like this.

<dependencies>
        <dependency>
            <groupId>sample-groupID</groupId>
            <artifactId>sfint</artifactId>
            <version>1.0.0-SNAPSHOT</version>  
            <type>war</type>                
        </dependency>
</dependencies>

我正在使用maven-ear-plugin.

And I am using maven-ear-plugin.

 <plugins>
  <plugin>
   <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven.ear.plugin</artifactId>
    <version>2.10</version>
    <configuration>
            <modules>
                <webModule>
                    <groupId>sample-gropuID</groupId>
                    <artifactId>sfint</artifactId>
                    <version>1.0.0-SNAPSHOT</version>
                    <moduleID>WebModule_sfint</moduleID>
                    <bundleFileName>sfint.war</bundleFileName>  
                </webModule>
            </modules>  
    </configuration>
  </plugin>

现在我的问题是我希望我的war文件像这样- sfint.war ,但我得到的是- sfint.1.0.0-SNAPSHOT.war >

Now my problem is that I want my war file to be like this - sfint.war but I am getting it as - sfint.1.0.0-SNAPSHOT.war

有帮助吗?

推荐答案

<build>标记内,将工件所需的名称指定为"finalName".

Within the <build> tag specify the name that you need for the artifact as "finalName".

<build>
    <finalName>sfint</finalName>
</build>

这篇关于如何从war文件中删除版本号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆