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:
@@ -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}">
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user