Make jar:deploy use the same relative path code that the snapshot does.

This code realistically should be moved into the tag for deploy:artifact.


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@112875 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
dion
2003-02-10 06:42:24 +00:00
parent 4d910fdeec
commit bd0cec9bb2

View File

@@ -234,9 +234,15 @@
<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="${maven.build.dir}/${maven.jar.to.deploy}"
artifact="${relativePath}"
type="jars"
assureDirectoryCommand="mkdir -p"
siteCommand="cd @deployDirectory@; chmod g+w ${maven.jar.to.deploy}"