Buggy but working deploy snapshot jar target.
Warning: the jar to deploy must be in the same directory as you run the goal git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113006 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -229,4 +229,35 @@
|
||||
<repository:exec command="${command}" />
|
||||
</goal>
|
||||
|
||||
<!-- this is pretty much a copy of whats in jar:deploy-snapshot -->
|
||||
<goal name="repository:deploy-snapshot-jar"
|
||||
description="deploy a snapshot jar, specified by file, to the repository">
|
||||
|
||||
<j:if test="${empty(artifact)}">
|
||||
<fail>artifact must be specified</fail>
|
||||
</j:if>
|
||||
<j:if test="${empty(groupId)}">
|
||||
<fail>groupId must be specified</fail>
|
||||
</j:if>
|
||||
<j:if test="${empty(artifactId)}">
|
||||
<fail>artifactId must be specified</fail>
|
||||
</j:if>
|
||||
<!-- work out snapshotVersion from artifact -->
|
||||
<!-- artifact is format blah-yyyymmdd.hhmmss.jar -->
|
||||
<u:tokenize var="jarDotBits" delim="-">${artifact}</u:tokenize>
|
||||
<u:tokenize var="snapAndJar" delim=".">${jarDotBits[size(jarDotBits)-1]}</u:tokenize>
|
||||
<j:set var="snapshotVersion" value="${snapAndJar[0]}.${snapAndJar[1]}"/>
|
||||
<echo>snapshotVersion = '${snapshotVersion}'</echo>
|
||||
|
||||
<j:set var="directory" value="${maven.repo.central.directory}/${groupId}/jars/" />
|
||||
<repository:copy from="${artifact}" toFileOrDir="${directory}" />
|
||||
<j:set var="command" value="cd ${directory}"/>
|
||||
<j:set var="command" value="${command};ln -sf ${artifact} ${artifactId}-SNAPSHOT.jar"/>
|
||||
<j:set var="command" value="${command};echo ${snapshotVersion} > ${artifactId}-snapshot-version"/>
|
||||
<j:set var="command" value="${command};chmod g+w *"/>
|
||||
<j:set var="command" value="${command};chgrp maven *"/>
|
||||
<echo>Executing '${command}' remotely</echo>
|
||||
<repository:exec command="${command}" />
|
||||
</goal>
|
||||
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user