[
http://jira.codehaus.org/browse/MECLIPSE-261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard Burton updated MECLIPSE-261:
------------------------------------
Attachment: EclipsePlugin-2.4.zip
After the correction in the patch I submitted, I noticed the test cases ran
successfully, but the results are very misleading. I haven't located why, but
the test case doesn't match up to the real world execution of the plug-in.
The patch I submitted was:
path = M2_REPO
+ IdeUtils.toRelativeAndFixSeparatorVar(
localRepositoryFile, new File( fullPath ), false);
kind = ATTR_VAR; //$NON-NLS-1$
and this lead to a broken path that would look like
M2_REPOcom/path/to/file/1.0.1/file-1.0.1.jar
When using:
path = M2_REPO
+ "/"
+ IdeUtils.toRelativeAndFixSeparatorVar(
localRepositoryFile, new File( fullPath ), false);
kind = ATTR_VAR; //$NON-NLS-1$
The path was valid, but the test cases some how have an output of: (Note: The
double slash after M2_REPO)
M2_REPO//com/path/to/file/1.0.1/file-1.0.1.jar
I attached a zip which contains the JAR that I'm using and the code changes
embedded in the zip. I'm not 100% certain that I didn't break existing code
since the TestCase themselves seem broken.
Best Regards,
Richard L. Burton III
> IdeUtils.toRelativeAndFixSeparator returns incomplete path
> ----------------------------------------------------------
>
> Key: MECLIPSE-261
> URL: http://jira.codehaus.org/browse/MECLIPSE-261
> Project: Maven 2.x Eclipse Plugin
> Issue Type: Bug
> Affects Versions: 2.3
> Environment: Windows XP, jdk 1.5.0_11-b03, maven 2.0.5
> Reporter: Marcio Paulo Guedes
> Attachments: .classpath, baseDirIsRoot.patch,
> EclipseClasspathWriter.java, EclipsePlugin-2.4.zip, IdeUtils.java, patch.txt,
> pom.xml
>
>
> .classpath file is generated with incomplete path for classpathentry when
> kind is "var".
> Example:
> <classpathentry kind="var" path="M2_REPO/gnl/ognl/2.6.9/ognl-2.6.9.jar"/>
> when <classpathentry kind="var"
> path="M2_REPO/ognl/ognl/2.6.9/ognl-2.6.9.jar"/> is expected.
> It's caused by IdeUtils.toRelativeAndFixSeparator when basepath is not equal
> absolutepath. Code on line 99 shifts the string 1 character to the right,
> corrupting the result path.
--
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