Author: fgiust
Date: Thu Jul 20 13:00:17 2006
New Revision: 424035

URL: http://svn.apache.org/viewvc?rev=424035&view=rev
Log:
MECLIPSE-95 Transitive classpath entries need to be marked exported

Modified:
    
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java
    
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-1/classpath
    
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-10/classpath
    
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-13/classpath
    
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-2/classpath
    
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-3/classpath
    
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-4/classpath
    
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-5/classpath
    
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-6/classpath
    
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-9/classpath

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java?rev=424035&r1=424034&r2=424035&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java
 Thu Jul 20 13:00:17 2006
@@ -73,6 +73,11 @@
     private static final String ATTR_PATH = "path"; //$NON-NLS-1$
 
     /**
+     * Used for exported classpath entries.
+     */
+    private static final String ATTR_EXPORTED = "exported"; //$NON-NLS-1$
+
+    /**
      * Attribute for kind - Container (con), Variable (var)..etc.
      */
     private static final String ATTR_KIND = "kind"; //$NON-NLS-1$
@@ -310,6 +315,12 @@
 
         writer.startElement( ELT_CLASSPATHENTRY );
         writer.addAttribute( ATTR_KIND, kind );
+
+        if ( !dep.isSystemScoped() && !dep.isTestDependency() )
+        {
+            writer.addAttribute( ATTR_EXPORTED, Boolean.TRUE.toString() );
+        }
+
         writer.addAttribute( ATTR_PATH, path );
 
         if ( sourcepath != null )

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-1/classpath
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-1/classpath?rev=424035&r1=424034&r2=424035&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-1/classpath
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-1/classpath
 Thu Jul 20 13:00:17 2006
@@ -2,5 +2,5 @@
   <classpathentry kind="src" path="src/main/java"/>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" 
path="M2_REPO/maven/maven-core/98.0/maven-core-98.0.jar" 
sourcepath="M2_REPO/maven/maven-core/98.0/maven-core-98.0-sources.jar"/>
+  <classpathentry kind="var" exported="true" 
path="M2_REPO/maven/maven-core/98.0/maven-core-98.0.jar" 
sourcepath="M2_REPO/maven/maven-core/98.0/maven-core-98.0-sources.jar"/>
 </classpath>

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-10/classpath
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-10/classpath?rev=424035&r1=424034&r2=424035&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-10/classpath
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-10/classpath
 Thu Jul 20 13:00:17 2006
@@ -2,7 +2,7 @@
   <classpathentry kind="src" path="src/main/java"/>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" path="M2_REPO/junit/junit/3.0/junit-3.0.jar">
+  <classpathentry kind="var" exported="true" 
path="M2_REPO/junit/junit/3.0/junit-3.0.jar">
     <attributes>
       <attribute 
value="jar:file:/${M2_REPO}/junit/junit/3.0/junit-3.0-javadoc.jar!/" 
name="javadoc_location"/>
     </attributes>

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-13/classpath
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-13/classpath?rev=424035&r1=424034&r2=424035&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-13/classpath
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-13/classpath
 Thu Jul 20 13:00:17 2006
@@ -1,5 +1,5 @@
 <classpath>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
+  <classpathentry kind="var" exported="true" 
path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
 </classpath>

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-2/classpath
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-2/classpath?rev=424035&r1=424034&r2=424035&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-2/classpath
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-2/classpath
 Thu Jul 20 13:00:17 2006
@@ -5,5 +5,5 @@
   <classpathentry kind="src" path="src/test/resources" 
output="target/test-classes"/>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" path="M2_REPO/junit/junit/2.0/junit-2.0.jar"/>
+  <classpathentry kind="var" exported="true" 
path="M2_REPO/junit/junit/2.0/junit-2.0.jar"/>
 </classpath>

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-3/classpath
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-3/classpath?rev=424035&r1=424034&r2=424035&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-3/classpath
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-3/classpath
 Thu Jul 20 13:00:17 2006
@@ -4,5 +4,5 @@
   <classpathentry kind="src" path="src/test/resources" 
output="target/test-output-dir"/>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" path="M2_REPO/junit/junit/2.0/junit-2.0.jar"/>
+  <classpathentry kind="var" exported="true" 
path="M2_REPO/junit/junit/2.0/junit-2.0.jar"/>
 </classpath>

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-4/classpath
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-4/classpath?rev=424035&r1=424034&r2=424035&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-4/classpath
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-4/classpath
 Thu Jul 20 13:00:17 2006
@@ -5,5 +5,5 @@
   <classpathentry kind="src" path="src-test-resources" 
output="target/test-classes-dir"/>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" path="M2_REPO/junit/junit/2.0/junit-2.0.jar"/>
+  <classpathentry kind="var" exported="true" 
path="M2_REPO/junit/junit/2.0/junit-2.0.jar"/>
 </classpath>

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-5/classpath
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-5/classpath?rev=424035&r1=424034&r2=424035&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-5/classpath
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-5/classpath
 Thu Jul 20 13:00:17 2006
@@ -4,5 +4,5 @@
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
   <classpathentry kind="con" 
path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache
 Tomcat v5.5"/>
   <classpathentry kind="con" 
path="org.eclipse.jst.j2ee.internal.web.container/wtptest"/>
-  <classpathentry kind="var" 
path="M2_REPO/maven/maven-core/98.0/maven-core-98.0.jar" 
sourcepath="M2_REPO/maven/maven-core/98.0/maven-core-98.0-sources.jar"/>
+  <classpathentry kind="var" exported="true" 
path="M2_REPO/maven/maven-core/98.0/maven-core-98.0.jar" 
sourcepath="M2_REPO/maven/maven-core/98.0/maven-core-98.0-sources.jar"/>
 </classpath>

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-6/classpath
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-6/classpath?rev=424035&r1=424034&r2=424035&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-6/classpath
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-6/classpath
 Thu Jul 20 13:00:17 2006
@@ -2,5 +2,5 @@
   <classpathentry kind="src" path="src/main/java"/>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" 
path="M2_REPO/maven/maven-core/98.0/maven-core-98.0.jar" 
sourcepath="M2_REPO/maven/maven-core/98.0/maven-core-98.0-sources.jar"/>
+  <classpathentry kind="var" exported="true" 
path="M2_REPO/maven/maven-core/98.0/maven-core-98.0.jar" 
sourcepath="M2_REPO/maven/maven-core/98.0/maven-core-98.0-sources.jar"/>
 </classpath>

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-9/classpath
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-9/classpath?rev=424035&r1=424034&r2=424035&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-9/classpath
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-9/classpath
 Thu Jul 20 13:00:17 2006
@@ -5,5 +5,5 @@
   <classpathentry kind="src" path="src-test-resources"/>
   <classpathentry kind="output" path="target/eclipse-classes"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" path="M2_REPO/junit/junit/2.0/junit-2.0.jar"/>
+  <classpathentry kind="var" exported="true" 
path="M2_REPO/junit/junit/2.0/junit-2.0.jar"/>
 </classpath>


Reply via email to