The following comment has been added to this issue:
Author: Marc Portier
Created: Sat, 18 Oct 2003 4:37 AM
Body:
Nice to see some more attention to this, (I know my greehorn status requires for some
help to get this fixed)
I did some digging into the history and found more arguments to the line of thinking
that is building up:
string handling stuff was introduced here and then:
http://cvs.apache.org/viewcvs.cgi/maven/src/plugins-build/java/plugin.jelly#rev1.6
http://cvs.apache.org/viewcvs.cgi/maven/src/plugins-build/java/plugin.jelly#rev1.5
and it shows the c: to 'host' confusion and also
the suggests upfront to put stuff at the level of the artifact plugin
however, just moving the code around will not be enough, the current 'relativising
code' should IMHO be fixed to something a little bit more smart, checking actually the
base and the target:
- normalizing both base and absolute target to use /
- tokenize both on '/'
- step through tokens as long at they are equal at both sides
- then for remaning tokens in 'base' prepend relative target with ../
- finally add the remaing tokens of the absolut target to the relative target
haven't got a clue ATM how to write this up in jelly-speak however
HTH,
-marc=
PS: when is 1.0 foreseen? would love to help fixing it for the 1.0, willingness is
there, time is somewhat scattered though
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-373
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MAVEN-373
Summary: Incorrect arguments in jar:deploy and jar:deploy-snapshot
Type: Bug
Status: Unassigned
Priority: Major
Time Spent: Unknown
Remaining: Unknown
Project: maven
Components:
plugin-java
Fix Fors:
1.1
Versions:
1.0-beta-9
Assignee:
Reporter: Aslak Hellesoy
Created: Fri, 4 Apr 2003 6:31 AM
Updated: Mon, 4 Aug 2003 11:26 AM
Description:
The jar:deploy and jar:deploy-snapshot goals are doing some fancy and unnecessary
string manipulations to find the relative file name of the jar file to deploy.
This is unnecessary (the file name of the jars can be absolute), and furhter, it
doesn't work when ${maven.build.dir} is overridden to point outside the project.
Further, the jar:deploy-snapshot could just call the jar:deploy goal (and avoid
copy-paste of identical logic).
The mentioned goals should be simplified as follows:
<!-- ================================================================== -->
<!-- D E P L O Y S N A P S H O T -->
<!-- ================================================================== -->
<goal
name="jar:deploy-snapshot"
description="Deploy a snapshot jar to the remote repository">
<m:user-check user="${maven.username}"/>
<attainGoal name="jar:snapshot"/>
<attainGoal name="jar:deploy"/>
</goal>
<!-- ================================================================== -->
<!-- D E P L O Y J A R -->
<!-- ================================================================== -->
<goal
name="jar:deploy"
description="Deploy a jar to the remote repository">
<m:user-check user="${maven.username}"/>
<attainGoal name="java:jar"/>
<ant:property name="maven.jar.to.deploy" value="${maven.final.name}.jar"/>
<deploy:artifact
artifact="${maven.final.name}.jar"
type="jars"
assureDirectoryCommand="mkdir -p"
siteCommand="cd @deployDirectory@; chmod g+w ${maven.jar.to.deploy}; chgrp maven
${maven.jar.to.deploy}"
/>
</goal>
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]