Compare commits

...

No commits in common. 'c9' and 'i10cs' have entirely different histories.
c9 ... i10cs

2
.gitignore vendored

@ -1 +1 @@
SOURCES/apache-maven-3.6.3-src.tar.gz
SOURCES/apache-maven-3.9.6-src.tar.gz

@ -1 +1 @@
ccf441f3bf7f477301ebc80742cbda1da73c30a2 SOURCES/apache-maven-3.6.3-src.tar.gz
6fae0076bce060f6a4a4c860676a9d775984ea51 SOURCES/apache-maven-3.9.6-src.tar.gz

@ -1,14 +1,14 @@
From 247eafd819d6092661ebc57c54815acd20abd3de Mon Sep 17 00:00:00 2001
From abda3bfec41730810ee98e685b128f27ddc24c36 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/4] Adapt mvn script
Subject: [PATCH 1/3] Adapt mvn script
---
apache-maven/src/bin/mvn | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
apache-maven/src/bin/mvn | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index a554c6617..739501af4 100755
index a3004f917..9b118717e 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -22,7 +22,7 @@
@ -17,15 +17,23 @@ index a554c6617..739501af4 100755
#
-# JAVA_HOME Must point at your Java Development Kit installation.
+# JAVA_HOME (Optional) Must point at your Java Development Kit installation.
# MAVEN_ARGS (Optional) Arguments passed to Maven before CLI arguments.
# 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,18 @@ if [ -z "$MAVEN_SKIP_RC" ] ; then
@@ -30,20 +30,22 @@
if [ -z "$MAVEN_SKIP_RC" ] ; then
- if [ -f /usr/local/etc/mavenrc ] ; then
- . /usr/local/etc/mavenrc
- fi
-
if [ -f /etc/mavenrc ] ; then
. /etc/mavenrc
fi
+ if [ -z "$JAVA_HOME" ] ; then
+ . /etc/java/maven.conf
+ . /etc/java/maven@{maven_version_suffix}.conf
+ fi
+
if [ -f "$HOME/.mavenrc" ] ; then
@ -39,7 +47,7 @@ index a554c6617..739501af4 100755
# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
mingw=false;
@@ -63,7 +67,8 @@ done
@@ -68,7 +70,8 @@ done
saveddir=`pwd`
@ -50,5 +58,5 @@ index a554c6617..739501af4 100755
# make it fully qualified
MAVEN_HOME=`cd "$MAVEN_HOME" && pwd`
--
2.21.0
2.39.2

@ -1,24 +1,23 @@
From 7610a10691e680db00edcbd4ce6767a30641cd71 Mon Sep 17 00:00:00 2001
From a59ddba0d41b0ba1ea9c8c6ac541a71d737cdf30 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/4] Invoke logback via reflection
Subject: [PATCH 2/3] Invoke logback via reflection
---
.../logging/impl/LogbackConfiguration.java | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
.../cli/logging/impl/LogbackConfiguration.java | 18 +++++++++++++-----
1 file changed, 13 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
index 4dc5a37b8..a977ba085 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 @@
@@ -31,21 +31,29 @@
public class LogbackConfiguration extends BaseSlf4jConfiguration {
@Override
public void setRootLoggerLevel( Level level )
{
public void setRootLoggerLevel(Level level) {
- ch.qos.logback.classic.Level value;
+ String value;
switch ( level )
{
switch (level) {
case DEBUG:
- value = ch.qos.logback.classic.Level.DEBUG;
+ value = "DEBUG";
@ -34,14 +33,13 @@ index 5d9fab744..ced38cb5a 100644
+ value = "ERROR";
break;
}
- ( (ch.qos.logback.classic.Logger) LoggerFactory.getLogger( Logger.ROOT_LOGGER_NAME ) ).setLevel( value );
+ Logger logger = LoggerFactory.getLogger( Logger.ROOT_LOGGER_NAME );
- ((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});
+ loggerClass.getMethod("setLevel", new Class<?>[] {levelClass}).invoke(logger, new Object[] {logbackLevel});
+ } catch (Exception e) {
+ throw new RuntimeException("Failed to initialize logback configuration", e);
+ }
@ -49,5 +47,5 @@ index 5d9fab744..ced38cb5a 100644
@Override
--
2.21.0
2.39.2

@ -0,0 +1,89 @@
From ad1e669b96a5d251c36384e89d535b9c712a6246 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Thu, 5 Sep 2019 15:21:04 +0200
Subject: [PATCH 3/3] Remove dependency on powermock
---
.../StringSearchModelInterpolatorTest.java | 59 -------------------
1 file changed, 59 deletions(-)
diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java
index b2612e540..20b7162e2 100644
--- a/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java
+++ b/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java
@@ -35,8 +35,6 @@
import static org.hamcrest.CoreMatchers.anyOf;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
-import static org.powermock.reflect.Whitebox.getField;
-import static org.powermock.reflect.Whitebox.getInternalState;
/**
* @author jdcasey
@@ -344,63 +342,6 @@ public void testInterpolateObjectWithPomFile() throws Exception {
is(System.getProperty("user.dir") + File.separator + '.' + File.separator + "target"))));
}
- public void testNotInterpolateObjectWithFile() throws Exception {
- Model model = new Model();
-
- File baseDir = new File(System.getProperty("user.dir"));
-
- Properties p = new Properties();
-
- ObjectWithNotInterpolatedFile obj = new ObjectWithNotInterpolatedFile(baseDir);
-
- StringSearchModelInterpolator interpolator = (StringSearchModelInterpolator) createInterpolator();
-
- ModelBuildingRequest config = createModelBuildingRequest(p);
-
- SimpleProblemCollector collector = new SimpleProblemCollector();
- interpolator.interpolateObject(obj, model, new File("."), config, collector);
- assertProblemFree(collector);
-
- //noinspection unchecked
- Map<Class<?>, ?> cache = (Map<Class<?>, ?>)
- getField(StringSearchModelInterpolator.class, "CACHED_ENTRIES").get(null);
-
- Object objCacheItem = cache.get(Object.class);
- Object fileCacheItem = cache.get(File.class);
-
- assertNotNull(objCacheItem);
- assertNotNull(fileCacheItem);
-
- assertThat(((Object[]) getInternalState(objCacheItem, "fields")).length, is(0));
- assertThat(((Object[]) getInternalState(fileCacheItem, "fields")).length, is(0));
- }
-
- public void testNotInterpolateFile() throws Exception {
- Model model = new Model();
-
- File baseDir = new File(System.getProperty("user.dir"));
-
- Properties p = new Properties();
-
- StringSearchModelInterpolator interpolator = (StringSearchModelInterpolator) createInterpolator();
-
- ModelBuildingRequest config = createModelBuildingRequest(p);
-
- SimpleProblemCollector collector = new SimpleProblemCollector();
- interpolator.interpolateObject(baseDir, model, new File("."), config, collector);
- assertProblemFree(collector);
-
- //noinspection unchecked
- Map<Class<?>, ?> cache = (Map<Class<?>, ?>)
- getField(StringSearchModelInterpolator.class, "CACHED_ENTRIES").get(null);
-
- Object fileCacheItem = cache.get(File.class);
-
- assertNotNull(fileCacheItem);
-
- assertThat(((Object[]) getInternalState(fileCacheItem, "fields")).length, is(0));
- }
-
public void testConcurrentInterpolation() throws Exception {
final Model model = new Model();
--
2.39.2

@ -1,51 +0,0 @@
From c8933d155694ce37b1d4be59a744c8f7cbde6bb5 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 82e12a3..f02a45e 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>
<!-- this is included in Wagon Http
diff --git a/pom.xml b/pom.xml
index 44e287a..cdef69c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -328,7 +328,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.24.1

@ -1,96 +0,0 @@
From f6eb583525c7f777bde16182c57a47345fd53cb0 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Thu, 5 Sep 2019 15:21:04 +0200
Subject: [PATCH] Remove dependency on powermock
---
.../StringSearchModelInterpolatorTest.java | 66 -------------------
1 file changed, 66 deletions(-)
diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java
index 45800d6..fbf3b23 100644
--- a/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java
+++ b/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java
@@ -36,8 +36,6 @@ import java.util.concurrent.FutureTask;
import static org.hamcrest.CoreMatchers.anyOf;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
-import static org.powermock.reflect.Whitebox.getField;
-import static org.powermock.reflect.Whitebox.getInternalState;
/**
* @author jdcasey
@@ -374,70 +372,6 @@ public class StringSearchModelInterpolatorTest
) ) );
}
- public void testNotInterpolateObjectWithFile()
- throws Exception
- {
- Model model = new Model();
-
- File baseDir = new File( System.getProperty( "user.dir" ) );
-
- Properties p = new Properties();
-
- ObjectWithNotInterpolatedFile obj = new ObjectWithNotInterpolatedFile( baseDir );
-
- StringSearchModelInterpolator interpolator = (StringSearchModelInterpolator) createInterpolator();
-
- ModelBuildingRequest config = createModelBuildingRequest( p );
-
- SimpleProblemCollector collector = new SimpleProblemCollector();
- interpolator.interpolateObject( obj, model, new File( "." ), config, collector );
- assertProblemFree( collector );
-
- //noinspection unchecked
- Map<Class<?>, ?> cache =
- (Map<Class<?>, ?>) getField( StringSearchModelInterpolator.class, "CACHED_ENTRIES" )
- .get( null );
-
- Object objCacheItem = cache.get( Object.class );
- Object fileCacheItem = cache.get( File.class );
-
- assertNotNull( objCacheItem );
- assertNotNull( fileCacheItem );
-
- assertThat( ( (Object[]) getInternalState( objCacheItem, "fields" ) ).length, is( 0 ) );
- assertThat( ( (Object[]) getInternalState( fileCacheItem, "fields" ) ).length, is( 0 ) );
- }
-
- public void testNotInterpolateFile()
- throws Exception
- {
- Model model = new Model();
-
- File baseDir = new File( System.getProperty( "user.dir" ) );
-
- Properties p = new Properties();
-
- StringSearchModelInterpolator interpolator = (StringSearchModelInterpolator) createInterpolator();
-
- ModelBuildingRequest config = createModelBuildingRequest( p );
-
- SimpleProblemCollector collector = new SimpleProblemCollector();
- interpolator.interpolateObject( baseDir, model, new File( "." ), config, collector );
- assertProblemFree( collector );
-
- //noinspection unchecked
- Map<Class<?>, ?> cache =
- (Map<Class<?>, ?>) getField( StringSearchModelInterpolator.class, "CACHED_ENTRIES" )
- .get( null );
-
- Object fileCacheItem = cache.get( File.class );
-
- assertNotNull( fileCacheItem );
-
- assertThat( ( (Object[]) getInternalState( fileCacheItem, "fields" ) ).length, is( 0 ) );
- }
-
-
public void testConcurrentInterpolation()
throws Exception
{
--
2.24.1

@ -1,4 +1,4 @@
.TH MVN "1" "April 2015" "Apache Maven 3.3.1" "User Commands"
.TH MVN "1" "March 2023" "Apache Maven 3.9.1" "User Commands"
.SH NAME
mvn \- software project management and comprehension tool
.SH DESCRIPTION
@ -18,7 +18,7 @@ projects on the list
.TP
\fB\-B\fR,\-\-batch\-mode
Run in non\-interactive (batch)
mode
mode (disables output color)
.TP
\fB\-b\fR,\-\-builder <arg>
The id of the build strategy to
@ -31,12 +31,17 @@ match
\fB\-c\fR,\-\-lax\-checksums
Warn if checksums don't match
.TP
\fB\-\-color
Defines the color mode of the
output. Supported are \'auto\',
\'always\', \'never\'.
.TP
\fB\-cpu\fR,\-\-check\-plugin\-updates
Ineffective, only kept for
backward compatibility
.TP
\fB\-D\fR,\-\-define <arg>
Define a system property
Define a user property
.TP
\fB\-e\fR,\-\-errors
Produce execution error messages
@ -49,7 +54,7 @@ Encrypt server password
.TP
\fB\-f\fR,\-\-file <arg>
Force the use of an alternate POM
file (or directory with pom.xml).
file (or directory with pom.xml)
.TP
\fB\-fae\fR,\-\-fail\-at\-end
Only fail the build afterwards;
@ -76,15 +81,12 @@ toolchains file
Display help information
.TP
\fB\-l\fR,\-\-log\-file <arg>
Log file to where all build output
will go.
Log file where all build output
will go (disables output color)
.TP
\fB\-llr\fR,\-\-legacy\-local\-repository
Use Maven 2 Legacy Local
Repository behaviour, ie no use of
_remote.repositories. Can also be
activated by using
\fB\-Dmaven\fR.legacyLocalRepo=true
UNSUPPORTED: Use of this option
will make Maven invocation fail.
.TP
\fB\-N\fR,\-\-non\-recursive
Do not recurse into sub\-projects
@ -100,6 +102,10 @@ backward compatibility
\fB\-nsu\fR,\-\-no\-snapshot\-updates
Suppress SNAPSHOT updates
.TP
\fB\-ntp\fR,\-\-no\-transfer\-progress
Do not display transfer progress
when downloading or uploading
.TP
\fB\-o\fR,\-\-offline
Work offline
.TP
@ -112,7 +118,7 @@ Comma\-delimited list of specified
reactor projects to build instead
of all projects. A project can be
specified by [groupId]:artifactId
or by its relative path.
or by its relative path
.TP
\fB\-q\fR,\-\-quiet
Quiet output \- only show errors
@ -125,14 +131,15 @@ project
Alternate path for the user
settings file
.TP
\fB\-T\fR,\-\-threads <arg>
Thread count, for instance 2.0C
where C is core multiplied
.TP
\fB\-t\fR,\-\-toolchains <arg>
Alternate path for the user
toolchains file
.TP
\fB\-T\fR,\-\-threads <arg>
Thread count, for instance 4 (int)
or 2C/2.5C (int/float) where C is
core multiplied
.TP
\fB\-U\fR,\-\-update\-snapshots
Forces a check for missing
releases and updated snapshots on
@ -142,12 +149,12 @@ remote repositories
Ineffective, only kept for
backward compatibility
.TP
\fB\-V\fR,\-\-show\-version
\fB\-v\fR,\-\-version
Display version information
WITHOUT stopping build
.TP
\fB\-v\fR,\-\-version
\fB\-V\fR,\-\-show\-version
Display version information
WITHOUT stopping build
.TP
\fB\-X\fR,\-\-debug
Produce execution debug output

@ -1,73 +1,79 @@
%bcond_with bootstrap
%global bundled_slf4j_version 1.7.30
%global homedir %{_datadir}/%{name}%{?maven_version_suffix}
%global confdir %{_sysconfdir}/%{name}%{?maven_version_suffix}
%global bundled_slf4j_version 1.7.36
%global homedir %{_datadir}/maven%{?maven_version_suffix}
%global confdir %{_sysconfdir}/maven%{?maven_version_suffix}
Name: maven
Epoch: 1
Version: 3.6.3
Release: 19%{?dist}
Version: 3.9.6
Release: 9%{?dist}
Summary: Java project management and project comprehension tool
# maven itself is ASL 2.0
# maven itself is Apache-2.0
# bundled slf4j is MIT
License: ASL 2.0 and MIT
License: Apache-2.0 AND MIT
URL: https://maven.apache.org/
BuildArch: noarch
ExclusiveArch: %{java_arches} noarch
Source0: https://archive.apache.org/dist/%{name}/%{name}-3/%{version}/source/apache-%{name}-%{version}-src.tar.gz
Source0: https://archive.apache.org/dist/maven/maven-3/%{version}/source/apache-maven-%{version}-src.tar.gz
Source1: maven-bash-completion
Source2: mvn.1
Patch1: 0001-Adapt-mvn-script.patch
# Downstream-specific, avoids dependency on logback
# Used only when %%without logback is in effect
# Downstream-specific, avoids build-dependency on logback
Patch2: 0002-Invoke-logback-via-reflection.patch
Patch3: 0003-Use-non-shaded-HTTP-wagon.patch
Patch4: 0004-Remove-dependency-on-powermock.patch
Patch3: 0003-Remove-dependency-on-powermock.patch
BuildRequires: maven-local-openjdk8
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: mvn(com.google.inject:guice::no_aop:)
BuildRequires: maven-local
BuildRequires: mvn(com.google.guava:failureaccess)
BuildRequires: mvn(com.google.guava:guava)
BuildRequires: mvn(com.google.inject:guice)
BuildRequires: mvn(commons-cli:commons-cli)
BuildRequires: mvn(commons-io:commons-io)
BuildRequires: mvn(commons-jxpath:commons-jxpath)
BuildRequires: mvn(javax.annotation:jsr250-api)
BuildRequires: mvn(javax.annotation:javax.annotation-api)
BuildRequires: mvn(javax.inject:javax.inject)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.commons:commons-lang3)
BuildRequires: mvn(org.apache.maven:maven-parent:pom:)
BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-failsafe-plugin)
BuildRequires: mvn(org.apache.maven.resolver:maven-resolver-api)
BuildRequires: mvn(org.apache.maven.resolver:maven-resolver-connector-basic)
BuildRequires: mvn(org.apache.maven.resolver:maven-resolver-impl)
BuildRequires: mvn(org.apache.maven.resolver:maven-resolver-spi)
BuildRequires: mvn(org.apache.maven.resolver:maven-resolver-transport-file)
BuildRequires: mvn(org.apache.maven.resolver:maven-resolver-transport-http)
BuildRequires: mvn(org.apache.maven.resolver:maven-resolver-transport-wagon)
BuildRequires: mvn(org.apache.maven.resolver:maven-resolver-util)
BuildRequires: mvn(org.apache.maven.shared:maven-shared-utils)
BuildRequires: mvn(org.apache.maven.wagon:wagon-file)
BuildRequires: mvn(org.apache.maven.wagon:wagon-http)
BuildRequires: mvn(org.apache.maven.wagon:wagon-provider-api)
BuildRequires: mvn(org.apache.maven:maven-parent:pom:)
BuildRequires: mvn(org.codehaus.modello:modello-maven-plugin)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
BuildRequires: mvn(org.codehaus.plexus:plexus-cipher)
BuildRequires: mvn(org.codehaus.plexus:plexus-classworlds)
BuildRequires: mvn(org.codehaus.plexus:plexus-component-annotations)
BuildRequires: mvn(org.codehaus.plexus:plexus-component-metadata)
BuildRequires: mvn(org.codehaus.plexus:plexus-interpolation)
BuildRequires: mvn(org.codehaus.plexus:plexus-sec-dispatcher)
BuildRequires: mvn(org.codehaus.plexus:plexus-utils)
BuildRequires: mvn(org.eclipse.sisu:org.eclipse.sisu.inject)
BuildRequires: mvn(org.eclipse.sisu:org.eclipse.sisu.plexus)
BuildRequires: mvn(org.eclipse.sisu:sisu-maven-plugin)
BuildRequires: mvn(org.fusesource.jansi:jansi)
BuildRequires: mvn(org.hamcrest:hamcrest)
BuildRequires: mvn(org.mockito:mockito-core)
BuildRequires: mvn(org.slf4j:jcl-over-slf4j)
BuildRequires: mvn(org.slf4j:slf4j-api)
BuildRequires: mvn(org.slf4j:slf4j-simple)
BuildRequires: mvn(org.sonatype.plexus:plexus-cipher)
BuildRequires: mvn(org.sonatype.plexus:plexus-sec-dispatcher)
BuildRequires: mvn(org.xmlunit:xmlunit-core)
BuildRequires: mvn(org.xmlunit:xmlunit-matchers)
%endif
@ -80,9 +86,7 @@ BuildRequires: mvn(org.slf4j:slf4j-simple::sources:)
Requires: %{name}-lib = %{epoch}:%{version}-%{release}
Requires: %{name}-jdk-binding = %{epoch}:%{version}-%{release}
Suggests: %{name}-openjdk17 = %{epoch}:%{version}-%{release}
Requires: which
Suggests: %{name}-openjdk21 = %{epoch}:%{version}-%{release}
Requires(post): alternatives
Requires(postun): alternatives
@ -107,50 +111,14 @@ Provides: bundled(slf4j) = %{bundled_slf4j_version}
%description lib
Core part of Apache Maven that can be used as a library.
%package openjdk8
Summary: OpenJDK 8 binding for Maven
RemovePathPostfixes: -openjdk8
Provides: maven-jdk-binding = %{epoch}:%{version}-%{release}
Requires: maven = %{epoch}:%{version}-%{release}
Requires: java-1.8.0-openjdk-headless
Recommends: java-1.8.0-openjdk-devel
Conflicts: maven-jdk-binding
%description openjdk8
Configures Maven to run with OpenJDK 8.
%package openjdk11
Summary: OpenJDK 11 binding for Maven
RemovePathPostfixes: -openjdk11
Provides: maven-jdk-binding = %{epoch}:%{version}-%{release}
Requires: maven = %{epoch}:%{version}-%{release}
Requires: java-11-openjdk-headless
Recommends: java-11-openjdk-devel
Conflicts: maven-jdk-binding
%description openjdk11
Configures Maven to run with OpenJDK 11.
%package openjdk17
Summary: OpenJDK 17 binding for Maven
RemovePathPostfixes: -openjdk17
Provides: maven-jdk-binding = %{epoch}:%{version}-%{release}
Requires: maven = %{epoch}:%{version}-%{release}
Requires: java-17-openjdk-headless
Recommends: java-17-openjdk-devel
Conflicts: maven-jdk-binding
%description openjdk17
Configures Maven to run with OpenJDK 17.
%package openjdk21
Summary: OpenJDK 21 binding for Maven
RemovePathPostfixes: -openjdk21
Provides: maven-jdk-binding = %{epoch}:%{version}-%{release}
Requires: maven = %{epoch}:%{version}-%{release}
Provides: %{name}-jdk-binding = %{epoch}:%{version}-%{release}
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: java-21-openjdk-headless
Recommends: java-21-openjdk-devel
Conflicts: maven-jdk-binding
Conflicts: %{name}-jdk-binding
%description openjdk21
Configures Maven to run with OpenJDK 21.
@ -158,7 +126,7 @@ Configures Maven to run with OpenJDK 21.
%{?javadoc_package}
%prep
%setup -q -n apache-%{name}-%{version}
%setup -q -n apache-maven-%{version}
find -name '*.java' -exec sed -i 's/\r//' {} +
find -name 'pom.xml' -exec sed -i 's/\r//' {} +
@ -166,7 +134,7 @@ find -name 'pom.xml' -exec sed -i 's/\r//' {} +
%patch -P 1 -p1
%patch -P 2 -p1
%patch -P 3 -p1
%patch -P 4 -p1
sed -i "s/@{maven_version_suffix}/%{?maven_version_suffix}/" apache-maven/src/bin/mvn
# not really used during build, but a precaution
find -name '*.jar' -not -path '*/test/*' -delete
@ -196,16 +164,15 @@ sed -i "
%mvn_package :apache-maven __noinstall
%pom_add_dep javax.annotation:javax.annotation-api::provided maven-core
%pom_change_dep :jansi :::runtime maven-embedder
%pom_remove_dep -r :logback-classic
%mvn_alias :maven-resolver-provider :maven-aether-provider
%pom_xpath_inject 'pom:build/pom:plugins' '
<plugin>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
</plugin>' maven-model-builder/pom.xml
%pom_remove_plugin :plexus-component-metadata maven-model-builder
%pom_add_plugin org.eclipse.sisu:sisu-maven-plugin maven-model-builder
%build
%mvn_build -- -Dproject.build.sourceEncoding=UTF-8
@ -259,10 +226,7 @@ ln -s %{homedir}/bin/mvnDebug.1.gz %{buildroot}%{_mandir}/man1/mvnDebug%{maven_v
# JDK bindings
install -d -m 755 %{buildroot}%{_javaconfdir}/
echo JAVA_HOME=%{_jvmlibdir}/jre-1.8.0-openjdk >%{buildroot}%{_javaconfdir}/maven.conf-openjdk8
echo JAVA_HOME=%{_jvmlibdir}/jre-11-openjdk >%{buildroot}%{_javaconfdir}/maven.conf-openjdk11
echo JAVA_HOME=%{_jvmlibdir}/jre-17-openjdk >%{buildroot}%{_javaconfdir}/maven.conf-openjdk17
echo JAVA_HOME=%{_jvmlibdir}/jre-21-openjdk >%{buildroot}%{_javaconfdir}/maven.conf-openjdk21
echo JAVA_HOME=%{_jvmlibdir}/jre-21-openjdk >%{buildroot}%{_javaconfdir}/maven%{?maven_version_suffix}.conf-openjdk21
%post
@ -299,64 +263,112 @@ if [[ $1 -eq 0 ]]; then update-alternatives --remove mvn %{homedir}/bin/mvn; fi
%{_mandir}/man1/mvnDebug%{maven_version_suffix}.1.gz
%endif
%files openjdk8
%config %{_javaconfdir}/maven.conf-openjdk8
%files openjdk21
%config %{_javaconfdir}/maven%{?maven_version_suffix}.conf-openjdk21
%files openjdk11
%config %{_javaconfdir}/maven.conf-openjdk11
%changelog
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1:3.9.6-9
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
%files openjdk17
%config %{_javaconfdir}/maven.conf-openjdk17
* Fri Oct 25 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1:3.9.6-8
- Rebuilt for MSVSphere 10
%files openjdk21
%config %{_javaconfdir}/maven.conf-openjdk21
* Mon Aug 05 2024 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.9.6-8
- Drop OpenJDK 17 subpackage
- Resolves: RHEL-51273
%changelog
* Sat Nov 23 2024 Marián Konček <mkoncek@redhat.com> - 1:3.6.3-19
- Switch to Fedora tests
* Thu Aug 01 2024 Troy Dawson <tdawson@redhat.com> - 1:3.9.6-8
- Bump release for Aug 2024 java mass rebuild
* Thu Jul 04 2024 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.9.6-7
- Rebuild
* Tue Jul 02 2024 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.9.6-6
- Drop openjdk8 and openjdk11 subpackages
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1:3.9.6-5
- Bump release for June 2024 mass rebuild
* Thu Nov 21 2024 Marián Konček <mkoncek@redhat.com> - 1:3.6.3-18
- Fix patch usage
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.9.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Nov 20 2024 Marián Konček <mkoncek@redhat.com> - 1:3.6.3-17
- Rebuild with regenerated Requires on Java
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.9.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Oct 17 2024 Marián Konček <mkoncek@redhat.com> - 1:3.6.3-16
- Suggest maven-openjdk17
- Resolves: RHEL-62398
* Wed Dec 13 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.9.6-2
- Make JDK bindings work with different Maven version suffixes
* Thu Oct 17 2024 Marián Konček <mkoncek@redhat.com> - 1:3.6.3-16
* Mon Dec 04 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.9.6-1
- Update to upstream version 3.9.6
* Thu Sep 21 2023 Trung Lê <8@tle.id.au> - 1:3.9.4-3
- Add maven-openjdk21
- Resolves: RHEL-62407
* Tue Jan 31 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.6.3-15
- Add missing Requires on which
- Resolves: rhbz#2165596
* Fri Sep 01 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.9.4-2
- Convert License tag to SPDX format
* Fri Aug 18 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.9.4-1
- Update to upstream version 3.9.4
* Tue Aug 15 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.9.1-4
- Build with default JDK 17
* Mon Jan 30 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.6.3-15
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.9.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Mar 31 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.9.1-2
- Rebuild with no changes
* Tue Mar 21 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.9.1-1
- Update to upstream version 3.9.1
* Fri Jan 27 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.8.6-4
- Turn hard dependency on java-devel into a weak dependencny
- Resolves: rhbz#2165593
* Thu Dec 01 2022 Marián Konček <mkoncek@redhat.com> - 1:3.6.3-15
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.8.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Sep 13 2022 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.8.6-2
- Add workaround for guava symlink creation with xmvn-subst
* Tue Sep 06 2022 Marian Koncek <mkoncek@redhat.com> - 1:3.8.6-1
- Update to upstream version 3.8.6
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.8.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu May 05 2022 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.8.5-2
- Add build-dependency on extra-enforcer-rules
* Thu Apr 21 2022 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.8.5-1
- Update to upstream version 3.8.5
* Thu Jan 27 2022 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.8.4-3
- Suggest OpenJDK 17 as default Maven binding
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.8.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Dec 17 2021 Marian Koncek <mkoncek@redhat.com> - 1:3.8.4-1
- Update to upstream version 3.8.4
* Fri Nov 05 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.6.3-14
- Do not override JAVA_HOME set by user
- Resolves: rhbz#2096431
- Resolves: rhbz#2020478
* Fri Sep 24 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.6.3-14
* Tue Nov 02 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.6.3-13
- Suggest OpenJDK 17 as default Maven binding
* Fri Sep 24 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.6.3-12
- Add OpenJDK 17 binding
* Thu Aug 19 2021 Marian Koncek <mkoncek@redhat.com> - 1:3.6.3-13
* Fri Sep 24 2021 Marian Koncek <mkoncek@redhat.com> - 1:3.6.3-11
- Create a symlink to jansi shared object
- Related: rhbz#1994935
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:3.6.3-12
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Wed Jun 09 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.6.3-11
- Rebuild to workaround DistroBaker issue
* Tue Jun 08 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.6.3-10
- Bootstrap Maven for CentOS Stream 9
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.6.3-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.6.3-9
- Bootstrap build

Loading…
Cancel
Save