geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sachin Patel <sppat...@gmail.com>
Subject Patch for maven m:eclipse command
Date Wed, 29 Jun 2005 18:13:49 GMT
For those wanting to use Eclipse as the IDE for Geronimo development, 
with the current supported version of Maven for Geronimo, there is a bug 
that prevents correct .classpath entries to be generated for some of the 
projects (specifically those ending in "-builder").

This problem has been resolved in the 1.1 beta 2 version of Maven.

http://jira.codehaus.org/browse/MAVEN-1520

However, until that version of Maven can be used, you can modify the
eclipse plugin itself with the described changes to fix the issue.

In the MAVEN_INSTALL/plugins/maven-eclipse-plugin-1.9.jar open the 
classpath.jelly file and change the following segment from....

<!-- add extra directories to be included in the classpath -->
   <j:forEach var="res" items="${maven.eclipse.classpath.include.split}">
     <maven:makeRelativePath var="srcDir" basedir="${basedir}" 
path="${res}"  separator="/"/>
     <classpathentry kind="src" path="${srcDir}"/>
   </j:forEach>

to the following...

   <!-- add extra directories to be included in the classpath -->
   <j:forEach var="res" items="${maven.eclipse.classpath.include.split}">
     <!-- PATCH -->
     <j:set var="srcDir" value="${res}" />
     <j:if test="${res.startsWith(basedir)}">
       <maven:makeRelativePath var="srcDir" basedir="${basedir}" 
path="${res}"  separator="/"/>
     </j:if>
     <classpathentry kind="src" path="${srcDir}"/>
   </j:forEach>

Afterwards repackage the jar, and simply rerun the maven -o m:eclipse 
command and the problem .classpath files will be corrected.


Mime
View raw message