commit 85ad4fd3dbbfe136a8e8dca3b0d9aefb9e9cd875 Author: CentOS Sources Date: Tue May 17 04:49:38 2022 -0400 import maven-3.6.3-14.el9 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e352cb9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/apache-maven-3.6.3-src.tar.gz diff --git a/.maven.metadata b/.maven.metadata new file mode 100644 index 0000000..d344485 --- /dev/null +++ b/.maven.metadata @@ -0,0 +1 @@ +ccf441f3bf7f477301ebc80742cbda1da73c30a2 SOURCES/apache-maven-3.6.3-src.tar.gz diff --git a/SOURCES/0001-Adapt-mvn-script.patch b/SOURCES/0001-Adapt-mvn-script.patch new file mode 100644 index 0000000..a05e573 --- /dev/null +++ b/SOURCES/0001-Adapt-mvn-script.patch @@ -0,0 +1,52 @@ +From 247eafd819d6092661ebc57c54815acd20abd3de Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Wed, 1 Feb 2017 14:54:26 +0100 +Subject: [PATCH 1/4] Adapt mvn script + +--- + apache-maven/src/bin/mvn | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn +index a554c6617..739501af4 100755 +--- a/apache-maven/src/bin/mvn ++++ b/apache-maven/src/bin/mvn +@@ -22,7 +22,7 @@ + # + # Environment Variable Prerequisites + # +-# JAVA_HOME Must point at your Java Development Kit installation. ++# JAVA_HOME (Optional) Must point at your Java Development Kit installation. + # MAVEN_OPTS (Optional) Java runtime options used when Maven is executed. + # MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files. + # ----------------------------------------------------------------------------- +@@ -33,12 +33,16 @@ if [ -z "$MAVEN_SKIP_RC" ] ; then + . /etc/mavenrc + fi + ++ . /etc/java/maven.conf ++ + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + + fi + ++export JAVA_HOME ++ + # OS specific support. $var _must_ be set to either true or false. + cygwin=false; + mingw=false; +@@ -63,7 +67,8 @@ done + + saveddir=`pwd` + +-MAVEN_HOME=`dirname "$PRG"`/.. ++MAVEN_HOME="${_FEDORA_MAVEN_HOME:-`dirname "$PRG"`/..}" ++unset _FEDORA_MAVEN_HOME + + # make it fully qualified + MAVEN_HOME=`cd "$MAVEN_HOME" && pwd` +-- +2.21.0 + diff --git a/SOURCES/0002-Invoke-logback-via-reflection.patch b/SOURCES/0002-Invoke-logback-via-reflection.patch new file mode 100644 index 0000000..863977d --- /dev/null +++ b/SOURCES/0002-Invoke-logback-via-reflection.patch @@ -0,0 +1,53 @@ +From 7610a10691e680db00edcbd4ce6767a30641cd71 Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Tue, 6 Jun 2017 13:47:43 +0200 +Subject: [PATCH 2/4] Invoke logback via reflection + +--- + .../logging/impl/LogbackConfiguration.java | 19 ++++++++++++++----- + 1 file changed, 14 insertions(+), 5 deletions(-) + +diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/LogbackConfiguration.java b/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/LogbackConfiguration.java +index 5d9fab744..ced38cb5a 100644 +--- a/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/LogbackConfiguration.java ++++ b/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/LogbackConfiguration.java +@@ -35,22 +35,31 @@ + @Override + public void setRootLoggerLevel( Level level ) + { +- ch.qos.logback.classic.Level value; ++ String value; + switch ( level ) + { + case DEBUG: +- value = ch.qos.logback.classic.Level.DEBUG; ++ value = "DEBUG"; + break; + + case INFO: +- value = ch.qos.logback.classic.Level.INFO; ++ value = "INFO"; + break; + + default: +- value = ch.qos.logback.classic.Level.ERROR; ++ value = "ERROR"; + break; + } +- ( (ch.qos.logback.classic.Logger) LoggerFactory.getLogger( Logger.ROOT_LOGGER_NAME ) ).setLevel( value ); ++ Logger logger = LoggerFactory.getLogger( Logger.ROOT_LOGGER_NAME ); ++ try { ++ Class levelClass = Class.forName("ch.qos.logback.classic.Level"); ++ Object logbackLevel = levelClass.getField(value).get(null); ++ Class loggerClass = Class.forName("ch.qos.logback.classic.Logger"); ++ loggerClass.getMethod("setLevel", new Class[] {levelClass}) ++ .invoke(logger, new Object[] {logbackLevel}); ++ } catch (Exception e) { ++ throw new RuntimeException("Failed to initialize logback configuration", e); ++ } + } + + @Override +-- +2.21.0 + diff --git a/SOURCES/0003-Use-non-shaded-HTTP-wagon.patch b/SOURCES/0003-Use-non-shaded-HTTP-wagon.patch new file mode 100644 index 0000000..d61abb3 --- /dev/null +++ b/SOURCES/0003-Use-non-shaded-HTTP-wagon.patch @@ -0,0 +1,51 @@ +From c8933d155694ce37b1d4be59a744c8f7cbde6bb5 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 82e12a3..f02a45e 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 +- +- + + +