diff --git a/0005-Don-t-assume-package-has-a-single-name.patch b/0005-Don-t-assume-package-has-a-single-name.patch new file mode 100644 index 0000000..9052b17 --- /dev/null +++ b/0005-Don-t-assume-package-has-a-single-name.patch @@ -0,0 +1,54 @@ +From 0a89668a07d873d1942f702a595f438025d526fd Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Mon, 30 Sep 2013 11:05:41 +0200 +Subject: [PATCH] Don't assume package has a single name + +One package can have different names, for example "" and "__default". +--- + .../maven/installer/impl/DefaultInstaller.java | 15 +++++++-------- + 1 file changed, 7 insertions(+), 8 deletions(-) + +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 a3e9f9b..9472c08 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 +@@ -97,7 +97,7 @@ public class DefaultInstaller + + private Configuration configuration; + +- private Map packages; ++ private Map packages; + + private PackagingRule ruleForArtifact( Artifact artifact ) + { +@@ -134,13 +134,12 @@ public class DefaultInstaller + String packageName = rule.getTargetPackage(); + if ( StringUtils.isEmpty( packageName ) ) + packageName = Package.MAIN; +- Package pkg = packages.get( packageName ); + +- if ( pkg == null ) +- { +- pkg = new Package( packageName, settings, logger ); +- packages.put( packageName, pkg ); +- } ++ Package pkg = new Package( packageName, settings, logger ); ++ if ( packages.containsKey( pkg ) ) ++ pkg = packages.get( pkg ); ++ else ++ packages.put( pkg, pkg ); + + if ( logger.isDebugEnabled() ) + { +@@ -464,7 +463,7 @@ public class DefaultInstaller + packages = new TreeMap<>(); + + Package mainPackage = new Package( Package.MAIN, settings, logger ); +- packages.put( Package.MAIN, mainPackage ); ++ packages.put( mainPackage, mainPackage ); + + Set artifactSet = request.getArtifacts(); + +-- +1.8.3.1 + diff --git a/xmvn.spec b/xmvn.spec index cf52050..f1ee5b2 100644 --- a/xmvn.spec +++ b/xmvn.spec @@ -10,6 +10,7 @@ Patch0: 0001-Don-t-try-to-relativize-symlink-targets.patch Patch1: 0002-Try-to-resolve-cannonical-artifact-files.patch Patch2: 0003-Restotre-support-for-relative-symlinks.patch Patch3: 0004-Add-special-value-__default-to-install-artifact-to-d.patch +Patch4: 0005-Don-t-assume-package-has-a-single-name.patch BuildRequires: maven >= 3.1.0 BuildRequires: maven-local @@ -40,6 +41,7 @@ This package provides %{summary}. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 -F2 # remove dependency plugin maven-binaries execution # we provide apache-maven by symlink