Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.9
-
Fix Version/s: 1.10
-
Labels:None
-
Number of attachments :
Description
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="$
">
<j:set var="outputDir" value="$
"/>
<maven:makeRelativePath var="outputDir" basedir="$
" path="$
{outputDir}" separator="/"/></j:if>
<classpathentry kind="output" path="${outputDir}
"/>
<ant:echo>Setting default output directory to $
</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.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Assignee | fabrizio giustina [ fgiust ] | |
| Status | Open [ 1 ] | Closed [ 6 ] |
| Fix Version/s | 1.10 [ 11350 ] | |
| Resolution | Fixed [ 1 ] |
fixed in svn