[jira] (MNG-5258) localRepository in settings.xml does not handle ~ as home.dir

2012-03-14 Thread Thomas Zeeman (JIRA)

 [ 
https://jira.codehaus.org/browse/MNG-5258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Zeeman reopened MNG-5258:



As mentioned in the original report, the settings.xml was provided to me. I've 
now traced the source and it was an adapted version from the one supplied in 
the conf directory of the maven binary distribution. The localRepository part 
was copied from there and the value changed from /path/to/local/repo to what 
was in the comment; apparently in the expectation that the value in the comment 
works as advertised.

As to the usefulness of having a value of ~/.m2/repository, I agree it is 
rather low and I've since removed this entry from my settings.xml. But it took 
me some time to figure out what was going wrong especially given the 
expectations one has about ~ on a *nix system and the comment in the maven 
provided example settings.xml. (Not to mention that a ~ directory does not show 
in a typical ls output, my IDE populated the 'real' ~/.m2/repository and any 
cli executed maven commands were only occasionally failing or downloading 
artifacts again.)

So if you consider this 'not a bug', then at least update the comment in the 
apache-maven/src/conf/settings.xml to say ${user.home}/.m2/repository instead 
of ~/.m2/repository which obviously does not work as expected and advertised. 
Optionally consider making v3 behave like v2 and simply ignore the ~ in the 
value for the localRepository.
That should hopefully save others who want to relocate the repo to somewhere 
else in their home dir some time in figuring out why it does not work.

 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
Assignee: Olivier Lamy

 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




[jira] (MNG-5258) localRepository in settings.xml does not handle ~ as home.dir

2012-03-12 Thread Thomas Zeeman (JIRA)
Thomas Zeeman created MNG-5258:
--

 Summary: 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: 3.0.4, 2.2.1
 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