olamy closed pull request #14: [MPLUGIN-336] Upgrade ASM to 6.2 for Java 10,11 
support
URL: https://github.com/apache/maven-plugin-tools/pull/14
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
 
b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
index 23c3ed9f..6d5c3965 100644
--- 
a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
+++ 
b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
@@ -36,8 +36,8 @@
 import org.objectweb.asm.ClassReader;
 import org.objectweb.asm.ClassVisitor;
 import org.objectweb.asm.ClassWriter;
+import org.objectweb.asm.commons.ClassRemapper;
 import org.objectweb.asm.commons.Remapper;
-import org.objectweb.asm.commons.RemappingClassAdapter;
 import org.objectweb.asm.commons.SimpleRemapper;
 
 import java.io.File;
@@ -421,7 +421,7 @@ private static String rewriteHelpClassToMojoPackage( 
PluginToolsRequest request,
 
         Remapper packageRemapper =
             new SimpleRemapper( HELP_MOJO_CLASS_NAME, packageAsDirectory + '/' 
+ HELP_MOJO_CLASS_NAME );
-        ClassVisitor cv = new RemappingClassAdapter( cw, packageRemapper );
+        ClassVisitor cv = new ClassRemapper( cw, packageRemapper );
 
         try
         {
diff --git a/pom.xml b/pom.xml
index 06455fff..6cb39f3e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -97,7 +97,7 @@
     <antVersion>1.7.1</antVersion>
     <mavenInvokerPluginVersion>3.0.1</mavenInvokerPluginVersion>
     
<maven.site.path>plugin-tools-archives/plugin-tools-LATEST</maven.site.path>
-    <asmVersion>5.0.2</asmVersion>
+    <asmVersion>6.2</asmVersion>
   </properties>
 
   <dependencyManagement>
@@ -291,6 +291,21 @@
     <plugins>
       <plugin>
         <artifactId>maven-enforcer-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>enforce-bytecode-version</id>
+            <configuration>
+              <rules>
+                <enforceBytecodeVersion>
+                  <excludes>
+                    <!-- ASM supports Java 1.5+, see 
https://asm.ow2.io/faq.html#Q14 -->
+                    <exclude>org.ow2.asm:*</exclude>
+                  </excludes>
+                </enforceBytecodeVersion>
+              </rules>
+            </configuration>
+          </execution>
+        </executions>
         <dependencies>
           <dependency>
             <groupId>org.codehaus.mojo</groupId>
@@ -398,41 +413,5 @@
         </plugins>
       </reporting>
     </profile>
-    <profile>
-      <activation>
-        <jdk>[1.9,)</jdk>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <artifactId>maven-enforcer-plugin</artifactId>
-            <executions>
-              <execution>
-                <id>enforce-bytecode-version</id>
-                <configuration>
-                  <rules>
-                    <enforceBytecodeVersion>
-                      <ignoreClasses>
-                        <ignoreClass>module-info</ignoreClass>
-                      </ignoreClasses>
-                    </enforceBytecodeVersion>
-                  </rules>
-                </configuration>
-              </execution>
-            </executions>
-            <dependencies>
-              <dependency>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>extra-enforcer-rules</artifactId>
-                <version>1.0-beta-5</version>
-              </dependency>
-            </dependencies>
-          </plugin>
-        </plugins>
-      </build>
-      <properties>
-        <asmVersion>6.1.1</asmVersion>
-      </properties>
-    </profile>
   </profiles>
 </project>


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to