You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by di...@apache.org on 2004/03/15 11:54:10 UTC
cvs commit: maven-plugins/ear/src/plugin-test/src/resources resource.txt
dion 2004/03/15 02:54:10
Modified: ear/xdocs changes.xml
ear project.xml plugin.properties plugin.jelly
ear/src/plugin-test maven.xml project.xml
Added: ear/src/plugin-test/src/resources resource.txt
Log:
- Check to make sure maven.ear.src exists before using it.
- Allow resources in the pom for EAR projects
- remove debug echos
- add a test for resources in the pom
Revision Changes Path
1.16 +6 -0 maven-plugins/ear/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/maven-plugins/ear/xdocs/changes.xml,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- changes.xml 7 Mar 2004 00:25:18 -0000 1.15
+++ changes.xml 15 Mar 2004 10:54:10 -0000 1.16
@@ -24,6 +24,12 @@
<author email="nathan.coast@blueyonder.co.uk">Nathan Coast</author>
</properties>
<body>
+ <release version="1.5" date="in CVS">
+ <action dev="dion" type="fix">
+ Check to make sure maven.ear.src exists before using it.
+ </action>
+ <action dev="dion" type="update">Allow resources in EAR projects</action>
+ </release>
<release version="1.4" date="2004-03-07">
<action dev="dion" type="fix" issue="MPEAR-14">Introduced ear.module property to mark jars as being java client modules</action>
<action dev="dion" type="update">Added to the plugin tests a check to make sure the ear includes the jars marked by ear.bundle and ear.module and that ear.module generates a java module in the generated application.xml</action>
1.24 +2 -2 maven-plugins/ear/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/maven-plugins/ear/project.xml,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- project.xml 7 Mar 2004 00:25:18 -0000 1.23
+++ project.xml 15 Mar 2004 10:54:10 -0000 1.24
@@ -23,7 +23,7 @@
<pomVersion>3</pomVersion>
<id>maven-ear-plugin</id>
<name>Maven EAR Plugin</name>
- <currentVersion>1.4</currentVersion>
+ <currentVersion>1.5-SNAPSHOT</currentVersion>
<description>Ear Plugin for Maven</description>
<shortDescription>Ear Plugin for Maven</shortDescription>
<url>http://maven.apache.org/reference/plugins/ear/</url>
@@ -46,7 +46,7 @@
<version>
<id>1.2</id>
<name>1.2</name>
- <tag>HEAD</tag>
+ <tag>MAVEN_EAR_1_2</tag>
</version>
</versions>
<developers>
1.6 +1 -0 maven-plugins/ear/plugin.properties
Index: plugin.properties
===================================================================
RCS file: /home/cvs/maven-plugins/ear/plugin.properties,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- plugin.properties 4 Mar 2004 18:04:27 -0000 1.5
+++ plugin.properties 15 Mar 2004 10:54:10 -0000 1.6
@@ -30,3 +30,4 @@
maven.ear.appxml.generate=false
maven.ear.displayname=${pom.id}
maven.ear.appxml.version=1.3
+maven.ear.resources=${maven.build.dir}/ear
\ No newline at end of file
1.18 +15 -4 maven-plugins/ear/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/maven-plugins/ear/plugin.jelly,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- plugin.jelly 4 Mar 2004 18:04:27 -0000 1.17
+++ plugin.jelly 15 Mar 2004 10:54:10 -0000 1.18
@@ -21,10 +21,11 @@
<project
xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
+ xmlns:artifact="artifact"
xmlns:license="license"
+ xmlns:maven="jelly:maven"
xmlns:util="jelly:util"
xmlns:x="jelly:xml"
- xmlns:artifact="artifact"
>
<!--==================================================================-->
@@ -63,9 +64,12 @@
<ant:ear destfile="${maven.build.dir}/${maven.final.name}.ear"
appxml="${maven.ear.appxml}">
- <fileset dir="${maven.ear.src}" casesensitive="false"
- excludes="**/META-INF/application.xml"/>
-
+ <!-- include files from maven.ear.src if available -->
+ <util:available file="${maven.ear.src}">
+ <fileset dir="${maven.ear.src}" casesensitive="false"
+ excludes="**/META-INF/application.xml"/>
+ </util:available>
+
<!-- include marked dependencies -->
<j:forEach var="lib" items="${pom.artifacts}">
<j:set var="dep" value="${lib.dependency}"/>
@@ -111,6 +115,13 @@
value="${pom.organization.name}" />
</ant:section>
</ant:manifest>
+
+ <j:if test="${!pom.build.resources.isEmpty()}">
+ <mkdir dir="${maven.ear.resources}"/>
+ <maven:copy-resources resources="${pom.build.resources}" todir="${maven.ear.resources}"/>
+ <fileset dir="${maven.ear.resources}" />
+ </j:if>
+
</ant:ear>
</goal>
1.6 +8 -3 maven-plugins/ear/src/plugin-test/maven.xml
Index: maven.xml
===================================================================
RCS file: /home/cvs/maven-plugins/ear/src/plugin-test/maven.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- maven.xml 4 Mar 2004 18:04:27 -0000 1.5
+++ maven.xml 15 Mar 2004 10:54:10 -0000 1.6
@@ -56,15 +56,20 @@
<j:new var="saxReader" className="org.dom4j.io.SAXReader" />
<j2ee:resolver var="resolver" />
${saxReader.setEntityResolver(resolver)}
-<echo>${resolver}</echo>
-<echo>${saxReader.entityResolver}</echo>
<x:parse var="applicationDoc" xml="${appXml.toURL()}" SAXReader="${saxReader}" />
<x:set var="firstJavaModule" select="string($applicationDoc/application/module/java)"/>
- <echo>output is ${a}</echo>
+
<j:if test="${firstJavaModule != 'commons-collections-2.1.jar'}">
<fail>
commons-collections-2.1.jar not bundled as a java module found '${firstJavaModule}' instead
</fail>
+ </j:if>
+
+ <!-- check for resources -->
+ <j:set var="expectedFile" value="${unzipDir}/resource.txt"/>
+ <u:file var="file" name="${expectedFile}" />
+ <j:if test="${!(file.exists())}">
+ <fail>${expectedFile} not bundled as a resource</fail>
</j:if>
</goal>
1.9 +7 -0 maven-plugins/ear/src/plugin-test/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/maven-plugins/ear/src/plugin-test/project.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- project.xml 4 Mar 2004 18:04:27 -0000 1.8
+++ project.xml 15 Mar 2004 10:54:10 -0000 1.9
@@ -88,5 +88,12 @@
<sourceDirectory>src</sourceDirectory>
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
<!-- Resources that are packaged up inside the JAR file -->
+ <resources>
+ <resource>
+ <directory>src/resources</directory>
+ <targetPath></targetPath>
+ <includes><include>*.txt</include></includes>
+ </resource>
+ </resources>
</build>
</project>
1.1 maven-plugins/ear/src/plugin-test/src/resources/resource.txt
Index: resource.txt
===================================================================
This is a dummy file
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org