Avoid manually symlinking required libraries
This commit is contained in:
parent
438f14fe7f
commit
b84a3416e5
@ -1,7 +1,7 @@
|
||||
From 9e51d86115b066cbf3d44392810b3f6fd63fdfc9 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Simacek <msimacek@redhat.com>
|
||||
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 ++++++++++++++++---
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 4fa2cfaa19a0752a656b2a223a77c3af25d2de12 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Simacek <msimacek@redhat.com>
|
||||
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 ++++++++++++++-----
|
||||
|
@ -1,7 +1,7 @@
|
||||
From c533aada209c517c1666989d7115672e7522aa72 Mon Sep 17 00:00:00 2001
|
||||
From: Sylwester Lachiewicz <slachiewicz@apache.org>
|
||||
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.
|
||||
|
51
0004-Use-non-shaded-HTTP-wagon.patch
Normal file
51
0004-Use-non-shaded-HTTP-wagon.patch
Normal file
@ -0,0 +1,51 @@
|
||||
From 59092ee77227c480d3665d62554f0f0023d8a6c7 Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
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.
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-http</artifactId>
|
||||
- <classifier>shaded</classifier>
|
||||
- <exclusions>
|
||||
- <exclusion>
|
||||
- <groupId>org.apache.httpcomponents</groupId>
|
||||
- <artifactId>httpclient</artifactId>
|
||||
- </exclusion>
|
||||
- <exclusion>
|
||||
- <groupId>org.apache.httpcomponents</groupId>
|
||||
- <artifactId>httpcore</artifactId>
|
||||
- </exclusion>
|
||||
- <exclusion>
|
||||
- <groupId>org.apache.maven.wagon</groupId>
|
||||
- <artifactId>wagon-http-shared</artifactId>
|
||||
- </exclusion>
|
||||
- </exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
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.
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-http</artifactId>
|
||||
<version>${wagonVersion}</version>
|
||||
- <classifier>shaded</classifier>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-logging</groupId>
|
||||
--
|
||||
2.21.0
|
||||
|
87
maven.spec
87
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}
|
||||
|
Loading…
Reference in New Issue
Block a user