You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ni...@apache.org on 2009/10/19 10:24:36 UTC

svn commit: r826604 - in /maven/plugins/trunk/maven-eclipse-plugin/src: main/java/org/apache/maven/plugin/eclipse/writers/ test/resources/projects/project-ajdt-01/expected/ test/resources/projects/project-ajdt-02/expected/ test/resources/projects/proje...

Author: nicolas
Date: Mon Oct 19 08:24:35 2009
New Revision: 826604

URL: http://svn.apache.org/viewvc?rev=826604&view=rev
Log:
[MECLIPSE-558] Ignoring listed AspectJ dependencies

o fix broken IT tests

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-ajdt-01/expected/.classpath
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-02/expected/.classpath
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-03/expected/.classpath
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-04/expected/.classpath
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-05/expected/.classpath
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-06/expected/.classpath
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-10-MECLIPSE-538/expected/.classpath
    maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-11-MECLIPSE-104/expected/.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=826604&r1=826603&r2=826604&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 Mon Oct 19 08:24:35 2009
@@ -45,7 +45,7 @@
 
 /**
  * Writes eclipse .classpath file.
- * 
+ *
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @author <a href="mailto:kenney@neonics.com">Kenney Westerhof</a>
  * @author <a href="mailto:fgiust@apache.org">Fabrizio Giustina</a>
@@ -64,9 +64,9 @@
      *
      */
     private static final String ORG_ECLIPSE_AJDT_ASPECTPATH = "org.eclipse.ajdt.aspectpath";
-     
+
     private static final String ASPECTJRT_CONTAINER = "org.eclipse.ajdt.core.ASPECTJRT_CONTAINER";
-	
+
     /**
      *
      */
@@ -528,12 +528,12 @@
         }
 
         // Replace aspectJ runtime library with ajdt ASPECTJRT_CONTAINER.
-        if ( ( config.getAjdtVersion() != 0 ) && dep.getGroupId().equals( "org.aspectj" ) && dep.getArtifactId().equals( "aspectjrt" ) )
+        if ( ( config.getAjdtVersion() != 0 ) && isAspectJRuntime( dep ) )
         {
-            writer.startElement( ELT_CLASSPATHENTRY );
-            writer.addAttribute( ATTR_KIND, "con" );
-            writer.addAttribute( ATTR_PATH, ASPECTJRT_CONTAINER );
-            writer.endElement();
+            if ( ! config.getClasspathContainers().contains( ASPECTJRT_CONTAINER ) )
+            {
+                config.getClasspathContainers().add( ASPECTJRT_CONTAINER );
+            }
             return;
         }
 
@@ -617,4 +617,16 @@
         writer.endElement();
 
     }
+
+    /**
+     * @return
+     */
+    private boolean isAspectJRuntime( IdeDependency dep )
+    {
+        if ( dep.getArtifactId().equals( "aspectjrt" ) )
+        {
+            return dep.getGroupId().equals( "org.aspectj" ) || dep.getGroupId().equals( "aspectj" );
+        }
+        return false;
+    }
 }

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-01/expected/.classpath
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-01/expected/.classpath?rev=826604&r1=826603&r2=826604&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-01/expected/.classpath (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-01/expected/.classpath Mon Oct 19 08:24:35 2009
@@ -1,5 +1,6 @@
 <classpath>
   <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="var" path="M2_REPO/aspectj/aspectjweaver/1.5.3/aspectjweaver-1.5.3.jar"/>
   <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/springframework/spring-aspects/2.5/spring-aspects-2.5.jar" sourcepath="M2_REPO/org/springframework/spring-aspects/2.5/spring-aspects-2.5-sources.jar">

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-02/expected/.classpath
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-02/expected/.classpath?rev=826604&r1=826603&r2=826604&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-02/expected/.classpath (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-02/expected/.classpath Mon Oct 19 08:24:35 2009
@@ -1,5 +1,6 @@
 <classpath>
   <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="var" path="M2_REPO/aspectj/aspectjweaver/1.5.3/aspectjweaver-1.5.3.jar"/>
   <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/springframework/spring-aspects/2.5/spring-aspects-2.5.jar" sourcepath="M2_REPO/org/springframework/spring-aspects/2.5/spring-aspects-2.5-sources.jar">

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-03/expected/.classpath
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-03/expected/.classpath?rev=826604&r1=826603&r2=826604&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-03/expected/.classpath (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-03/expected/.classpath Mon Oct 19 08:24:35 2009
@@ -1,5 +1,6 @@
 <classpath>
   <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="var" path="M2_REPO/aspectj/aspectjweaver/1.5.3/aspectjweaver-1.5.3.jar"/>
   <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/springframework/spring-aspects/2.5/spring-aspects-2.5.jar" sourcepath="M2_REPO/org/springframework/spring-aspects/2.5/spring-aspects-2.5-sources.jar">

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-04/expected/.classpath
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-04/expected/.classpath?rev=826604&r1=826603&r2=826604&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-04/expected/.classpath (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-04/expected/.classpath Mon Oct 19 08:24:35 2009
@@ -1,6 +1,7 @@
 <classpath>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/aspectj/aspectjweaver/1.5.3/aspectjweaver-1.5.3.jar"/>
   <classpathentry kind="var" path="M2_REPO/avalon-framework/avalon-framework/4.1.3/avalon-framework-4.1.3.jar"/>
   <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar"/>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-05/expected/.classpath
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-05/expected/.classpath?rev=826604&r1=826603&r2=826604&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-05/expected/.classpath (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-05/expected/.classpath Mon Oct 19 08:24:35 2009
@@ -1,6 +1,7 @@
 <classpath>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/aspectj/aspectjweaver/1.5.3/aspectjweaver-1.5.3.jar"/>
   <classpathentry kind="var" path="M2_REPO/avalon-framework/avalon-framework/4.1.3/avalon-framework-4.1.3.jar"/>
   <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar"/>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-06/expected/.classpath
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-06/expected/.classpath?rev=826604&r1=826603&r2=826604&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-06/expected/.classpath (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-06/expected/.classpath Mon Oct 19 08:24:35 2009
@@ -1,5 +1,6 @@
 <classpath>
   <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="var" path="M2_REPO/aspectj/aspectjweaver/1.5.3/aspectjweaver-1.5.3.jar"/>
   <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/springframework/spring-aspects/2.5/spring-aspects-2.5.jar" sourcepath="M2_REPO/org/springframework/spring-aspects/2.5/spring-aspects-2.5-sources.jar"/>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-10-MECLIPSE-538/expected/.classpath
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-10-MECLIPSE-538/expected/.classpath?rev=826604&r1=826603&r2=826604&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-10-MECLIPSE-538/expected/.classpath (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-10-MECLIPSE-538/expected/.classpath Mon Oct 19 08:24:35 2009
@@ -5,6 +5,7 @@
   <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
   <classpathentry kind="src" path="src/main/aspect" including="**/*.java|**/*.aj"/>
   <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="var" path="M2_REPO/org/aspectj/aspectjtools/1.6.2/aspectjtools-1.6.2.jar"/>
   <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
   <classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-11-MECLIPSE-104/expected/.classpath
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-11-MECLIPSE-104/expected/.classpath?rev=826604&r1=826603&r2=826604&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-11-MECLIPSE-104/expected/.classpath (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-ajdt-11-MECLIPSE-104/expected/.classpath Mon Oct 19 08:24:35 2009
@@ -5,6 +5,7 @@
   <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
   <classpathentry kind="src" path="src/main/aspect" including="**/*.tst|**/*.java|**/*.aj" excluding="**/.svn/**"/>
   <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="var" path="M2_REPO/org/aspectj/aspectjtools/1.6.2/aspectjtools-1.6.2.jar"/>
   <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
   <classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>