From 9a8f01dfd96f906f285950685876039f89db9e8e Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 7 May 2019 02:45:26 -0400 Subject: [PATCH] import os-maven-plugin-1.2.3-9.module+el8+2598+06babf2e --- .gitignore | 1 + .os-maven-plugin.metadata | 1 + .../0001-Port-to-current-plexus-utils.patch | 25 +++++ SOURCES/0002-Don-t-fail-on-unknown-arch.patch | 25 +++++ SPECS/os-maven-plugin.spec | 95 +++++++++++++++++++ 5 files changed, 147 insertions(+) create mode 100644 .gitignore create mode 100644 .os-maven-plugin.metadata create mode 100644 SOURCES/0001-Port-to-current-plexus-utils.patch create mode 100644 SOURCES/0002-Don-t-fail-on-unknown-arch.patch create mode 100644 SPECS/os-maven-plugin.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5822efb --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/os-maven-plugin-1.2.3.Final.tar.gz diff --git a/.os-maven-plugin.metadata b/.os-maven-plugin.metadata new file mode 100644 index 0000000..4142adf --- /dev/null +++ b/.os-maven-plugin.metadata @@ -0,0 +1 @@ +0331d865e2c685c9cd83dbbe6b632a86a43e811c SOURCES/os-maven-plugin-1.2.3.Final.tar.gz diff --git a/SOURCES/0001-Port-to-current-plexus-utils.patch b/SOURCES/0001-Port-to-current-plexus-utils.patch new file mode 100644 index 0000000..3e8e3bc --- /dev/null +++ b/SOURCES/0001-Port-to-current-plexus-utils.patch @@ -0,0 +1,25 @@ +From aa0c713f3b8363f4c7781ed5aec52ad0bf607508 Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Mon, 30 Mar 2015 15:40:16 +0200 +Subject: [PATCH 1/2] Port to current plexus-utils + +--- + src/main/java/kr/motd/maven/os/DetectExtension.java | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/main/java/kr/motd/maven/os/DetectExtension.java b/src/main/java/kr/motd/maven/os/DetectExtension.java +index 88c5e61..9ebe6dd 100644 +--- a/src/main/java/kr/motd/maven/os/DetectExtension.java ++++ b/src/main/java/kr/motd/maven/os/DetectExtension.java +@@ -180,7 +180,7 @@ public class DetectExtension extends AbstractMavenLifecycleParticipant { + break; + } + +- InterpolationFilterReader reader = new InterpolationFilterReader(new StringReader(value), dict); ++ InterpolationFilterReader reader = new InterpolationFilterReader(new StringReader(value), (Map)dict); + StringWriter writer = new StringWriter(value.length()); + for (;;) { + int ch = 0; +-- +2.1.0 + diff --git a/SOURCES/0002-Don-t-fail-on-unknown-arch.patch b/SOURCES/0002-Don-t-fail-on-unknown-arch.patch new file mode 100644 index 0000000..ad45e41 --- /dev/null +++ b/SOURCES/0002-Don-t-fail-on-unknown-arch.patch @@ -0,0 +1,25 @@ +From b11d31e037120c3ee761276574f408005a78f632 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Wed, 15 Jul 2015 18:39:46 +0200 +Subject: [PATCH 2/2] Don't fail on unknown arch + +--- + src/main/java/kr/motd/maven/os/Detector.java | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/main/java/kr/motd/maven/os/Detector.java b/src/main/java/kr/motd/maven/os/Detector.java +index 9dd6688..37ced72 100644 +--- a/src/main/java/kr/motd/maven/os/Detector.java ++++ b/src/main/java/kr/motd/maven/os/Detector.java +@@ -46,7 +46,7 @@ public abstract class Detector { + setProperty(props, DETECTED_CLASSIFIER, detectedClassifier); + + final String failOnUnknownOS = allProps.getProperty("failOnUnknownOS"); +- if (failOnUnknownOS == null || !failOnUnknownOS.equalsIgnoreCase("false")) { ++ if (failOnUnknownOS != null && failOnUnknownOS.equalsIgnoreCase("true")) { + if (UNKNOWN.equals(detectedName)) { + throw new DetectionException("unknown os.name: " + osName); + } +-- +2.1.0 + diff --git a/SPECS/os-maven-plugin.spec b/SPECS/os-maven-plugin.spec new file mode 100644 index 0000000..e3a6011 --- /dev/null +++ b/SPECS/os-maven-plugin.spec @@ -0,0 +1,95 @@ +%global vertag Final + +Name: os-maven-plugin +Version: 1.2.3 +Release: 9%{?dist} +Summary: Maven plugin for generating platform-dependent properties +License: ASL 2.0 +URL: https://github.com/trustin/os-maven-plugin/ +BuildArch: noarch + +Source0: https://github.com/trustin/%{name}/archive/%{name}-%{version}.Final.tar.gz + +Patch0: 0001-Port-to-current-plexus-utils.patch +Patch1: 0002-Don-t-fail-on-unknown-arch.patch + +BuildRequires: maven-local +BuildRequires: mvn(junit:junit) +BuildRequires: mvn(org.apache.maven:maven-core) +BuildRequires: mvn(org.apache.maven:maven-plugin-api) +BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) +BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations) +BuildRequires: mvn(org.codehaus.plexus:plexus-component-metadata) +BuildRequires: mvn(org.codehaus.plexus:plexus-utils) +BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) + +%description +os-maven-plugin is a Maven extension/plugin that generates various +useful platform-dependent project properties normalized from +${os.name} and ${os.arch}. + +${os.name} and ${os.arch} are often subtly different between JVM and +operating system versions or they sometimes contain machine-unfriendly +characters such as whitespaces. This plugin tries to remove such +fragmentation so that you can determine the current operating system +and architecture reliably. + +%package javadoc +Summary: API documentation for %{name} + +%description javadoc +This package provides %{summary}. + +%prep +%setup -q -n %{name}-%{name}-%{version}.%{vertag} + +%patch0 -p1 +%patch1 -p1 + +# Remove Eclipse plugin (not needed in Fedora) +%pom_remove_dep org.eclipse:ui +%pom_remove_plugin :maven-jar-plugin +find -name EclipseStartup.java -delete +find -name plugin.xml -delete + +%build +%mvn_build + +%install +%mvn_install + +%files -f .mfiles +%dir %{_javadir}/%{name} +%dir %{_mavenpomdir}/%{name} +%doc LICENSE.txt + +%files javadoc -f .mfiles-javadoc +%doc LICENSE.txt + +%changelog +* Thu Feb 08 2018 Fedora Release Engineering - 1.2.3-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.2.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 1.2.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Jun 15 2016 Mikolaj Izdebski - 1.2.3-6 +- Regenerate build-requires + +* Thu Feb 04 2016 Fedora Release Engineering - 1.2.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jul 15 2015 Mikolaj Izdebski - 1.2.3-4 +- Don't fail on unknown arch + +* Thu Jun 18 2015 Fedora Release Engineering - 1.2.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon Mar 30 2015 Michael Simacek - 1.2.3-2 +- Port to current plexus-utils + +* Tue Jul 8 2014 Mikolaj Izdebski - 1.2.3-1 +- Initial pagkaging