Use ASM 5.0.1 directly instead of Sisu-shaded ASM

This commit is contained in:
Mikolaj Izdebski 2014-04-22 15:31:54 +02:00
parent 50dded04d8
commit 1eae0467ea
5 changed files with 85 additions and 7 deletions

View File

@ -1,7 +1,7 @@
From 6beaea7bae7bbe5fb17b1d9c9b13bb2d4072bc08 Mon Sep 17 00:00:00 2001 From 6beaea7bae7bbe5fb17b1d9c9b13bb2d4072bc08 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com> From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 28 Mar 2014 16:56:12 +0100 Date: Fri, 28 Mar 2014 16:56:12 +0100
Subject: [PATCH 1/3] Don't install artifacts which are not regular files Subject: [PATCH 1/4] Don't install artifacts which are not regular files
This fixes rhbz#1078967 This fixes rhbz#1078967
--- ---
@ -42,5 +42,5 @@ index 67f34d3..0e64792 100644
deployArtifact( attachedArtifact, null, null ); deployArtifact( attachedArtifact, null, null );
} }
-- --
1.8.5.3 1.9.0

View File

@ -1,7 +1,7 @@
From bbe137765c8ac11c9adcd52e7063453b1c092735 Mon Sep 17 00:00:00 2001 From bbe137765c8ac11c9adcd52e7063453b1c092735 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com> From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 28 Mar 2014 19:30:36 +0100 Date: Fri, 28 Mar 2014 19:30:36 +0100
Subject: [PATCH 2/3] Protect against NPE in Install MOJO Subject: [PATCH 2/4] Protect against NPE in Install MOJO
--- ---
.../java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java | 4 ++-- .../java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java | 4 ++--
@ -30,5 +30,5 @@ index 0e64792..bbff4c2 100644
logger.info( "Skipping installation of attached artifact " + attachedArtifact logger.info( "Skipping installation of attached artifact " + attachedArtifact
+ ": artifact file is not a regular file" ); + ": artifact file is not a regular file" );
-- --
1.8.5.3 1.9.0

View File

@ -1,7 +1,7 @@
From 124340c288e5276968c0a7463a02eeadcca89772 Mon Sep 17 00:00:00 2001 From 124340c288e5276968c0a7463a02eeadcca89772 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com> From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 28 Mar 2014 19:38:30 +0100 Date: Fri, 28 Mar 2014 19:38:30 +0100
Subject: [PATCH 3/3] Override extensions of skipped artifacts Subject: [PATCH 3/4] Override extensions of skipped artifacts
Artifacts which are not installed must set their exiension to "pom", Artifacts which are not installed must set their exiension to "pom",
otherwise XMvn Installed would fail with "POM artifact has extension otherwise XMvn Installed would fail with "POM artifact has extension
@ -97,5 +97,5 @@ index 623e414..31d7da9 100644
artifact = ArtifactUtils.setStereotype( artifact, stereotype ); artifact = ArtifactUtils.setStereotype( artifact, stereotype );
artifact = artifact.setFile( artifactFile ); artifact = artifact.setFile( artifactFile );
-- --
1.8.5.3 1.9.0

View File

@ -0,0 +1,72 @@
From cdcf2ebb4bc1be2f95d672ad62576c60b59b781a Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Wed, 9 Apr 2014 18:12:07 +0200
Subject: [PATCH 4/4] Use ASM 5.0.1 directly instead of Sisu-shaded ASM
---
xmvn-core/pom.xml | 4 ++++
.../org/fedoraproject/maven/installer/impl/DefaultInstaller.java | 8 ++++----
xmvn-parent/pom.xml | 6 ++++++
3 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/xmvn-core/pom.xml b/xmvn-core/pom.xml
index ca1d00d..f4c0585 100644
--- a/xmvn-core/pom.xml
+++ b/xmvn-core/pom.xml
@@ -68,6 +68,10 @@
<groupId>org.apache.ivy</groupId>
<artifactId>ivy</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm</artifactId>
+ </dependency>
</dependencies>
<build>
<plugins>
diff --git a/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/DefaultInstaller.java b/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/DefaultInstaller.java
index 6c7242b..591cc82 100644
--- a/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/DefaultInstaller.java
+++ b/xmvn-core/src/main/java/org/fedoraproject/maven/installer/impl/DefaultInstaller.java
@@ -50,10 +50,10 @@ import org.codehaus.plexus.logging.Logger;
import org.codehaus.plexus.util.StringUtils;
import org.eclipse.aether.artifact.Artifact;
import org.eclipse.aether.artifact.DefaultArtifact;
-import org.eclipse.sisu.space.asm.ClassReader;
-import org.eclipse.sisu.space.asm.ClassVisitor;
-import org.eclipse.sisu.space.asm.MethodVisitor;
-import org.eclipse.sisu.space.asm.Opcodes;
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.ClassVisitor;
+import org.objectweb.asm.MethodVisitor;
+import org.objectweb.asm.Opcodes;
import org.fedoraproject.maven.config.Configuration;
import org.fedoraproject.maven.config.Configurator;
import org.fedoraproject.maven.config.InstallerSettings;
diff --git a/xmvn-parent/pom.xml b/xmvn-parent/pom.xml
index 115c37e..e1676bf 100644
--- a/xmvn-parent/pom.xml
+++ b/xmvn-parent/pom.xml
@@ -75,6 +75,7 @@
<project.build.sourceEncoding>US-ASCII</project.build.sourceEncoding>
<aetherVersion>0.9.0.M4</aetherVersion>
+ <asmVersion>5.0.1</asmVersion>
<ivyVersion>2.3.0</ivyVersion>
<jcommanderVersion>1.32</jcommanderVersion>
<guiceVersion>3.1.8</guiceVersion>
@@ -202,6 +203,11 @@
<artifactId>ivy</artifactId>
<version>${ivyVersion}</version>
</dependency>
+ <dependency>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm</artifactId>
+ <version>${asmVersion}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
<dependencies>
--
1.9.0

View File

@ -1,6 +1,6 @@
Name: xmvn Name: xmvn
Version: 1.5.0 Version: 1.5.0
Release: 0.24.gitcb3a0a6%{?dist} Release: 0.25.gitcb3a0a6%{?dist}
Summary: Local Extensions for Apache Maven Summary: Local Extensions for Apache Maven
License: ASL 2.0 License: ASL 2.0
URL: http://mizdebsk.fedorapeople.org/xmvn URL: http://mizdebsk.fedorapeople.org/xmvn
@ -14,6 +14,7 @@ Source0: %{name}-%{version}-SNAPSHOT.tar.xz
Patch0: 0001-Don-t-install-artifacts-which-are-not-regular-files.patch Patch0: 0001-Don-t-install-artifacts-which-are-not-regular-files.patch
Patch1: 0002-Protect-against-NPE-in-Install-MOJO.patch Patch1: 0002-Protect-against-NPE-in-Install-MOJO.patch
Patch2: 0003-Override-extensions-of-skipped-artifacts.patch Patch2: 0003-Override-extensions-of-skipped-artifacts.patch
Patch3: 0004-Use-ASM-5.0.1-directly-instead-of-Sisu-shaded-ASM.patch
BuildRequires: maven >= 3.1.1-13 BuildRequires: maven >= 3.1.1-13
BuildRequires: maven-local BuildRequires: maven-local
@ -23,6 +24,7 @@ BuildRequires: maven-dependency-plugin
BuildRequires: maven-plugin-build-helper BuildRequires: maven-plugin-build-helper
BuildRequires: maven-assembly-plugin BuildRequires: maven-assembly-plugin
BuildRequires: maven-invoker-plugin BuildRequires: maven-invoker-plugin
BuildRequires: objectweb-asm
BuildRequires: xmlunit BuildRequires: xmlunit
BuildRequires: mvn(org.codehaus.modello:modello-maven-plugin) BuildRequires: mvn(org.codehaus.modello:modello-maven-plugin)
@ -45,6 +47,7 @@ This package provides %{summary}.
%patch0 -p1 %patch0 -p1
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1
# remove dependency plugin maven-binaries execution # remove dependency plugin maven-binaries execution
# we provide apache-maven by symlink # we provide apache-maven by symlink
@ -155,6 +158,9 @@ end
%doc LICENSE NOTICE %doc LICENSE NOTICE
%changelog %changelog
* Tue Apr 22 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.0-0.25.gitcb3a0a6
- Use ASM 5.0.1 directly instead of Sisu-shaded ASM
* Fri Mar 28 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.0-0.24.gitcb3a0a6 * Fri Mar 28 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.0-0.24.gitcb3a0a6
- Override extensions of skipped artifacts - Override extensions of skipped artifacts