You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by at...@apache.org on 2004/07/22 15:57:12 UTC
cvs commit: jakarta-jetspeed-2/maven-plugin maven.xml
ate 2004/07/22 06:57:12
Modified: maven-plugin maven.xml
Log:
Fixed the deploy-plugin goal now requiring Maven 1.0
Revision Changes Path
1.7 +14 -31 jakarta-jetspeed-2/maven-plugin/maven.xml
Index: maven.xml
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/maven-plugin/maven.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- maven.xml 23 Jun 2004 18:39:32 -0000 1.6
+++ maven.xml 22 Jul 2004 13:57:12 -0000 1.7
@@ -16,6 +16,7 @@
<project default="java:jar"
xmlns:j="jelly:core"
xmlns:maven="jelly:maven"
+ xmlns:artifact="artifact"
xmlns:ant="jelly:ant">
<preGoal name="java:jar-resources">
@@ -32,37 +33,19 @@
<goal name="deploy-plugin">
- <!-- determine if the plugin is already installed and is of the correct version -->
- <j:set var="pluginManager" value="${pom.context.getMavenSession().getPluginManager()}"/>
- <j:set var="plugins" value="${pluginManager.pluginList}"/>
- <j:set var="currentVersion" value="${maven.final.name}"/>
- <j:set var="installed" value="false"/>
- <j:set var="update" value="false"/>
- <j:forEach var="plugin" items="${plugins}">
- <j:if test="${plugin.equals(currentVersion)}">
- <j:set var="installed" value="true"/>
- <j:break/>
- </j:if>
- <j:if test="${plugin.startsWith(pom.artifactId)}">
- <j:set var="update" value="true"/>
- <j:break/>
- </j:if>
- </j:forEach>
- <j:choose>
- <j:when test="${installed}">
- <!-- only deploy needed -->
- <attainGoal name="plugin:deploy"/>
- </j:when>
- <j:when test="${update}">
- <!-- installed but not the correct version -->
- <attainGoal name="plugin:uninstall"/>
- <attainGoal name="plugin:install"/>
- </j:when>
- <j:otherwise>
- <!-- not installed yet -->
- <attainGoal name="plugin:install"/>
- </j:otherwise>
- </j:choose>
+ <!-- install will do the uninstall if needed for us -->
+ <attainGoal name="plugin:install"/>
+ <!-- get the plugin available now (like with plugin:install-now, but which doesn't install).
+ Bug: If a new version of the plugin is deployed while an older version is available
+ maven gets very confused... Haven't found a workaround for that.
+ -->
+ <maven:uninstallPlugin artifactId="${pom.artifactId}" />
+ <maven:installPlugin file="${maven.build.dir}/${maven.final.name}.jar" cache="true" />
+ <!-- deploy the plugin to the local repository directly:
+ using the plugin:repository-install goal would lead to another build of the jar as all plugin goals do that as
+ prereq
+ -->
+ <artifact:install artifact="${maven.build.dir}/${maven.final.name}.jar" type="plugin" project="${pom}"/>
</goal>
<goal name="copyDb">
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org