maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olivier Lamy (JIRA)" <j...@codehaus.org>
Subject [jira] (MNG-5258) localRepository in settings.xml does not handle ~ as home.dir
Date Tue, 13 Mar 2012 17:26:03 GMT

    [ https://jira.codehaus.org/browse/MNG-5258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=294029#comment-294029
] 

Olivier Lamy commented on MNG-5258:
-----------------------------------

try with 
{code}
<localRepository>${user.home}/.m2/repository</localRepository>
{code}
BTW why define this with the default value ???
                
> localRepository in settings.xml does not handle ~ as home.dir
> -------------------------------------------------------------
>
>                 Key: MNG-5258
>                 URL: https://jira.codehaus.org/browse/MNG-5258
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Bootstrap & Build, Settings
>    Affects Versions: 2.2.1, 3.0.4
>         Environment: Linux (Ubuntu 11.10), Java 6
>            Reporter: Thomas Zeeman
>
> My provided settings.xml contained a localRepository part with the value ~/.m2/repository
and when invoking any maven command, this caused issues.
> Steps to reproduce:
> 1 - create a settings.xml with the following content:
> <settings>
>   <!-- localRepository
>    | The path to the local repository maven will use to store artifacts.
>    |
>    | Default: ~/.m2/repository -->
>   <localRepository>~/.m2/repository</localRepository>
> </settings>
> 2 - run mvn clean in an existing project
> 3 - maven will create a ~ directory in the project where it will download all artifacts
to.
> Apart from essentially creating a private repository for each project (which can quickly
take up way more space than necessary, cause issues about missing artifacts) it may also cause
issues if you try to remove it and forget to escape the ~; ie if you do rm -rf ~ instead of
rm -rf '~'.
> I also tested with maven 2.2.1 and that will blow up with errors about not being able
to create /.m2/repository/<some path to an artifact>.
> Both 3.0.4 and 2.2.1 were downloaded from maven.apache.org, not installed via apt/dpkg.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message