Author: aheritier
Date: Sun Jul 16 13:27:13 2006
New Revision: 422525

URL: http://svn.apache.org/viewvc?rev=422525&view=rev
Log:
[MPECLIPSE-118] Attaching sourcepath in .classpath when file doesn't exist 
causes errors in Eclipse
Submitted by: Jon Christiansen

Modified:
    maven/maven-1/plugins/trunk/eclipse/plugin.jelly
    maven/maven-1/plugins/trunk/eclipse/project.xml
    maven/maven-1/plugins/trunk/eclipse/xdocs/changes.xml

Modified: maven/maven-1/plugins/trunk/eclipse/plugin.jelly
URL: 
http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/eclipse/plugin.jelly?rev=422525&r1=422524&r2=422525&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/eclipse/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/eclipse/plugin.jelly Sun Jul 16 13:27:13 2006
@@ -75,13 +75,28 @@
         </j:otherwise>
       </j:choose>
       <j:set var="jdocs" 
value="${groupId}/javadoc.jars/${artifactId}-${version}.javadoc.jar" />
-      <classpathentry kind="var" path="MAVEN_REPO/${relativePath}" 
sourcepath="MAVEN_REPO/${mappedsrc}">
+      <util:file var="testFile" name="${maven.repo.local}/${mappedsrc}" /> 
+
+      <j:choose>
+      <j:when test="${testFile.exists()}">
+        <classpathentry kind="var" path="MAVEN_REPO/${relativePath}" 
sourcepath="MAVEN_REPO/${mappedsrc}"/> 
+      </j:when>
+
+      <!-- Dont define sourcepath unless it actually exists -->
+      <!-- otherwise will cause errors in Eclipse (3.2 in my case) when 
clicking on Class/line numbers in stack traces in console -->      
+      
+      <j:otherwise>
+         <classpathentry kind="var" path="MAVEN_REPO/${relativePath}"/> 
+      </j:otherwise>
+      </j:choose>
+      
         <!-- javadoc need to be an absolute path in eclipse 3.1, the 
MAVEN_REPO var will not work
           <attributes>
           <attribute value="jar:file:/${maven.repo.local}/${jdocs}!/" 
name="javadoc_location"/>
           </attributes>
         -->
-      </classpathentry>
+
+
     </define:tag>
   </define:taglib>
 

Modified: maven/maven-1/plugins/trunk/eclipse/project.xml
URL: 
http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/eclipse/project.xml?rev=422525&r1=422524&r2=422525&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/eclipse/project.xml (original)
+++ maven/maven-1/plugins/trunk/eclipse/project.xml Sun Jul 16 13:27:13 2006
@@ -22,7 +22,7 @@
   <pomVersion>3</pomVersion>
   <id>maven-eclipse-plugin</id>
   <name>Maven Eclipse Plugin</name>
-  <currentVersion>1.11</currentVersion>
+  <currentVersion>1.11.1-SNAPSHOT</currentVersion>
   <description>A plugin to generate various files for the Eclipse IDE and ease 
the use of Maven within that environment.</description>
   <shortDescription>Eclipse Plugin for Maven</shortDescription>
   <versions>

Modified: maven/maven-1/plugins/trunk/eclipse/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/eclipse/xdocs/changes.xml?rev=422525&r1=422524&r2=422525&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/eclipse/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/eclipse/xdocs/changes.xml Sun Jul 16 13:27:13 
2006
@@ -23,6 +23,9 @@
     <author email="[EMAIL PROTECTED]">dIon Gillard</author>
   </properties>
   <body>
+    <release version="1.11.1-SNAPSHOT" date="In SVN">
+      <action dev="aheritier" type="fix" issue="MPECLIPSE-118" due-to="Jon 
Christiansen">Don't attach sourcepath in .classpath when file doesn't 
exist.</action>
+    </release>
     <release version="1.11" date="2006-06-18">
       <action dev="snicoll" type="fix" issue="MPECLIPSE-111">Made output and 
testOutput directory configuration consistent.</action>
       <action dev="felipeal" type="add" issue="MPECLIPSE-84">Added new property


Reply via email to