Add patches for rhbz#1220394
This commit is contained in:
parent
a99758918b
commit
dae0afd400
25
0001-Fix-NPE-in-DefaultResolver.patch
Normal file
25
0001-Fix-NPE-in-DefaultResolver.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 299ce2028ebaaab177290b569498ce36104bf762 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||||
|
Date: Mon, 11 May 2015 15:52:58 +0200
|
||||||
|
Subject: [PATCH 1/2] Fix NPE in DefaultResolver
|
||||||
|
|
||||||
|
---
|
||||||
|
.../main/java/org/fedoraproject/xmvn/resolver/impl/DefaultResolver.java | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/DefaultResolver.java b/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/DefaultResolver.java
|
||||||
|
index fdf79cf..6c0caf6 100644
|
||||||
|
--- a/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/DefaultResolver.java
|
||||||
|
+++ b/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/DefaultResolver.java
|
||||||
|
@@ -144,7 +144,7 @@ public class DefaultResolver
|
||||||
|
catch ( IOException e )
|
||||||
|
{
|
||||||
|
logger.warn( "Failed to generate effective POM", e );
|
||||||
|
- metadata = null;
|
||||||
|
+ return new DefaultResolutionResult();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.1.0
|
||||||
|
|
@ -0,0 +1,27 @@
|
|||||||
|
From 21eef845a4b7873946c71f1fd1880c5e4cad1111 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||||
|
Date: Mon, 11 May 2015 16:05:16 +0200
|
||||||
|
Subject: [PATCH 2/2] Prevent slashes from sneaking into artifact filename
|
||||||
|
|
||||||
|
---
|
||||||
|
.../org/fedoraproject/xmvn/resolver/impl/EffectivePomGenerator.java | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/EffectivePomGenerator.java b/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/EffectivePomGenerator.java
|
||||||
|
index 4fdab3a..ffc67ed 100644
|
||||||
|
--- a/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/EffectivePomGenerator.java
|
||||||
|
+++ b/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/EffectivePomGenerator.java
|
||||||
|
@@ -116,7 +116,9 @@ class EffectivePomGenerator
|
||||||
|
public Path generateEffectivePom( ArtifactMetadata metadata, Artifact artifact )
|
||||||
|
throws IOException
|
||||||
|
{
|
||||||
|
- String artifactFileName = artifact.getArtifactId() + "-" + artifact.getVersion() + ".pom";
|
||||||
|
+ String artifactIdNormalized = artifact.getArtifactId().replace( '/', '.' );
|
||||||
|
+ String versionNormalized = artifact.getVersion().replace( '/', '.' );
|
||||||
|
+ String artifactFileName = artifactIdNormalized + "-" + versionNormalized + ".pom";
|
||||||
|
Path pomDir = TempManager.createTempDirectory( "xmvn-" + metadata.getUuid() );
|
||||||
|
Path pomPath = pomDir.resolve( artifactFileName );
|
||||||
|
|
||||||
|
--
|
||||||
|
2.1.0
|
||||||
|
|
10
xmvn.spec
10
xmvn.spec
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Name: xmvn
|
Name: xmvn
|
||||||
Version: 2.4.0
|
Version: 2.4.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?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
|
||||||
@ -12,6 +12,9 @@ BuildArch: noarch
|
|||||||
|
|
||||||
Source0: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.xz
|
Source0: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.xz
|
||||||
|
|
||||||
|
Patch0: 0001-Fix-NPE-in-DefaultResolver.patch
|
||||||
|
Patch1: 0002-Prevent-slashes-from-sneaking-into-artifact-filename.patch
|
||||||
|
|
||||||
BuildRequires: maven >= 3.3
|
BuildRequires: maven >= 3.3
|
||||||
BuildRequires: maven-local
|
BuildRequires: maven-local
|
||||||
BuildRequires: beust-jcommander
|
BuildRequires: beust-jcommander
|
||||||
@ -150,6 +153,8 @@ This package provides %{summary}.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%mvn_package ":xmvn{,-it}" __noinstall
|
%mvn_package ":xmvn{,-it}" __noinstall
|
||||||
|
|
||||||
@ -295,6 +300,9 @@ cp -P %{_datadir}/maven/bin/m2.conf %{buildroot}%{_datadir}/%{name}/bin/
|
|||||||
%doc LICENSE NOTICE
|
%doc LICENSE NOTICE
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 11 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.4.0-2
|
||||||
|
- Add patches for rhbz#1220394
|
||||||
|
|
||||||
* Wed May 6 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.4.0-1
|
* Wed May 6 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.4.0-1
|
||||||
- Update to upstream version 2.4.0
|
- Update to upstream version 2.4.0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user