- Apply MPEAR-14

- 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
- Updated documentation


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114709 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
dion committed 2004-02-20 04:49:07 +00:00
1 parent 067127eb43
commit 8201a36b18
7 files changed
+83 -43

No files matched your search

+32 -1
View File
@@ -1,4 +1,4 @@
<project xmlns:j="jelly:core" xmlns:u="jelly:util">
<project xmlns:j="jelly:core" xmlns:u="jelly:util" xmlns:x="jelly:xml">
<goal name="testPlugin" prereqs="test-ear">
<attainGoal name="clean"/>
@@ -7,12 +7,43 @@
<goal name="test-ear">
<attainGoal name="ear"/>
<!-- tests that the ear is generated -->
<j:set var="expectedFile"
value="${maven.build.dir}/test-maven-ear-plugin-1.0-SNAPSHOT.ear"/>
<u:file var="file" name="${expectedFile}" />
<j:if test="${!(file.exists())}">
<fail>${expectedFile} not generated</fail>
</j:if>
<!-- unzip the ear and look for the jars -->
<j:set var="earFile"
value="${maven.build.dir}/test-maven-ear-plugin-1.0-SNAPSHOT.ear"/>
<j:set var="unzipDir" value= "${maven.build.dir}/eartest"/>
<mkdir dir="${unzipDir}"/>
<unzip src="${earFile}" dest="${unzipDir}"/>
<!-- check for commons-logging -->
<j:set var="expectedFile" value="${unzipDir}/commons-logging-1.0.3.jar"/>
<u:file var="file" name="${expectedFile}" />
<j:if test="${!(file.exists())}">
<fail>${expectedFile} not bundled</fail>
</j:if>
<!-- check for commons-collections -->
<j:set var="expectedFile" value="${unzipDir}/commons-collections-2.1.jar"/>
<u:file var="file" name="${expectedFile}" />
<j:if test="${!(file.exists())}">
<fail>${expectedFile} not bundled</fail>
</j:if>
<!-- check application.xml got a java module in it -->
<u:file var="appXml" name="${unzipDir}/META-INF/application.xml"/>
<x:parse var="applicationDoc" xml="${appXml.toURL()}"/>
<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>
</goal>
</project>
+1 -8
View File
@@ -1,10 +1,3 @@
maven.deployable.component=${maven.final.name}.ear
maven.j2ee.ear.appxml=${maven.conf.dir}/application.xml
maven.weblogic.home=C:\\bea\\wlserver6.1
maven.weblogic.host=localhost
maven.weblogic.port=7001
maven.weblogic.server=myserver
maven.weblogic.username=system
maven.weblogic.password=weblogic
maven.weblogic.component=${maven.final.name}
maven.weblogic.debug=true
maven.ear.appxml.generate=true
+18 -12
View File
@@ -40,7 +40,24 @@
<version>1.0.3</version>
<url>http://jakarta.apache.org/commons/logging.html</url>
<properties>
<ear.bundle.jar>true</ear.bundle.jar>
<ear.bundle>true</ear.bundle>
</properties>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>2.1</version>
<url>http://jakarta.apache.org/commons/collections/</url>
<properties>
<ear.module>true</ear.module>
</properties>
</dependency>
<dependency>
<groupId>commons-jelly</groupId>
<artifactId>commons-jelly-tags-xml</artifactId>
<version>20030211.142705</version>
<properties>
<classloader>root.maven</classloader>
</properties>
</dependency>
</dependencies>
@@ -49,16 +66,5 @@
<sourceDirectory>src</sourceDirectory>
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
<!-- Resources that are packaged up inside the JAR file -->
<resources>
<!--includes>
<include>*.xsd</include>
<include>log4j.properties</include>
</includes-->
</resources>
<!-- Integration unit test cases -->
<integrationUnitTest/>
<jars></jars>
</build>
</project>
@@ -1,15 +0,0 @@
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">
<application>
<display-name>workflow ejb app</display-name>
<module>
<ejb>workflow.jar</ejb>
</module>
<module>
<ejb>business.jar</ejb>
</module>
<module>
<ejb>begin_workflow.jar</ejb>
</module>
</application>