我将 Maven 3.0.3 与 Maven EAR 插件 (v2.7) 一起使用。我无法在我的 EAR 发行版中获取正确的 application.xml 文件。尽管正确生成了 target/application.xml ...
<!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<application>
<display-name>Orders</display-name>
<description>Runs periodic jobs to process DIDO orders.</description>
<module>
<java>lib/myclient-1.0-SNAPSHOT.jar</java>
</module>
</application>
实际插入我的 EAR 文件(在 META-INF 目录中)的 application.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 id="Application_ID">
<display-name>orders-ear</display-name>
</application>
是什么赋予了?下面是我的 EAR 项目的 pom.xml 文件
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.mainco.myco</groupId>
<artifactId>orders</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>orders-ear</artifactId>
<name>Orders :: Enterprise Application</name>
<packaging>ear</packaging>
<description>Orders EAR</description>
<dependencies>
<dependency>
<groupId>org.mainco.myco</groupId>
<artifactId>myclient</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.7</version>
<configuration>
<displayName>Orders</displayName>
<description>Runs periodic jobs to process DIDO orders.</description>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<modules>
<jarModule>
<groupId>org.mainco.myco</groupId>
<artifactId>myclient</artifactId>
<includeInApplicationXml>true</includeInApplicationXml>
</jarModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
</project>
如何让我的 EAR 包含正确的 application.xml 文件?谢谢, - 戴夫