java My mavenearplugin不尊重bundleFileName吗?
我正在尝试使用war中的maven ear插件构建一个ear(以及一些其他资源,但暂时忘记这一点)。无论如何,我正在尝试生成应用程序。使用ear插件的xml文件
我的pom如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>my-ear-mvn</artifactId>
<name>My Ear</name>
<description>My Ear</description>
<packaging>ear</packaging>
<build>
<plugins>
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>2.10.1</version>
<configuration>
<defaultLibBundleDir>APP-INF/lib</defaultLibBundleDir>
<skinnyWars>true</skinnyWars>
<modules>
<webModule>
<groupId>org.my.app</groupId>
<artifactId>my-web-war</artifactId>
<bundleFileName>my-web.war</bundleFileName>
<uri>my-web</uri>
<context-root>MYWeb</context-root>
</webModule>
...
</modules>
</configuration>
</plugin>
</plugins>
</build>
...
我得到了一份申请。如下所示的xml文件:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<application>
<display-name>my-ear-mvn</display-name>
<description>My Ear</description>
<module>
<web>
<web-uri>my-web</web-uri>
<context-root>MYWeb</context-root>
</web>
</module>
</application>
到目前为止一切都很好,webModule元素的uri子元素(来自pom)在应用程序中生成web元素的相应web uri子元素。xml。然而,当我查看我的ear时,在ear的根目录中有一个名为my web的文件,我希望在其中看到我的web。战争果不其然,如果我把它改名为war,我就可以打开它,它包含了我希望在那场战争中看到的一切
不管怎样,我能解决这个问题吗?谢谢
共 (0) 个答案