Maven EAR插件,重命名应用程序 [英] Maven EAR plugin, rename the app

查看:229
本文介绍了Maven EAR插件,重命名应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个maven耳模块。

I have a maven ear module.

例如,其工件ID为​​ MyApp 。 Maven创建名为 MyApp-1.0-SNAPSHOT.ear 的耳档,Glassfish管理面板显示部署的应用程序名称 MyApp

For example, its artifact ID is MyApp. Maven creates ear archive whith name MyApp-1.0-SNAPSHOT.ear, Glassfish admin panel show deployed app with name MyApp

我想更改默认名称。我试过这个:

I want to change default name. I tried this:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-ear-plugin</artifactId>
    <version>2.8</version>
    <configuration>
        <displayName>mySuperName</displayName>
    </configuration>
</plugin>

但它只更改application.xml中的一个字符串:

But it changes only one string inside the application.xml:

< display-name> mySuperName< / display-name>

我有吗?重命名应用程序的任何其他选项?

Does I have any other options to rename the app?

推荐答案

您应该使用 finalName 元素:

You should use the finalName element:

<configuration>
    <finalName>myFinalName</finalName>
</configuration>

这篇关于Maven EAR插件,重命名应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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