michal 2003/07/01 01:45:14
Modified: src/plugins-build/ear plugin.jelly
src/plugins-build/ear/xdocs changes.xml
Log:
o Iterating over artifacts not deps
o Added deploy, deploy-snapshot and install-shapshot goals
Revision Changes Path
1.9 +77 -21 maven/src/plugins-build/ear/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/maven/src/plugins-build/ear/plugin.jelly,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- plugin.jelly 17 Jun 2003 17:57:47 -0000 1.8
+++ plugin.jelly 1 Jul 2003 08:45:13 -0000 1.9
@@ -6,6 +6,7 @@
xmlns:license="license"
xmlns:util="jelly:util"
xmlns:x="jelly:xml"
+ xmlns:artifact="artifact"
>
<!--==================================================================-->
@@ -48,7 +49,8 @@
excludes="**/META-INF/application.xml"/>
<!-- include marked dependencies -->
- <j:forEach var="dep" items="${pom.dependencies}">
+ <j:forEach var="lib" items="${pom.artifacts}">
+ <j:set var="dep" value="${lib.dependency}"/>
<j:if test="${dep.getProperty('ear.bundle')=='true'}">
<ant:echo>Bundling: ${dep.type}</ant:echo>
<j:choose>
@@ -57,8 +59,8 @@
<ant:include name="${dep.artifact}"/>
</ant:fileset>
</j:when>
- <j:when test="${dep.type == 'war' }">
- <ant:fileset dir="${maven.repo.local}/${dep.artifactDirectory}/wars/">
+ <j:when test="${dep.type == 'ear' }">
+ <ant:fileset dir="${maven.repo.local}/${dep.artifactDirectory}/ears/">
<ant:include name="${dep.artifact}"/>
</ant:fileset>
</j:when>
@@ -103,20 +105,7 @@
</goal>
- <!--==================================================================-->
- <!-- Install the ear in the local repository -->
- <!--==================================================================-->
- <goal name="ear:install"
- prereqs="ear:ear"
- description="Install the ear in the local repository">
-
- <ant:property name="maven.ear.install.dir"
- value="${maven.repo.local}/${pom.artifactDirectory}/ears"/>
- <ant:mkdir dir="${maven.ear.install.dir}"/>
- <ant:copy file="${maven.build.dir}/${maven.final.name}.ear"
- tofile="${maven.ear.install.dir}/${maven.final.name}.ear"/>
-
- </goal>
+
<!--==================================================================-->
<!-- Creates ear descriptor - application.xml file -->
@@ -132,14 +121,15 @@
>
<x:element name="application">
<x:element name="display-name">${maven.ear.displayname}</x:element>
- <j:forEach var="dep" items="${pom.dependencies}">
+ <j:forEach var="lib" items="${pom.artifacts}">
+ <j:set var="dep" value="${lib.dependency}"/>
<j:if test="${dep.getProperty('ear.bundle')=='true'}">
<j:choose>
- <j:when test="${dep.type=='war'}">
+ <j:when test="${dep.type=='ear'}">
<x:element name="module">
<x:element name="web">
<x:element name="web-uri">${dep.getArtifact()}</x:element>
- <x:element
name="context-root">${dep.getProperty('ear.appxml.war.context-root')}</x:element>
+ <x:element
name="context-root">${dep.getProperty('ear.appxml.ear.context-root')}</x:element>
</x:element>
</x:element>
</j:when>
@@ -158,8 +148,74 @@
</j:forEach>
</x:element>
</j:file>
-
+
</goal>
+
+
+
+ <!--==================================================================-->
+ <!-- Install the ear in the local repository -->
+ <!--==================================================================-->
+ <goal name="ear:install"
+ prereqs="ear:ear"
+ description="Install the ear in the local repository">
+
+ <artifact:install
+ artifact="${maven.build.dir}/${maven.final.name}.ear"
+ type="ear"
+ project="${pom}"/>
+
+ </goal>
+
+ <!--==================================================================-->
+ <!-- Install the snapshot version of the ear in the local repository -->
+ <!--==================================================================-->
+ <goal name="ear:install-snapshot"
+ prereqs="ear:ear"
+ description="Install the snapshot version of the ear in the local
repository">
+
+ <artifact:install-snapshot
+ artifact="${maven.build.dir}/${maven.final.name}.ear"
+ type="ear"
+ project="${pom}"/>
+
+ </goal>
+
+ <!--==================================================================-->
+ <!-- Deploys the ear to the remote repository -->
+ <!--==================================================================-->
+ <goal name="ear:deploy"
+ prereqs="ear:ear"
+ description="Deploys the ear to the remote repository">
+
+ <artifact:deploy
+ artifact="${maven.build.dir}/${maven.final.name}.ear"
+ type="ear"
+ project="${pom}"/>
+
+ </goal>
+
+ <!--==================================================================-->
+ <!-- Deploys the snapshot version of the ear to the remote repository -->
+ <!--==================================================================-->
+ <goal name="ear:deploy-snapshot"
+ prereqs="ear:ear"
+ description="Deploys the snapshot version of the ear to remote
repository">
+
+ <artifact:deploy-snapshot
+ artifact="${maven.build.dir}/${maven.final.name}.ear"
+ type="ear"
+ project="${pom}"/>
+
+ </goal>
+
+ <!--==================================================================-->
+ <!-- Special no-op goal which can be used by other plugin which need -->
+ <!-- to get access to any of this plugin's property. This is -->
+ <!-- temporary, until we get explicit plugin dependencies. -->
+ <!--==================================================================-->
+ <goal name="ear:load"/>
+
</project>
1.4 +6 -0 maven/src/plugins-build/ear/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/maven/src/plugins-build/ear/xdocs/changes.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- changes.xml 17 Jun 2003 17:57:47 -0000 1.3
+++ changes.xml 1 Jul 2003 08:45:14 -0000 1.4
@@ -10,6 +10,12 @@
Removed warning about application.xml being added twice to the
EAR.
</action>
+ <action dev="michal" type="fix">
+ Iterating artifacts not depedencies
+ </action>
+ <action dev="michal" type="add">
+ Added deploy, deploy-snapshot and install-snapshot goals
+ </action>
</release>
<release version="1.1" date="2003-05-08">
<action dev="michal" type="add">
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]