我如何更改由Maven程序集插件生成的战争名称 [英] How can I change the war name generated by maven assembly plugin

查看:63
本文介绍了我如何更改由Maven程序集插件生成的战争名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将名称从1.0.snapshot-jar-with-dependencies更改为其他名称,以下是我的POM的内容:

How can I change the name from 1.0.snapshot-jar-with-dependencies to something else, below are contents of my POM:

<build>
    <plugins>
        <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>2.2-beta-5</version>
            <configuration>
                <archive>
                    <manifest>
                        <mainClass>com.package.example.MainClass</mainClass>
                    </manifest>
                </archive>
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
            </configuration>
        </plugin>
    </plugins>
</build>

推荐答案

maven-assembly-plugin的配置中使用以下内容:

Use the following in the configuration of the maven-assembly-plugin:

<configuration>
  <finalName>custom-name</finalName>
  <appendAssemblyId>false</appendAssemblyId>
</configuration>

assembly:single的官方文档中的完整详细信息 mojo.

Full details in the official documentation of the assembly:single mojo.

这篇关于我如何更改由Maven程序集插件生成的战争名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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