use artifact for deployment
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115536 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
2c2b0e5aac
commit
4a33c313ac
5 files changed
+92
-71
No files matched your search
+40
-64
@@ -23,10 +23,29 @@
|
||||
xmlns:ant="jelly:ant"
|
||||
xmlns:license="license"
|
||||
xmlns:maven="jelly:maven"
|
||||
xmlns:artifact="artifact"
|
||||
xmlns:deploy="deploy"
|
||||
xmlns:util="jelly:util"
|
||||
xmlns:doc="doc">
|
||||
|
||||
<!-- Poor mans version check - plugin dependencies still suck for multiple versions -->
|
||||
<maven:get plugin="maven-artifact-plugin" property="plugin" var="artifactPlugin" />
|
||||
<j:if test="${artifactPlugin.currentVersion.compareTo('1.3') lt 0}">
|
||||
<ant:fail>
|
||||
Must have artifact plugin v1.3 installed to use this version of the jar plugin.
|
||||
Try: maven plugin:download -DgroupId=maven -DartifactId=maven-artifact-plugin -Dversion=1.3
|
||||
</ant:fail>
|
||||
</j:if>
|
||||
<!-- Can remove deploy dependency above when this is gone -->
|
||||
<maven:get plugin="maven-deploy-plugin" property="plugin" var="deployPlugin" />
|
||||
<j:if test="${deployPlugin != null}">
|
||||
<ant:fail>
|
||||
Must remove the deploy plugin to use this version of the jar plugin.
|
||||
Please delete ${deployPlugin.artifactId}-${deployPlugin.currentVersion}.jar from
|
||||
${maven.plugin.dir} and ${maven.plugin.unpacked.dir} (if it exists)
|
||||
</ant:fail>
|
||||
</j:if>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- J A R -->
|
||||
<!-- ================================================================== -->
|
||||
@@ -176,6 +195,7 @@
|
||||
<goal
|
||||
name="jar:snapshot"
|
||||
description="Create a snapshot jar, ie 'id-YYYYMMDD.hhmmss.jar'">
|
||||
<ant:echo>DEPRECATED: jar:snapshot is deprecated</ant:echo>
|
||||
|
||||
<maven:snapshot project="${pom}"/>
|
||||
|
||||
@@ -193,29 +213,14 @@
|
||||
|
||||
<goal
|
||||
name="jar:deploy-snapshot"
|
||||
prereqs="jar:jar"
|
||||
description="Deploy a snapshot jar to the remote repository">
|
||||
|
||||
<maven:user-check user="${maven.username}"/>
|
||||
<attainGoal name="jar:snapshot"/>
|
||||
<ant:property name="maven.jar.to.deploy" value="${maven.final.name}.jar"/>
|
||||
<ant:property name="dir"
|
||||
value="${maven.repo.central.directory}/${pom.artifactDirectory}/jars"/>
|
||||
|
||||
<util:replace var="jarToDeploy" oldChar="\" newChar="/">${maven.build.dir}/${maven.jar.to.deploy}</util:replace>
|
||||
<util:replace var="forwardSlashBaseDir" oldChar="\" newChar="/" value="${basedir}"/>
|
||||
<j:if test="${!forwardSlashBaseDir.endsWith('/')}">
|
||||
<j:set var="base" value="${forwardSlashBaseDir}/" />
|
||||
</j:if>
|
||||
<j:set var="relativePath">${jarToDeploy.substring(base.length())}</j:set>
|
||||
|
||||
<deploy:artifact
|
||||
artifact="${relativePath}"
|
||||
type="jars"
|
||||
assureDirectoryCommand="mkdir -p"
|
||||
siteCommand="cd @deployDirectory@; chmod g+w ${maven.jar.to.deploy}; chgrp ${maven.remote.group} ${maven.jar.to.deploy}; rm -f ${pom.artifactId}-SNAPSHOT.jar; ln -s ${maven.jar.to.deploy} ${pom.artifactId}-SNAPSHOT.jar; echo ${snapshotVersion} > ${pom.artifactId}-snapshot-version"
|
||||
<artifact:deploy-snapshot
|
||||
artifact="${maven.build.dir}/${maven.final.name}.jar"
|
||||
type="jar"
|
||||
project="${pom}"
|
||||
/>
|
||||
<j:set var="maven.final.name" value="${oldMavenFinalName}" />
|
||||
|
||||
</goal>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
@@ -224,27 +229,14 @@
|
||||
|
||||
<goal
|
||||
name="jar:deploy"
|
||||
prereqs="jar:jar"
|
||||
description="Deploy a jar to the remote repository">
|
||||
|
||||
<maven:user-check user="${maven.username}"/>
|
||||
<attainGoal name="jar:jar"/>
|
||||
<ant:property name="maven.jar.to.deploy" value="${maven.final.name}.jar"/>
|
||||
|
||||
<j:set var="sl" value="/"/>
|
||||
<util:replace var="jarToDeploy" oldChar="\" newChar="/">${maven.build.dir}/${maven.jar.to.deploy}</util:replace>
|
||||
<util:replace var="forwardSlashBaseDir" oldChar="\" newChar="/" value="${basedir}"/>
|
||||
<j:if test="${!forwardSlashBaseDir.endsWith('/')}">
|
||||
<j:set var="base" value="${forwardSlashBaseDir}/" />
|
||||
</j:if>
|
||||
<j:set var="relativePath">${jarToDeploy.substring(base.length())}</j:set>
|
||||
|
||||
<deploy:artifact
|
||||
artifact="${relativePath}"
|
||||
type="jars"
|
||||
assureDirectoryCommand="mkdir -p"
|
||||
siteCommand="cd @deployDirectory@; chmod g+w ${maven.jar.to.deploy}; chgrp ${maven.remote.group} ${maven.jar.to.deploy}"
|
||||
<artifact:deploy
|
||||
artifact="${maven.build.dir}/${maven.final.name}.jar"
|
||||
type="jar"
|
||||
project="${pom}"
|
||||
/>
|
||||
|
||||
</goal>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
@@ -254,41 +246,25 @@
|
||||
<goal name="jar:install" prereqs="jar:jar"
|
||||
description="Install the jar in the local repository">
|
||||
|
||||
<ant:echo>
|
||||
id = '${pom.artifactId}'
|
||||
groupId = '${pom.groupId}'
|
||||
artifactDirectory = '${pom.artifactDirectory}'
|
||||
</ant:echo>
|
||||
|
||||
<ant:property name="jardir__" value="${maven.repo.local}/${pom.artifactDirectory}/jars"/>
|
||||
<ant:mkdir dir="${jardir__}"/>
|
||||
<ant:copy
|
||||
file="${maven.build.dir}/${maven.final.name}.jar"
|
||||
todir="${jardir__}"
|
||||
overwrite="true"
|
||||
<artifact:install
|
||||
artifact="${maven.build.dir}/${maven.final.name}.jar"
|
||||
type="jar"
|
||||
project="${pom}"
|
||||
/>
|
||||
</goal>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- I N S T A L L S N A P S H O T -->
|
||||
<!-- I N S T A L L S N A P S H O T -->
|
||||
<!-- ================================================================== -->
|
||||
|
||||
<goal
|
||||
name="jar:install-snapshot" prereqs="jar:snapshot"
|
||||
name="jar:install-snapshot" prereqs="jar:jar"
|
||||
description="Install a snapshot jar in the local repository">
|
||||
|
||||
<ant:property name="jardir__" value="${maven.repo.local}/${pom.artifactDirectory}/jars"/>
|
||||
<ant:mkdir dir="${jardir__}"/>
|
||||
<ant:copy
|
||||
file="${maven.build.dir}/${maven.final.name}.jar"
|
||||
tofile="${jardir__}/${pom.artifactId}-SNAPSHOT.jar"
|
||||
overwrite="true"
|
||||
<artifact:install-snapshot
|
||||
artifact="${maven.build.dir}/${maven.final.name}.jar"
|
||||
type="jar"
|
||||
project="${pom}"
|
||||
/>
|
||||
<ant:copy
|
||||
file="${maven.build.dir}/${maven.final.name}.jar"
|
||||
tofile="${jardir__}/${maven.final.name}.jar"
|
||||
/>
|
||||
|
||||
<j:set var="maven.final.name" value="${oldMavenFinalName}" />
|
||||
</goal>
|
||||
</project>
|
||||
@@ -26,6 +26,7 @@
|
||||
</properties>
|
||||
<body>
|
||||
<release version="1.6" date="In CVS">
|
||||
<action dev="brett" type="update">Use the artifact plugin for installation</action>
|
||||
<action dev="evenisse" type="fix" due-to="Martin van den Bemt" issue="MPJAR-29">Replace Apache Jakarta Maven by Apache Maven in Manifest</action>
|
||||
</release>
|
||||
<release version="1.5" date="2004-05-13">
|
||||
|
||||
+47
-6
@@ -25,9 +25,28 @@
|
||||
xmlns:maven="jelly:maven"
|
||||
xmlns:u="jelly:util"
|
||||
xmlns:define="jelly:define"
|
||||
xmlns:artifact="artifact"
|
||||
xmlns:deploy="deploy"
|
||||
xmlns:x="jelly:xml">
|
||||
|
||||
<!-- Poor mans version check - plugin dependencies still suck for multiple versions -->
|
||||
<maven:get plugin="maven-artifact-plugin" property="plugin" var="artifactPlugin" />
|
||||
<j:if test="${artifactPlugin.currentVersion.compareTo('1.3') lt 0}">
|
||||
<ant:fail>
|
||||
Must have artifact plugin v1.3 installed to use this version of the plugin plugin.
|
||||
Try: maven plugin:download -DgroupId=maven -DartifactId=maven-artifact-plugin -Dversion=1.3
|
||||
</ant:fail>
|
||||
</j:if>
|
||||
<!-- Can remove deploy dependency above when this is gone -->
|
||||
<maven:get plugin="maven-deploy-plugin" property="plugin" var="deployPlugin" />
|
||||
<j:if test="${deployPlugin != null}">
|
||||
<ant:fail>
|
||||
Must remove the deploy plugin to use this version of the plugin plugin.
|
||||
Please delete ${deployPlugin.artifactId}-${deployPlugin.currentVersion}.jar from
|
||||
${maven.plugin.dir} and ${maven.plugin.unpacked.dir} (if it exists)
|
||||
</ant:fail>
|
||||
</j:if>
|
||||
|
||||
<goal name="plugin"
|
||||
description="Build a plugin jar and install to the maven.repo.local">
|
||||
|
||||
@@ -261,13 +280,35 @@
|
||||
</u:available>
|
||||
</goal>
|
||||
|
||||
<goal name="plugin:repository-install" prereqs="plugin">
|
||||
<artifact:install
|
||||
artifact="${maven.build.dir}/${maven.final.name}.jar"
|
||||
type="plugin"
|
||||
project="${pom}"
|
||||
/>
|
||||
</goal>
|
||||
|
||||
<goal name="plugin:repository-install-snapshot" prereqs="plugin">
|
||||
<artifact:install-snapshot
|
||||
artifact="${maven.build.dir}/${maven.final.name}.jar"
|
||||
type="plugin"
|
||||
project="${pom}"
|
||||
/>
|
||||
</goal>
|
||||
|
||||
<goal name="plugin:repository-deploy" prereqs="plugin">
|
||||
<maven:makeRelativePath separator="/" basedir="${basedir}" path="${maven.build.dir}/${maven.final.name}.jar" var="artifactFilename" />
|
||||
<deploy:artifact
|
||||
artifact="${artifactFilename}"
|
||||
type="plugins"
|
||||
assureDirectoryCommand="mkdir -p"
|
||||
siteCommand="cd @deployDirectory@; chmod g+w ${maven.final.name}.jar; chgrp ${maven.remote.group} ${maven.final.name}.jar"
|
||||
<artifact:deploy
|
||||
artifact="${maven.build.dir}/${maven.final.name}.jar"
|
||||
type="plugin"
|
||||
project="${pom}"
|
||||
/>
|
||||
</goal>
|
||||
|
||||
<goal name="plugin:repository-deploy-snapshot" prereqs="plugin">
|
||||
<artifact:deploy-snapshot
|
||||
artifact="${maven.build.dir}/${maven.final.name}.jar"
|
||||
type="plugin"
|
||||
project="${pom}"
|
||||
/>
|
||||
</goal>
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@
|
||||
<pomVersion>3</pomVersion>
|
||||
<id>maven-plugin-plugin</id>
|
||||
<name>Maven Plugin Plugin</name>
|
||||
<currentVersion>1.4</currentVersion>
|
||||
<currentVersion>1.5-SNAPSHOT</currentVersion>
|
||||
<description>Maven Plugin management plugin. Requires Maven 1.0 RC3.</description>
|
||||
<shortDescription>Maven Plugin plugin</shortDescription>
|
||||
<url>http://maven.apache.org/reference/plugins/plugin/</url>
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
<author email="evenisse@ifrance.com">Emmanuel Venisse</author>
|
||||
</properties>
|
||||
<body>
|
||||
<release version="1.5-SNAPSHOT" date="in CVS">
|
||||
<action dev="brett" type="update">Use the artifact plugin instead of the deploy plugin</action>
|
||||
</release>
|
||||
<release version="1.4" date="2004-05-13">
|
||||
<action dev="brett" type="add" issue="MAVEN-1219">Add plugin:uninstall-now that removes the plugin from the currently running instance of Maven.</action>
|
||||
<action dev="brett" type="add" issue="MAVEN-1219">Add a plugin:install-now goal that installs the plugin into the currently running instance of maven so that it can be used by subsequent goals.</action>
|
||||
|
||||
Reference in new issue
Block a user