dion 2003/02/27 07:29:50
Modified: src/plugins-build/repository plugin.jelly
Log:
Buggy but working deploy snapshot jar target.
Warning: the jar to deploy must be in the same directory as you run the goal
Revision Changes Path
1.5 +31 -0 jakarta-turbine-maven/src/plugins-build/repository/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/repository/plugin.jelly,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- plugin.jelly 25 Feb 2003 06:59:50 -0000 1.4
+++ plugin.jelly 27 Feb 2003 15:29:50 -0000 1.5
@@ -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>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]