Ensure ear files are correctly versioned for validating j2ee containers.

PR: MAVEN-613
Submitted by:	Thomas Christensen


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113725 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
bwalding
2003-07-25 14:59:16 +00:00
parent fd1b2ea01b
commit bd1e2aa537
3 changed files with 22 additions and 1 deletions

View File

@@ -131,13 +131,23 @@
<!--==================================================================-->
<goal name="ear:generate-ear-descriptor" description="Generates the ear descriptor">
<ant:echo>Generating appxml file:"${maven.ear.appxml}"</ant:echo>
<ant:echo>Generating appxml file:"${maven.ear.appxml} version ${maven.ear.appxml.version}"</ant:echo>
<j:file name="${maven.ear.appxml}"
outputMode="xml"
prettyPrint="true"
encoding="UTF-8"
>
<j:switch on="${maven.ear.appxml.version}">
<j:case value="1.3">
<x:doctype name="application" publicId="-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" systemId="http://java.sun.com/dtd/application_1_3.dtd"/>
</j:case>
<j:default>
<x:doctype name="application" publicId="-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" systemId="http://java.sun.com/j2ee/dtds/application_1_2.dtd"/>
</j:default>
</j:switch>
<x:element name="application">
<x:element name="display-name">${maven.ear.displayname}</x:element>
<j:forEach var="lib" items="${pom.artifacts}">

View File

@@ -11,3 +11,4 @@ maven.ear.appxml=${maven.ear.descriptordir}/application.xml
maven.ear.manifest=${maven.ear.descriptordir}/MANIFEST.MF
maven.ear.appxml.generate=false
maven.ear.displayname=${pom.id}
maven.ear.appxml.version=1.3

View File

@@ -42,6 +42,16 @@
false
</td>
</tr>
<tr>
<td>maven.ear.appxml.version</td>
<td>Yes</td>
<td>
Inserts the doctype header depending on the specified version. Default is 1.3
</td>
<td>
false
</td>
</tr>
<tr>
<td>maven.ear.displayname</td>
<td>Yes</td>