maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neil Crow (JIRA)" <>
Subject [jira] Commented: (MECLIPSE-408) eclipse:eclipse creates a .classpath containing the M2_REPO variable followed by the expanded value of the variable
Date Mon, 19 Jan 2009 23:03:19 GMT


Neil Crow commented on MECLIPSE-408:

OK, I have fixed my configuration ...
This is a windows problem only.
The problem was in my C:\Documents and Settings\uid\.m2\settings.xml

where I had defined a value for localRepository as follows:
<localRepository>/Documents and Settings/uid/.m2/repository</localRepository>

This value happens to be similar to the default, although the default on windows uses a C:\
The C:\ prefix turned out to be rather important, as this is one of the ways that
determines whether the path is absolute or not, the other way that is accepted as absolute
is if the path startsWith a double slash \\.
A single slash [how I had entered it] is not an absolute path, and this caused IdeUtils.toRelativeAndFixSeparator()
to duplicate the basedir on the fileToAdd.
Further on in this method, the duplicated basedir is removed, and the result is returned as
a relative path, however due to the initial duplication, the path that was returned was still
absolute (even if Win32FileSystem doesn't think so due to lack of C:\ or \\).

So the quick answer of how I fixed this was to comment out my localRepository in my settings.xml
and use the default generated value.


> eclipse:eclipse creates a .classpath containing the M2_REPO variable followed by the
expanded value of the variable
> -------------------------------------------------------------------------------------------------------------------
>                 Key: MECLIPSE-408
>                 URL:
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>         Environment: MS Windows XP, + cygwin
>            Reporter: Gus Mancuso
>            Assignee: Barrie Treloar
>         Attachments: Copy of pom.xml, parentPom.xml, settings.xml
> Using maven 2.0.8, and eclipse plugin (version 2.4 or 2.5).  When I run mvn eclipse:eclipse
the .classpath that gets generated is invalid.  My M2_REPO variable is set to /var/maven and
the classpath entries for dependencies look like :
>   <classpathentry kind="var" path="M2_REPO/var/maven/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/>
> where
>   <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/>
> would be the correct entry.
> Things about my environment that may be affecting this:
>   * I run maven from a cygwin bash prompt.
>   * /var/maven is a symlink to /cygdrive/c/var/maven
>   * MAVEN_HOME is C:\opt\maven-2.0.8
> settings.xml and pom.xml for the affected project is included.  It should be noted that
some other projects on the same machine seem to work fine, but others dont.  I don't see any

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message