Intellij 2018.1.6部署glassfish应用程序名称包含.ear扩展名

时间:2018-07-20 19:27:29

标签: maven intellij-idea glassfish ear payara

创建了一个运行/调试配置,以部署到payara glassfish服务器。

它正在将使用maven构建的.ear文件MyApp.ear部署到服务器,但是当您在管理控制台中查看应用程序时,名称为MyApp.ear

我缺少什么来使用应用程序名称仅为MyApp进行部署?

如果我使用管理控制台部署MyApp.ear文件,则应用程序名称默认为MyApp,那么我需要怎么做才能使Intellij做到这一点?

更新7-23-2018:

我的耳朵pom.xml中已经有了finalName:

<build>
    <finalName>MyApp</finalName>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-ear-plugin</artifactId>
            <version>3.0.0</version>
            <configuration>
                <modules>
                    <webModule>
                        <groupId>com.example.myapp</groupId>
                        <artifactId>war-module</artifactId>
                        <contextRoot>/MyApp</contextRoot>
                    </webModule>
                    <ejbModule>
                        <groupId>com.example.myapp</groupId>
                        <artifactId>ejb-module</artifactId>
                    </ejbModule>
                </modules>
            </configuration>
        </plugin>
    </plugins>
</build>

所以我尝试将其移动到具有相同结果的配置中:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-ear-plugin</artifactId>
            <version>3.0.0</version>
            <configuration>
                <finalName>MyApp</finalName>
                <modules>
                    <webModule>
                        <groupId>com.example.myapp</groupId>
                        <artifactId>war-module</artifactId>
                        <contextRoot>/MyApp</contextRoot>
                    </webModule>
                    <ejbModule>
                        <groupId>com.example.myapp</groupId>
                        <artifactId>ejb-module</artifactId>
                    </ejbModule>
                </modules>
            </configuration>
        </plugin>
    </plugins>
</build>

这是Intellij部署时特有的,就像它不使用这些值,只是使用文件名作为应用程序名称。

0 个答案:

没有答案
相关问题