diff --git a/0001-Adapt-mvn-script.patch b/0001-Adapt-mvn-script.patch index aeac507..e62d186 100644 --- a/0001-Adapt-mvn-script.patch +++ b/0001-Adapt-mvn-script.patch @@ -1,7 +1,7 @@ From 9e51d86115b066cbf3d44392810b3f6fd63fdfc9 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Wed, 1 Feb 2017 14:54:26 +0100 -Subject: [PATCH 1/3] Adapt mvn script +Subject: [PATCH 1/4] Adapt mvn script --- apache-maven/src/bin/mvn | 19 ++++++++++++++++--- diff --git a/0002-Invoke-logback-via-reflection.patch b/0002-Invoke-logback-via-reflection.patch index 4ab9c09..44c017e 100644 --- a/0002-Invoke-logback-via-reflection.patch +++ b/0002-Invoke-logback-via-reflection.patch @@ -1,7 +1,7 @@ From 4fa2cfaa19a0752a656b2a223a77c3af25d2de12 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Tue, 6 Jun 2017 13:47:43 +0200 -Subject: [PATCH 2/3] Invoke logback via reflection +Subject: [PATCH 2/4] Invoke logback via reflection --- .../logging/impl/LogbackConfiguration.java | 19 ++++++++++++++----- diff --git a/0003-MNG-6642-Revert-MNG-5995-Remove-dependency-to-maven-.patch b/0003-MNG-6642-Revert-MNG-5995-Remove-dependency-to-maven-.patch index 6d517b1..47cc1bd 100644 --- a/0003-MNG-6642-Revert-MNG-5995-Remove-dependency-to-maven-.patch +++ b/0003-MNG-6642-Revert-MNG-5995-Remove-dependency-to-maven-.patch @@ -1,7 +1,7 @@ From c533aada209c517c1666989d7115672e7522aa72 Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Sat, 13 Oct 2018 04:16:44 +0200 -Subject: [PATCH 3/3] [MNG-6642] Revert "[MNG-5995] Remove dependency to +Subject: [PATCH 3/4] [MNG-6642] Revert "[MNG-5995] Remove dependency to maven-compat (#185)" This partially reverts commit bb3ec5da71d26d105972392f0a20bc61bc5d8c53 to restore working with Tycho P2 repository. diff --git a/0004-Use-non-shaded-HTTP-wagon.patch b/0004-Use-non-shaded-HTTP-wagon.patch new file mode 100644 index 0000000..5b2dcd6 --- /dev/null +++ b/0004-Use-non-shaded-HTTP-wagon.patch @@ -0,0 +1,51 @@ +From 59092ee77227c480d3665d62554f0f0023d8a6c7 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Mon, 1 Jul 2019 09:51:56 +0200 +Subject: [PATCH 4/4] Use non-shaded HTTP wagon + +--- + apache-maven/pom.xml | 15 --------------- + pom.xml | 1 - + 2 files changed, 16 deletions(-) + +diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml +index 2686570af..d22ae121d 100644 +--- a/apache-maven/pom.xml ++++ b/apache-maven/pom.xml +@@ -63,21 +63,6 @@ under the License. + + org.apache.maven.wagon + wagon-http +- shaded +- +- +- org.apache.httpcomponents +- httpclient +- +- +- org.apache.httpcomponents +- httpcore +- +- +- org.apache.maven.wagon +- wagon-http-shared +- +- + + + org.slf4j +diff --git a/pom.xml b/pom.xml +index 237cdc39e..85436c54d 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -324,7 +324,6 @@ under the License. + org.apache.maven.wagon + wagon-http + ${wagonVersion} +- shaded + + + commons-logging +-- +2.21.0 + diff --git a/maven.spec b/maven.spec index be4e5ce..f5bbbac 100644 --- a/maven.spec +++ b/maven.spec @@ -22,6 +22,7 @@ Patch1: 0001-Adapt-mvn-script.patch # Used only when %%without logback is in effect Patch2: 0002-Invoke-logback-via-reflection.patch Patch3: 0003-MNG-6642-Revert-MNG-5995-Remove-dependency-to-maven-.patch +Patch4: 0004-Use-non-shaded-HTTP-wagon.patch BuildRequires: maven-local BuildRequires: %{?module_prefix}mvn(com.google.inject:guice::no_aop:) @@ -41,8 +42,8 @@ BuildRequires: %{?module_prefix}mvn(org.apache.maven.resolver:maven-resolver-sp BuildRequires: %{?module_prefix}mvn(org.apache.maven.resolver:maven-resolver-transport-wagon) BuildRequires: %{?module_prefix}mvn(org.apache.maven.resolver:maven-resolver-util) BuildRequires: %{?module_prefix}mvn(org.apache.maven.shared:maven-shared-utils) -BuildRequires: mvn(org.apache.maven.wagon:wagon-file) -BuildRequires: mvn(org.apache.maven.wagon:wagon-http::shaded:) +BuildRequires: %{?module_prefix}mvn(org.apache.maven.wagon:wagon-file) +BuildRequires: %{?module_prefix}mvn(org.apache.maven.wagon:wagon-http) BuildRequires: %{?module_prefix}mvn(org.apache.maven.wagon:wagon-provider-api) BuildRequires: mvn(org.codehaus.modello:modello-maven-plugin) >= 1.10.0 BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) @@ -54,11 +55,11 @@ BuildRequires: %{?module_prefix}mvn(org.codehaus.plexus:plexus-utils) >= 3.2.0 BuildRequires: %{?module_prefix}mvn(org.eclipse.sisu:org.eclipse.sisu.inject) BuildRequires: %{?module_prefix}mvn(org.eclipse.sisu:org.eclipse.sisu.plexus) BuildRequires: mvn(org.eclipse.sisu:sisu-maven-plugin) -BuildRequires: mvn(org.fusesource.jansi:jansi) +BuildRequires: %{?module_prefix}mvn(org.fusesource.jansi:jansi) BuildRequires: mvn(org.mockito:mockito-core) >= 2 -BuildRequires: mvn(org.slf4j:jcl-over-slf4j) +BuildRequires: %{?module_prefix}mvn(org.slf4j:jcl-over-slf4j) BuildRequires: %{?module_prefix}mvn(org.slf4j:slf4j-api) -BuildRequires: mvn(org.slf4j:slf4j-simple) +BuildRequires: %{?module_prefix}mvn(org.slf4j:slf4j-simple) BuildRequires: %{?module_prefix}mvn(org.sonatype.plexus:plexus-cipher) BuildRequires: %{?module_prefix}mvn(org.sonatype.plexus:plexus-sec-dispatcher) BuildRequires: mvn(org.xmlunit:xmlunit-core) @@ -66,35 +67,6 @@ BuildRequires: mvn(org.xmlunit:xmlunit-matchers) BuildRequires: slf4j-sources = %{bundled_slf4j_version} -BuildRequires: %{?module_prefix}aopalliance -BuildRequires: %{?module_prefix}apache-commons-cli -BuildRequires: %{?module_prefix}apache-commons-codec -BuildRequires: %{?module_prefix}apache-commons-io -BuildRequires: %{?module_prefix}apache-commons-lang3 -BuildRequires: %{?module_prefix}apache-commons-logging -BuildRequires: %{?module_prefix}atinject -BuildRequires: %{?module_prefix}cdi-api -BuildRequires: %{?module_prefix}geronimo-annotation -BuildRequires: %{?module_prefix}google-guice -BuildRequires: %{?module_prefix}guava -BuildRequires: %{?module_prefix}hawtjni-runtime -BuildRequires: %{?module_prefix}httpcomponents-client -BuildRequires: %{?module_prefix}httpcomponents-core -BuildRequires: %{?module_prefix}jansi -BuildRequires: %{?module_prefix}jansi-native -BuildRequires: %{?module_prefix}jcl-over-slf4j -BuildRequires: %{?module_prefix}maven-resolver -BuildRequires: %{?module_prefix}maven-shared-utils -BuildRequires: %{?module_prefix}maven-wagon -BuildRequires: %{?module_prefix}plexus-cipher -BuildRequires: %{?module_prefix}plexus-classworlds -BuildRequires: %{?module_prefix}plexus-containers-component-annotations -BuildRequires: %{?module_prefix}plexus-interpolation -BuildRequires: %{?module_prefix}plexus-sec-dispatcher -BuildRequires: %{?module_prefix}plexus-utils -BuildRequires: %{?module_prefix}sisu -BuildRequires: %{?module_prefix}slf4j - Requires: %{?module_prefix}%{name}-lib = %{epoch}:%{version}-%{release} Requires(post): (alternatives if fedora-release >= 30 else chkconfig) @@ -104,41 +76,6 @@ Requires(postun): (alternatives if fedora-release >= 30 else chkconfig) # workflow requires full JDK, so we recommend it here. Recommends: java-devel -# XMvn does generate auto-requires, but explicit requires are still -# needed because some symlinked JARs are not present in Maven POMs or -# their dependency scope prevents them from being added automatically -# by XMvn. It would be possible to explicitly specify only -# dependencies which are not generated automatically, but adding -# everything seems to be easier. -Requires: %{?module_prefix}aopalliance -Requires: %{?module_prefix}apache-commons-cli -Requires: %{?module_prefix}apache-commons-codec -Requires: %{?module_prefix}apache-commons-io -Requires: %{?module_prefix}apache-commons-lang3 -Requires: %{?module_prefix}apache-commons-logging -Requires: %{?module_prefix}atinject -Requires: %{?module_prefix}cdi-api -Requires: %{?module_prefix}geronimo-annotation -Requires: %{?module_prefix}google-guice -Requires: %{?module_prefix}guava -Requires: %{?module_prefix}hawtjni-runtime -Requires: %{?module_prefix}httpcomponents-client -Requires: %{?module_prefix}httpcomponents-core -Requires: %{?module_prefix}jansi -Requires: %{?module_prefix}jansi-native -Requires: %{?module_prefix}jcl-over-slf4j -Requires: %{?module_prefix}maven-resolver -Requires: %{?module_prefix}maven-shared-utils -Requires: %{?module_prefix}maven-wagon -Requires: %{?module_prefix}plexus-cipher -Requires: %{?module_prefix}plexus-classworlds -Requires: %{?module_prefix}plexus-containers-component-annotations -Requires: %{?module_prefix}plexus-interpolation -Requires: %{?module_prefix}plexus-sec-dispatcher -Requires: %{?module_prefix}plexus-utils -Requires: %{?module_prefix}sisu -Requires: %{?module_prefix}slf4j - %description Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, @@ -171,6 +108,7 @@ Core part of Apache Maven that can be used as a library. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 # not really used during build, but a precaution find -name '*.jar' -not -path '*/test/*' -delete @@ -223,17 +161,6 @@ install -d -m 755 %{buildroot}%{_datadir}/bash-completion/completions/ cp -a $M2_HOME/{bin,lib,boot} %{buildroot}%{homedir}/ xmvn-subst -R %{buildroot} -s %{buildroot}%{homedir} -# Transitive deps of wagon-http, missing because of unshading -build-jar-repository -s -p %{buildroot}%{homedir}/lib \ - commons-{codec,logging} httpcomponents/{httpclient,httpcore} maven-wagon/http-shared - -# Transitive deps of cdi-api that should have been excluded -rm %{buildroot}%{homedir}/lib/jboss-interceptors*.jar -rm %{buildroot}%{homedir}/lib/javax.el-api*.jar - -# Native lib whose extraction we suppressed -ln -s %{_jnidir}/jansi-native/jansi-linux.jar %{buildroot}%{homedir}/lib/ - install -p -m 644 %{SOURCE2} %{buildroot}%{homedir}/bin/ gzip -9 %{buildroot}%{homedir}/bin/mvn.1 install -p -m 644 %{SOURCE1} %{buildroot}%{_datadir}/bash-completion/completions/mvn%{?maven_version_suffix}