o Iterating over artifacts not deps

o Added deploy, deploy-snapshot and install-shapshot goals


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113557 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
michal
2003-07-01 08:45:14 +00:00
parent 6aa6f0da0d
commit 8dcbcc7319
2 changed files with 83 additions and 21 deletions

View File

@@ -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>

View File

@@ -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">