maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rfscho...@apache.org
Subject svn commit: r1757909 - in /maven/plugin-tools/trunk/maven-plugin-tools-annotations: ./ src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/ src/test/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/ src/te...
Date Fri, 26 Aug 2016 19:31:15 GMT
Author: rfscholte
Date: Fri Aug 26 19:31:15 2016
New Revision: 1757909

URL: http://svn.apache.org/viewvc?rev=1757909&view=rev
Log:
[MPLUGIN-312] maven-plugin-tools-annotations visitors fail scanning java8 annotations

Added:
    maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/test/resources/java8-annotations.jar
  (with props)
Modified:
    maven/plugin-tools/trunk/maven-plugin-tools-annotations/pom.xml
    maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoAnnotationVisitor.java
    maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoClassVisitor.java
    maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoFieldVisitor.java
    maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/DefaultMojoAnnotationsScannerTest.java

Modified: maven/plugin-tools/trunk/maven-plugin-tools-annotations/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-annotations/pom.xml?rev=1757909&r1=1757908&r2=1757909&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-annotations/pom.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-tools-annotations/pom.xml Fri Aug 26 19:31:15 2016
@@ -97,6 +97,10 @@
       </exclusions>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymock</artifactId>
+    </dependency>
 
   </dependencies>
 

Modified: maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoAnnotationVisitor.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoAnnotationVisitor.java?rev=1757909&r1=1757908&r2=1757909&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoAnnotationVisitor.java
(original)
+++ maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoAnnotationVisitor.java
Fri Aug 26 19:31:15 2016
@@ -41,7 +41,7 @@ public class MojoAnnotationVisitor
 
     MojoAnnotationVisitor( Logger logger, String annotationClassName )
     {
-        super( Opcodes.ASM4 );
+        super( Opcodes.ASM5 );
         this.logger = logger;
         this.annotationClassName = annotationClassName;
     }

Modified: maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoClassVisitor.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoClassVisitor.java?rev=1757909&r1=1757908&r2=1757909&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoClassVisitor.java
(original)
+++ maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoClassVisitor.java
Fri Aug 26 19:31:15 2016
@@ -53,7 +53,7 @@ public class MojoClassVisitor
 
     public MojoClassVisitor( Logger logger )
     {
-        super( Opcodes.ASM4 );
+        super( Opcodes.ASM5 );
         this.logger = logger;
     }
 

Modified: maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoFieldVisitor.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoFieldVisitor.java?rev=1757909&r1=1757908&r2=1757909&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoFieldVisitor.java
(original)
+++ maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/visitors/MojoFieldVisitor.java
Fri Aug 26 19:31:15 2016
@@ -44,7 +44,7 @@ public class MojoFieldVisitor
 
     MojoFieldVisitor( Logger logger, String fieldName, String className )
     {
-        super( Opcodes.ASM4 );
+        super( Opcodes.ASM5 );
         this.logger = logger;
         this.fieldName = fieldName;
         this.className = className;

Modified: maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/DefaultMojoAnnotationsScannerTest.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/DefaultMojoAnnotationsScannerTest.java?rev=1757909&r1=1757908&r2=1757909&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/DefaultMojoAnnotationsScannerTest.java
(original)
+++ maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/extractor/annotations/scanner/DefaultMojoAnnotationsScannerTest.java
Fri Aug 26 19:31:15 2016
@@ -19,8 +19,11 @@ package org.apache.maven.tools.plugin.ex
  * under the License.
  */
 
+import static org.easymock.EasyMock.*;
+
 import java.io.File;
 
+import org.codehaus.plexus.logging.Logger;
 import junit.framework.TestCase;
 
 public class DefaultMojoAnnotationsScannerTest
@@ -32,4 +35,14 @@ public class DefaultMojoAnnotationsScann
     {
         scanner.scanArchive( new File( "src/test/resources/java9-module.jar"), null, false
);
     }
+    
+    public void testJava8Annotations() throws Exception
+    {
+        Logger logger = createMock( Logger.class );
+        expect( logger.isDebugEnabled() ).andReturn( false );
+        replay( logger );
+        scanner.enableLogging( logger );
+        scanner.scanArchive( new File( "src/test/resources/java8-annotations.jar"), null,
false );
+    }
+
 }

Added: maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/test/resources/java8-annotations.jar
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/test/resources/java8-annotations.jar?rev=1757909&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/test/resources/java8-annotations.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message