From 629a77c3e23118a896ea4f4250087f89838fef36 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 24 Oct 2013 14:25:19 +0100 Subject: [PATCH] Remove ASM dependency and use Spring Core's instead Depending on ASM itself can cause problems as it can clash with other libraries' dependency on it. This commit updates spring-boot-loader-tools to depend upon spring-core and use its repackaged copy of ASM instead. Depending on spring-core also brings with it the advantage of giving access to its various bits of utility code. spring-boot-maven-plugin has been updated to remove its ASM exclusions as they will no longer clash with the version from spring-boot-loader-tools (59483608) --- spring-boot-parent/pom.xml | 5 --- .../spring-boot-loader-tools/pom.xml | 4 +-- .../boot/loader/tools/MainClassFinder.java | 10 +++--- .../spring-boot-maven-plugin/pom.xml | 36 ++----------------- 4 files changed, 9 insertions(+), 46 deletions(-) diff --git a/spring-boot-parent/pom.xml b/spring-boot-parent/pom.xml index 46b901f5e3..1a213870cf 100644 --- a/spring-boot-parent/pom.xml +++ b/spring-boot-parent/pom.xml @@ -163,11 +163,6 @@ gradle-plugins ${gradle.version} - - org.ow2.asm - asm - 4.1 - org.zeroturnaround zt-zip diff --git a/spring-boot-tools/spring-boot-loader-tools/pom.xml b/spring-boot-tools/spring-boot-loader-tools/pom.xml index 4b0aa9f4b5..c9f1f4620f 100644 --- a/spring-boot-tools/spring-boot-loader-tools/pom.xml +++ b/spring-boot-tools/spring-boot-loader-tools/pom.xml @@ -15,8 +15,8 @@ - org.ow2.asm - asm + org.springframework + spring-core diff --git a/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/MainClassFinder.java b/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/MainClassFinder.java index 3ecadc6cca..0fe363d86d 100644 --- a/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/MainClassFinder.java +++ b/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/MainClassFinder.java @@ -33,11 +33,11 @@ import java.util.List; import java.util.jar.JarEntry; import java.util.jar.JarFile; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.MethodVisitor; -import org.objectweb.asm.Opcodes; -import org.objectweb.asm.Type; +import org.springframework.asm.ClassReader; +import org.springframework.asm.ClassVisitor; +import org.springframework.asm.MethodVisitor; +import org.springframework.asm.Opcodes; +import org.springframework.asm.Type; /** * Finds any class with a {@code public static main} method by performing a breadth first diff --git a/spring-boot-tools/spring-boot-maven-plugin/pom.xml b/spring-boot-tools/spring-boot-maven-plugin/pom.xml index 84adf954c9..0124e9b2ae 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/pom.xml +++ b/spring-boot-tools/spring-boot-maven-plugin/pom.xml @@ -29,13 +29,7 @@ org.apache.maven - maven-core - - - asm - asm - - + maven-core org.apache.maven @@ -67,37 +61,11 @@ org.codehaus.plexus plexus-utils - - org.ow2.asm - asm - org.apache.maven.plugins maven-shade-plugin - true - - - asm - asm - - - asm - asm-analysis - - - asm - asm-commons - - - asm - asm-tree - - - asm - asm-util - - + true