Issue Details (XML | Word | Printable)

Key: MPECLIPSE-92
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: fabrizio giustina
Reporter: Yang Li
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven 1.x Eclipse Plugin

Setting relative path value to "maven.eclipse.output.dir" generates wrong absolute classpath entry

Created: 26/May/05 12:56 PM   Updated: 09/Oct/05 12:07 PM   Resolved: 09/Oct/05 12:07 PM
Return to search
Component/s: None
Affects Version/s: 1.9
Fix Version/s: 1.10

Time Tracking:
Not Specified


 Description  « Hide

In a J2EE project environment, the master project is "sample-project", the web project is "sample-project-web"

If set the property
maven.eclipse.output.dir=web-content/WEB-INF/classes
in the sample-project-web project

The result .classpath created by the Eclipse plugin has the following entry:

<classpathentry kind="output" path="C:/maven_projects/sample-project/web-content/WEB-INF/classes">
</classpathentry>

This is wrong. The path value should be a relative path.

Solution:

change the following line in the classpath.jelly

from:

<j:set var="outputDir" value="${maven.eclipse.output.dir}"/>
<j:if test="${empty outputDir}">
<j:set var="outputDir" value="${maven.build.dest}"/>
</j:if>
<maven:makeRelativePath var="outputDir" basedir="${basedir}" path="${outputDir}" separator="/"/>
<classpathentry kind="output" path="${outputDir}"/>
<ant:echo>Setting default output directory to ${outputDir}</ant:echo>

to

<j:set var="outputDir" value="${maven.eclipse.output.dir}"/>
<j:if test="${empty outputDir}">
<j:set var="outputDir" value="${maven.build.dest}"/>
<maven:makeRelativePath var="outputDir" basedir="${basedir}" path="${outputDir}" separator="/"/>
</j:if>
<classpathentry kind="output" path="${outputDir}"/>
<ant:echo>Setting default output directory to ${outputDir}</ant:echo>

With a requirement that the maven.eclipse.output.dir should always be set as a relative path. This requirement should be put in the plugin properties doc.



fabrizio giustina added a comment - 09/Oct/05 12:07 PM

fixed in svn