Remove old patches

This commit is contained in:
Mikolaj Izdebski 2014-05-29 18:33:45 +02:00
parent b222ddfe72
commit d842140da0
4 changed files with 0 additions and 253 deletions

View File

@ -1,46 +0,0 @@
From 6beaea7bae7bbe5fb17b1d9c9b13bb2d4072bc08 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 28 Mar 2014 16:56:12 +0100
Subject: [PATCH 1/4] Don't install artifacts which are not regular files
This fixes rhbz#1078967
---
.../maven/rpminstall/plugin/InstallMojo.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java b/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java
index 67f34d3..0e64792 100644
--- a/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java
+++ b/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java
@@ -130,6 +130,13 @@ public class InstallMojo
logger.debug( "Installing main artifact " + mainArtifact );
logger.debug( "Artifact file is " + mainArtifact.getFile() );
+ if ( !mainArtifact.getFile().isFile() )
+ {
+ logger.info( "Skipping installation of artifact " + mainArtifact.getFile()
+ + ": artifact file is not a regular file" );
+ mainArtifact = mainArtifact.setFile( null );
+ }
+
Path rawPom = project.getFile().toPath();
Path effectivePom = saveEffectivePom( project.getModel() );
logger.debug( "Raw POM path: " + rawPom );
@@ -142,6 +149,14 @@ public class InstallMojo
Artifact attachedArtifact = aetherArtifact( mavenArtifact );
attachedArtifact = attachedArtifact.setFile( mavenArtifact.getFile() );
logger.debug( "Installing attached artifact " + attachedArtifact );
+ logger.debug( "Artifact file is " + mavenArtifact.getFile() );
+
+ if ( !mavenArtifact.getFile().isFile() )
+ {
+ logger.info( "Skipping installation of attached artifact " + attachedArtifact
+ + ": artifact file is not a regular file" );
+ continue;
+ }
deployArtifact( attachedArtifact, null, null );
}
--
1.9.0

View File

@ -1,34 +0,0 @@
From bbe137765c8ac11c9adcd52e7063453b1c092735 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 28 Mar 2014 19:30:36 +0100
Subject: [PATCH 2/4] Protect against NPE in Install MOJO
---
.../java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java b/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java
index 0e64792..bbff4c2 100644
--- a/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java
+++ b/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java
@@ -130,7 +130,7 @@ public class InstallMojo
logger.debug( "Installing main artifact " + mainArtifact );
logger.debug( "Artifact file is " + mainArtifact.getFile() );
- if ( !mainArtifact.getFile().isFile() )
+ if ( mainArtifact.getFile() != null && !mainArtifact.getFile().isFile() )
{
logger.info( "Skipping installation of artifact " + mainArtifact.getFile()
+ ": artifact file is not a regular file" );
@@ -151,7 +151,7 @@ public class InstallMojo
logger.debug( "Installing attached artifact " + attachedArtifact );
logger.debug( "Artifact file is " + mavenArtifact.getFile() );
- if ( !mavenArtifact.getFile().isFile() )
+ if ( mavenArtifact.getFile() != null && !mavenArtifact.getFile().isFile() )
{
logger.info( "Skipping installation of attached artifact " + attachedArtifact
+ ": artifact file is not a regular file" );
--
1.9.0

View File

@ -1,101 +0,0 @@
From 124340c288e5276968c0a7463a02eeadcca89772 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 28 Mar 2014 19:38:30 +0100
Subject: [PATCH 3/4] Override extensions of skipped artifacts
Artifacts which are not installed must set their exiension to "pom",
otherwise XMvn Installed would fail with "POM artifact has extension
different from 'pom': jar". This limitation is fixed in XMvn 2.x.
---
.../org/fedoraproject/maven/rpminstall/plugin/BuilddepMojo.java | 4 ++--
.../org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java | 7 ++++---
.../main/java/org/fedoraproject/maven/rpminstall/plugin/Utils.java | 5 ++++-
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/BuilddepMojo.java b/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/BuilddepMojo.java
index 789988e..a9f07c1 100644
--- a/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/BuilddepMojo.java
+++ b/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/BuilddepMojo.java
@@ -78,7 +78,7 @@ public class BuilddepMojo
for ( MavenProject project : reactorProjects )
{
- Artifact projectArtifact = Utils.aetherArtifact( project.getArtifact() );
+ Artifact projectArtifact = Utils.aetherArtifact( project.getArtifact(), null );
projectArtifact = projectArtifact.setFile( project.getFile() );
DependencyExtractionRequest request = new DependencyExtractionRequest();
@@ -96,7 +96,7 @@ public class BuilddepMojo
reactorArtifacts.add( projectArtifact );
for ( org.apache.maven.artifact.Artifact attachedArtifact : project.getAttachedArtifacts() )
- reactorArtifacts.add( Utils.aetherArtifact( attachedArtifact ) );
+ reactorArtifacts.add( Utils.aetherArtifact( attachedArtifact, null ) );
}
dependencies.removeAll( reactorArtifacts );
diff --git a/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java b/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java
index bbff4c2..19525b3 100644
--- a/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java
+++ b/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java
@@ -88,7 +88,7 @@ public class InstallMojo
{
systemDepsFound = true;
- logger.error( "Reactor project " + aetherArtifact( project.getArtifact() )
+ logger.error( "Reactor project " + aetherArtifact( project.getArtifact(), null )
+ " has system-scoped dependencies: " + ArtifactUtils.collectionToString( systemDeps, true ) );
}
}
@@ -125,7 +125,7 @@ public class InstallMojo
{
for ( MavenProject project : reactorProjects )
{
- Artifact mainArtifact = aetherArtifact( project.getArtifact() );
+ Artifact mainArtifact = aetherArtifact( project.getArtifact(), null );
mainArtifact = mainArtifact.setFile( project.getArtifact().getFile() );
logger.debug( "Installing main artifact " + mainArtifact );
logger.debug( "Artifact file is " + mainArtifact.getFile() );
@@ -134,6 +134,7 @@ public class InstallMojo
{
logger.info( "Skipping installation of artifact " + mainArtifact.getFile()
+ ": artifact file is not a regular file" );
+ mainArtifact = aetherArtifact( project.getArtifact(), "pom" );
mainArtifact = mainArtifact.setFile( null );
}
@@ -146,7 +147,7 @@ public class InstallMojo
for ( org.apache.maven.artifact.Artifact mavenArtifact : project.getAttachedArtifacts() )
{
- Artifact attachedArtifact = aetherArtifact( mavenArtifact );
+ Artifact attachedArtifact = aetherArtifact( mavenArtifact, null );
attachedArtifact = attachedArtifact.setFile( mavenArtifact.getFile() );
logger.debug( "Installing attached artifact " + attachedArtifact );
logger.debug( "Artifact file is " + mavenArtifact.getFile() );
diff --git a/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/Utils.java b/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/Utils.java
index 623e414..31d7da9 100644
--- a/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/Utils.java
+++ b/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/Utils.java
@@ -35,7 +35,7 @@ import org.fedoraproject.maven.utils.ArtifactUtils;
*/
class Utils
{
- public static Artifact aetherArtifact( org.apache.maven.artifact.Artifact mavenArtifact )
+ public static Artifact aetherArtifact( org.apache.maven.artifact.Artifact mavenArtifact, String overrideExtension )
{
String groupId = mavenArtifact.getGroupId();
String artifactId = mavenArtifact.getArtifactId();
@@ -50,6 +50,9 @@ class Utils
File artifactFile = mavenArtifact.getFile();
+ if ( overrideExtension != null )
+ extension = overrideExtension;
+
Artifact artifact = new DefaultArtifact( groupId, artifactId, classifier, extension, version );
artifact = ArtifactUtils.setStereotype( artifact, stereotype );
artifact = artifact.setFile( artifactFile );
--
1.9.0

View File

@ -1,72 +0,0 @@
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