No resolution of ~ (tilde) when installing a file to local repo
---------------------------------------------------------------
Key: MNG-4038
URL: http://jira.codehaus.org/browse/MNG-4038
Project: Maven 2
Issue Type: Bug
Components: Command Line
Affects Versions: 2.0.9
Environment: Linux, JDK 6u12
Reporter: Adam Michalik
Priority: Minor
On Linux the ~ sign (tilde) is an abbreviation for user's home directory.
However, when installing a file to a local repository like this:
mvn install:install-file -DgroupId=jmork -DartifactId=jmork -Dversion=1.0.4
-Dpackaging=jar -Dfile=~/Download/jmork-1.0.4/jmork-1.0.4.jar
where the home directory is /home/adam and current directory is /home/adam/tmp
the tilde is taken literally as if it was a directories name, resulting in:
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'install'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [install:install-file] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [install:install-file]
[INFO] Installing /home/adam/tmp/~/Download/jmork-1.0.4/jmork-1.0.4.jar to
/home/adam/.m2/repository/jmork/jmork/1.0.4/jmork-1.0.4.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error installing artifact 'jmork:jmork:jar': Error installing artifact:
File /home/adam/tmp/~/Download/jmork-1.0.4/jmork-1.0.4.jar does not exist
Workaround:
specify a full path or use $HOME instead of ~
I am aware that this may be more of a Java problem and not Maven specific, but
I thought it may be useful to report it anyway.
--
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira