Fix installation of artifacts with classifier
This commit is contained in:
parent
63043696d0
commit
274414a83e
@ -0,0 +1,37 @@
|
||||
From 091c61e1ae94b619756dfd37305554293bf90132 Mon Sep 17 00:00:00 2001
|
||||
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
|
||||
Date: Wed, 25 Sep 2013 17:20:59 +0200
|
||||
Subject: [PATCH 1/3] [xmvn_config] add support for optional rule in
|
||||
add_package_mapping
|
||||
|
||||
---
|
||||
python/javapackages/xmvn_config.py | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/python/javapackages/xmvn_config.py b/python/javapackages/xmvn_config.py
|
||||
index 3ad16f9..ea8db1d 100644
|
||||
--- a/python/javapackages/xmvn_config.py
|
||||
+++ b/python/javapackages/xmvn_config.py
|
||||
@@ -230,7 +230,7 @@ class XMvnConfig(object):
|
||||
elems.append(felem)
|
||||
self.__add_config("artifactManagement", "rule", content=elems)
|
||||
|
||||
- def add_package_mapping(self, artifact, package):
|
||||
+ def add_package_mapping(self, artifact, package, optional=False):
|
||||
"""
|
||||
Change which package given artifact belongs to
|
||||
|
||||
@@ -246,6 +246,10 @@ class XMvnConfig(object):
|
||||
"is higher than wildcard "
|
||||
"groups.")
|
||||
elems = [main]
|
||||
+ if optional:
|
||||
+ opt = Element("optional")
|
||||
+ opt.text = "true"
|
||||
+ elems.append(opt)
|
||||
target = Element("targetPackage")
|
||||
target.text = package
|
||||
elems.append(target)
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,27 @@
|
||||
From bebc7ceb9d6b75020b664294a7404c414050a163 Mon Sep 17 00:00:00 2001
|
||||
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
|
||||
Date: Wed, 25 Sep 2013 17:21:48 +0200
|
||||
Subject: [PATCH 2/3] [mvn_build] Do not install artifacts with classifiers in
|
||||
singleton mode
|
||||
|
||||
---
|
||||
java-utils/mvn_build.py | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/java-utils/mvn_build.py b/java-utils/mvn_build.py
|
||||
index 9369979..957cbe0 100644
|
||||
--- a/java-utils/mvn_build.py
|
||||
+++ b/java-utils/mvn_build.py
|
||||
@@ -140,6 +140,9 @@ if __name__ == "__main__":
|
||||
mvn_args.extend(options.goal_after)
|
||||
|
||||
if options.singleton:
|
||||
+ # make sure we don't install artifacts with non-empty classifiers
|
||||
+ xc.add_package_mapping(Artifact.from_mvn_str(":::*?:"), "__noinstall",
|
||||
+ optional=True)
|
||||
xc.add_package_mapping(Artifact.from_mvn_str(":{*}"), "@1")
|
||||
|
||||
p = subprocess.Popen(" ".join(mvn_args), shell=True, env=env)
|
||||
--
|
||||
1.8.3.1
|
||||
|
93
0003-test-Update-data-for-singleton-packaging.patch
Normal file
93
0003-test-Update-data-for-singleton-packaging.patch
Normal file
@ -0,0 +1,93 @@
|
||||
From ed172e270bfdde65e3ba303b13bb44141b0392a9 Mon Sep 17 00:00:00 2001
|
||||
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
|
||||
Date: Wed, 25 Sep 2013 17:37:15 +0200
|
||||
Subject: [PATCH 3/3] [test] Update data for singleton packaging
|
||||
|
||||
---
|
||||
test/data/build_all1_00004.xml | 5 +++--
|
||||
test/data/build_all1_00005.xml | 15 +++++++++++++++
|
||||
test/data/build_singleton1_00001.xml | 5 +++--
|
||||
test/data/build_singleton1_00002.xml | 15 +++++++++++++++
|
||||
4 files changed, 36 insertions(+), 4 deletions(-)
|
||||
create mode 100644 test/data/build_all1_00005.xml
|
||||
create mode 100644 test/data/build_singleton1_00002.xml
|
||||
|
||||
diff --git a/test/data/build_all1_00004.xml b/test/data/build_all1_00004.xml
|
||||
index f12fd68..1dd3da6 100644
|
||||
--- a/test/data/build_all1_00004.xml
|
||||
+++ b/test/data/build_all1_00004.xml
|
||||
@@ -7,9 +7,10 @@
|
||||
<artifactManagement>
|
||||
<rule>
|
||||
<artifactGlob>
|
||||
- <artifactId>{*}</artifactId>
|
||||
+ <classifier>*?</classifier>
|
||||
</artifactGlob>
|
||||
- <targetPackage>@1</targetPackage>
|
||||
+ <optional>true</optional>
|
||||
+ <targetPackage>__noinstall</targetPackage>
|
||||
</rule>
|
||||
</artifactManagement>
|
||||
</configuration>
|
||||
diff --git a/test/data/build_all1_00005.xml b/test/data/build_all1_00005.xml
|
||||
new file mode 100644
|
||||
index 0000000..f12fd68
|
||||
--- /dev/null
|
||||
+++ b/test/data/build_all1_00005.xml
|
||||
@@ -0,0 +1,15 @@
|
||||
+<?xml version="1.0" ?>
|
||||
+<configuration xmlns="http://fedorahosted.org/xmvn/CONFIG/0.6.0">
|
||||
+
|
||||
+
|
||||
+
|
||||
+ <!--XMvn configuration file generated by javapackages.xmvn_config (part of javapackages-tools)-->
|
||||
+ <artifactManagement>
|
||||
+ <rule>
|
||||
+ <artifactGlob>
|
||||
+ <artifactId>{*}</artifactId>
|
||||
+ </artifactGlob>
|
||||
+ <targetPackage>@1</targetPackage>
|
||||
+ </rule>
|
||||
+ </artifactManagement>
|
||||
+</configuration>
|
||||
diff --git a/test/data/build_singleton1_00001.xml b/test/data/build_singleton1_00001.xml
|
||||
index f12fd68..1dd3da6 100644
|
||||
--- a/test/data/build_singleton1_00001.xml
|
||||
+++ b/test/data/build_singleton1_00001.xml
|
||||
@@ -7,9 +7,10 @@
|
||||
<artifactManagement>
|
||||
<rule>
|
||||
<artifactGlob>
|
||||
- <artifactId>{*}</artifactId>
|
||||
+ <classifier>*?</classifier>
|
||||
</artifactGlob>
|
||||
- <targetPackage>@1</targetPackage>
|
||||
+ <optional>true</optional>
|
||||
+ <targetPackage>__noinstall</targetPackage>
|
||||
</rule>
|
||||
</artifactManagement>
|
||||
</configuration>
|
||||
diff --git a/test/data/build_singleton1_00002.xml b/test/data/build_singleton1_00002.xml
|
||||
new file mode 100644
|
||||
index 0000000..f12fd68
|
||||
--- /dev/null
|
||||
+++ b/test/data/build_singleton1_00002.xml
|
||||
@@ -0,0 +1,15 @@
|
||||
+<?xml version="1.0" ?>
|
||||
+<configuration xmlns="http://fedorahosted.org/xmvn/CONFIG/0.6.0">
|
||||
+
|
||||
+
|
||||
+
|
||||
+ <!--XMvn configuration file generated by javapackages.xmvn_config (part of javapackages-tools)-->
|
||||
+ <artifactManagement>
|
||||
+ <rule>
|
||||
+ <artifactGlob>
|
||||
+ <artifactId>{*}</artifactId>
|
||||
+ </artifactGlob>
|
||||
+ <targetPackage>@1</targetPackage>
|
||||
+ </rule>
|
||||
+ </artifactManagement>
|
||||
+</configuration>
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: javapackages-tools
|
||||
Version: 3.2.4
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
|
||||
Summary: Macros and scripts for Java packaging support
|
||||
|
||||
@ -11,6 +11,10 @@ Source0: https://fedorahosted.org/released/javapackages/javapackages-%{ve
|
||||
# temporary for rebuild with classifier support
|
||||
Source1: google-guice-sisu-guice-noaop.xml
|
||||
|
||||
Patch001: 0001-xmvn_config-add-support-for-optional-rule-in-add_pac.patch
|
||||
Patch002: 0002-mvn_build-Do-not-install-artifacts-with-classifiers-.patch
|
||||
Patch003: 0003-test-Update-data-for-singleton-packaging.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: jpackage-utils
|
||||
@ -91,6 +95,9 @@ Requires: fedora-review
|
||||
|
||||
%prep
|
||||
%setup -q -n javapackages-%{version}
|
||||
%patch001 -p1
|
||||
%patch002 -p1
|
||||
%patch003 -p1
|
||||
|
||||
%build
|
||||
%configure
|
||||
@ -134,6 +141,9 @@ popd
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Sep 25 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.2.4-2
|
||||
- Fix installation of artifacts with classifier
|
||||
|
||||
* Tue Sep 24 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.2.4-1
|
||||
- Update to upstream version 3.2.4
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user