Compare commits
No commits in common. "c8-stream-201902" and "c8s-stream-201801" have entirely different histories.
c8-stream-
...
c8s-stream
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/apache-maven-3.6.2-src.tar.gz
|
||||
SOURCES/apache-maven-3.5.4-src.tar.gz
|
||||
|
@ -1 +1 @@
|
||||
373ffbe9fc88e5facbe10d7a6f6badd243545ade SOURCES/apache-maven-3.6.2-src.tar.gz
|
||||
04aefb9462af8cf7ca93808cd246f4c28b8ae4a1 SOURCES/apache-maven-3.5.4-src.tar.gz
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 056c94f86450c7c27f5bb11f98653c73bfe3d8e4 Mon Sep 17 00:00:00 2001
|
||||
From 46041685a82b861bc8616bb603e341adb740a302 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 | 17 +++++++++++++++--
|
||||
1 file changed, 15 insertions(+), 2 deletions(-)
|
||||
apache-maven/src/bin/mvn | 19 ++++++++++++++++---
|
||||
1 file changed, 16 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
|
||||
index a554c6617..0c07ba6e2 100755
|
||||
index a554c66..818cf70 100755
|
||||
--- a/apache-maven/src/bin/mvn
|
||||
+++ b/apache-maven/src/bin/mvn
|
||||
@@ -22,7 +22,7 @@
|
||||
@ -55,6 +55,15 @@ index a554c6617..0c07ba6e2 100755
|
||||
|
||||
# make it fully qualified
|
||||
MAVEN_HOME=`cd "$MAVEN_HOME" && pwd`
|
||||
--
|
||||
2.21.0
|
||||
@@ -102,7 +115,7 @@ if [ ! -x "$JAVACMD" ] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
-CLASSWORLDS_JAR=`echo "${MAVEN_HOME}"/boot/plexus-classworlds-*.jar`
|
||||
+CLASSWORLDS_JAR=`build-classpath plexus-classworlds`
|
||||
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
@ -1,17 +1,17 @@
|
||||
From 7610a10691e680db00edcbd4ce6767a30641cd71 Mon Sep 17 00:00:00 2001
|
||||
From 4e1e32e3a96c6876a22cca6743288b8c8df4adb0 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(-)
|
||||
|
||||
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 5d9fab7..ced38cb 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 @@
|
||||
@@ -35,22 +35,31 @@ public class LogbackConfiguration
|
||||
@Override
|
||||
public void setRootLoggerLevel( Level level )
|
||||
{
|
||||
@ -49,5 +49,5 @@ index 5d9fab744..ced38cb5a 100644
|
||||
|
||||
@Override
|
||||
--
|
||||
2.21.0
|
||||
2.17.1
|
||||
|
||||
|
180
SOURCES/0003-Revert-MNG-6335-Update-Mockito-to-2.12.0.patch
Normal file
180
SOURCES/0003-Revert-MNG-6335-Update-Mockito-to-2.12.0.patch
Normal file
@ -0,0 +1,180 @@
|
||||
From 6b5e263ebd03be9551c4e6aa394ac2334fff7c03 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Simacek <msimacek@redhat.com>
|
||||
Date: Tue, 13 Mar 2018 11:49:16 +0100
|
||||
Subject: [PATCH 3/3] Revert "[ MNG-6335] Update Mockito to 2.12.0"
|
||||
|
||||
This reverts commit a03489b67d04a4b014ff5d1c151b331a39bf100b.
|
||||
---
|
||||
.../DefaultToolchainManagerPrivateTest.java | 15 +++++++++------
|
||||
.../toolchain/DefaultToolchainManagerTest.java | 4 ++--
|
||||
.../building/DefaultToolchainsBuilderTest.java | 14 +++++++-------
|
||||
maven-embedder/pom.xml | 1 -
|
||||
pom.xml | 2 +-
|
||||
5 files changed, 19 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerPrivateTest.java b/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerPrivateTest.java
|
||||
index c937564..1e48441 100644
|
||||
--- a/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerPrivateTest.java
|
||||
+++ b/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerPrivateTest.java
|
||||
@@ -20,7 +20,8 @@ package org.apache.maven.toolchain;
|
||||
*/
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
-import static org.mockito.ArgumentMatchers.anyString;
|
||||
+import static org.junit.Assert.fail;
|
||||
+import static org.mockito.Matchers.anyString;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.verify;
|
||||
@@ -144,8 +145,9 @@ public class DefaultToolchainManagerPrivateTest
|
||||
verify( logger, never() ).error( anyString() );
|
||||
assertEquals( 2, toolchains.length );
|
||||
}
|
||||
-
|
||||
- @Test
|
||||
+
|
||||
+ @SuppressWarnings( "unchecked" )
|
||||
+ @Test( expected = MisconfiguredToolchainException.class )
|
||||
public void testMisconfiguredToolchain()
|
||||
throws Exception
|
||||
{
|
||||
@@ -153,11 +155,12 @@ public class DefaultToolchainManagerPrivateTest
|
||||
MavenSession session = mock( MavenSession.class );
|
||||
MavenExecutionRequest req = new DefaultMavenExecutionRequest();
|
||||
when( session.getRequest() ).thenReturn( req );
|
||||
+ when(toolchainFactory_basicType.createDefaultToolchain()).thenThrow( MisconfiguredToolchainException.class );
|
||||
|
||||
// execute
|
||||
- ToolchainPrivate[] basics = toolchainManager.getToolchainsForType("basic", session);
|
||||
-
|
||||
+ toolchainManager.getToolchainsForType( "basic", session );
|
||||
+
|
||||
// verify
|
||||
- assertEquals( 0, basics.length );
|
||||
+ fail( "Should exit with a MisconfiguredToolchainException" );
|
||||
}
|
||||
}
|
||||
diff --git a/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerTest.java b/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerTest.java
|
||||
index 84444c0..6e85c42 100644
|
||||
--- a/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerTest.java
|
||||
+++ b/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerTest.java
|
||||
@@ -20,6 +20,7 @@ package org.apache.maven.toolchain;
|
||||
*/
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
+import static org.mockito.Matchers.anyMap;
|
||||
import static org.mockito.Matchers.isA;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
@@ -38,7 +39,6 @@ import org.apache.maven.toolchain.model.ToolchainModel;
|
||||
import org.codehaus.plexus.logging.Logger;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
-import org.mockito.ArgumentMatchers;
|
||||
import org.mockito.InjectMocks;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
@@ -142,7 +142,7 @@ public class DefaultToolchainManagerTest
|
||||
executionRequest.setToolchains( toolchainModels );
|
||||
when( session.getRequest() ).thenReturn( executionRequest );
|
||||
ToolchainPrivate basicPrivate = mock( ToolchainPrivate.class );
|
||||
- when( basicPrivate.matchesRequirements( ArgumentMatchers.<String, String>anyMap() ) ).thenReturn( false ).thenReturn( true );
|
||||
+ when( basicPrivate.matchesRequirements( anyMap() ) ).thenReturn( false ).thenReturn( true );
|
||||
when( toolchainFactory_basicType.createToolchain( isA( ToolchainModel.class ) ) ).thenReturn( basicPrivate );
|
||||
|
||||
List<Toolchain> toolchains =
|
||||
diff --git a/maven-core/src/test/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilderTest.java b/maven-core/src/test/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilderTest.java
|
||||
index fc530df..80fca09 100644
|
||||
--- a/maven-core/src/test/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilderTest.java
|
||||
+++ b/maven-core/src/test/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilderTest.java
|
||||
@@ -21,7 +21,8 @@ package org.apache.maven.toolchain.building;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
-import static org.mockito.ArgumentMatchers.any;
|
||||
+import static org.mockito.Matchers.any;
|
||||
+import static org.mockito.Matchers.anyMap;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -34,7 +35,6 @@ import org.apache.maven.toolchain.model.PersistedToolchains;
|
||||
import org.apache.maven.toolchain.model.ToolchainModel;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
-import org.mockito.ArgumentMatchers;
|
||||
import org.mockito.InjectMocks;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
@@ -78,7 +78,7 @@ public class DefaultToolchainsBuilderTest
|
||||
toolchain.setType( "TYPE" );
|
||||
toolchain.addProvide( "key", "user_value" );
|
||||
userResult.addToolchain( toolchain );
|
||||
- when( toolchainsReader.read( any( InputStream.class ), ArgumentMatchers.<String, Object>anyMap()) ).thenReturn( userResult );
|
||||
+ when( toolchainsReader.read( any( InputStream.class ), anyMap() ) ).thenReturn( userResult );
|
||||
|
||||
ToolchainsBuildingResult result = toolchainBuilder.build( request );
|
||||
assertNotNull( result.getEffectiveToolchains() );
|
||||
@@ -101,7 +101,7 @@ public class DefaultToolchainsBuilderTest
|
||||
toolchain.setType( "TYPE" );
|
||||
toolchain.addProvide( "key", "global_value" );
|
||||
globalResult.addToolchain( toolchain );
|
||||
- when( toolchainsReader.read( any( InputStream.class ), ArgumentMatchers.<String, Object>anyMap()) ).thenReturn( globalResult );
|
||||
+ when( toolchainsReader.read( any( InputStream.class ), anyMap() ) ).thenReturn( globalResult );
|
||||
|
||||
ToolchainsBuildingResult result = toolchainBuilder.build( request );
|
||||
assertNotNull( result.getEffectiveToolchains() );
|
||||
@@ -131,7 +131,7 @@ public class DefaultToolchainsBuilderTest
|
||||
globalToolchain.setType( "TYPE" );
|
||||
globalToolchain.addProvide( "key", "global_value" );
|
||||
globalResult.addToolchain( globalToolchain );
|
||||
- when( toolchainsReader.read( any( InputStream.class ), ArgumentMatchers.<String, Object>anyMap()) ).thenReturn( globalResult ).thenReturn( userResult );
|
||||
+ when( toolchainsReader.read( any( InputStream.class ), anyMap() ) ).thenReturn( globalResult ).thenReturn( userResult );
|
||||
|
||||
ToolchainsBuildingResult result = toolchainBuilder.build( request );
|
||||
assertNotNull( result.getEffectiveToolchains() );
|
||||
@@ -150,7 +150,7 @@ public class DefaultToolchainsBuilderTest
|
||||
ToolchainsBuildingRequest request = new DefaultToolchainsBuildingRequest();
|
||||
request.setGlobalToolchainsSource( new StringSource( "" ) );
|
||||
ToolchainsParseException parseException = new ToolchainsParseException( "MESSAGE", 4, 2 );
|
||||
- when( toolchainsReader.read( any( InputStream.class ), ArgumentMatchers.<String, Object>anyMap()) ).thenThrow( parseException );
|
||||
+ when( toolchainsReader.read( any( InputStream.class ), anyMap() ) ).thenThrow( parseException );
|
||||
|
||||
try
|
||||
{
|
||||
@@ -169,7 +169,7 @@ public class DefaultToolchainsBuilderTest
|
||||
ToolchainsBuildingRequest request = new DefaultToolchainsBuildingRequest();
|
||||
request.setGlobalToolchainsSource( new StringSource( "", "LOCATION" ) );
|
||||
IOException ioException = new IOException( "MESSAGE" );
|
||||
- when( toolchainsReader.read( any( InputStream.class ), ArgumentMatchers.<String, Object>anyMap()) ).thenThrow( ioException );
|
||||
+ when( toolchainsReader.read( any( InputStream.class ), anyMap() ) ).thenThrow( ioException );
|
||||
|
||||
try
|
||||
{
|
||||
diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml
|
||||
index 8a00565..2a9668b 100644
|
||||
--- a/maven-embedder/pom.xml
|
||||
+++ b/maven-embedder/pom.xml
|
||||
@@ -141,7 +141,6 @@ under the License.
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
- <scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.fusesource.jansi</groupId>
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index ef1d0b0..77b3395 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -53,7 +53,7 @@ under the License.
|
||||
<commonsCliVersion>1.4</commonsCliVersion>
|
||||
<commonsLangVersion>3.5</commonsLangVersion>
|
||||
<junitVersion>4.12</junitVersion>
|
||||
- <mockitoVersion>2.12.0</mockitoVersion>
|
||||
+ <mockitoVersion>1.10.19</mockitoVersion>
|
||||
<plexusVersion>1.7.1</plexusVersion>
|
||||
<plexusInterpolationVersion>1.24</plexusInterpolationVersion>
|
||||
<plexusUtilsVersion>3.1.0</plexusUtilsVersion>
|
||||
--
|
||||
2.17.1
|
||||
|
@ -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 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
|
||||
|
@ -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 b66abca..a5b2aa0 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.21.0
|
||||
|
243
SPECS/maven.spec
243
SPECS/maven.spec
@ -1,11 +1,13 @@
|
||||
%global bundled_slf4j_version 1.7.28
|
||||
%bcond_without logback
|
||||
|
||||
%global bundled_slf4j_version 1.7.25
|
||||
%global homedir %{_datadir}/%{name}%{?maven_version_suffix}
|
||||
%global confdir %{_sysconfdir}/%{name}%{?maven_version_suffix}
|
||||
|
||||
Name: maven
|
||||
Epoch: 1
|
||||
Version: 3.6.2
|
||||
Release: 2%{?dist}
|
||||
Version: 3.5.4
|
||||
Release: 5%{?dist}
|
||||
Summary: Java project management and project comprehension tool
|
||||
# maven itself is ASL 2.0
|
||||
# bundled slf4j is MIT
|
||||
@ -13,7 +15,7 @@ License: ASL 2.0 and MIT
|
||||
URL: http://maven.apache.org/
|
||||
BuildArch: noarch
|
||||
|
||||
Source0: http://archive.apache.org/dist/%{name}/%{name}-3/%{version}/sources/apache-%{name}-%{version}-src.tar.gz
|
||||
Source0: http://archive.apache.org/dist/%{name}/%{name}-3/%{version}/source/apache-%{name}-%{version}-src.tar.gz
|
||||
Source1: maven-bash-completion
|
||||
Source2: mvn.1
|
||||
|
||||
@ -21,128 +23,149 @@ Patch1: 0001-Adapt-mvn-script.patch
|
||||
# Downstream-specific, avoids dependency on logback
|
||||
# Used only when %%without logback is in effect
|
||||
Patch2: 0002-Invoke-logback-via-reflection.patch
|
||||
Patch3: 0003-Use-non-shaded-HTTP-wagon.patch
|
||||
Patch4: 0004-Remove-dependency-on-powermock.patch
|
||||
# We don't have mockito 2 yet
|
||||
Patch3: 0003-Revert-MNG-6335-Update-Mockito-to-2.12.0.patch
|
||||
|
||||
BuildRequires: maven-local
|
||||
BuildRequires: %{?module_prefix}mvn(com.google.inject:guice::no_aop:)
|
||||
BuildRequires: %{?module_prefix}mvn(commons-cli:commons-cli)
|
||||
BuildRequires: mvn(com.google.guava:guava:20.0)
|
||||
BuildRequires: mvn(com.google.inject:guice::no_aop:)
|
||||
BuildRequires: mvn(commons-cli:commons-cli)
|
||||
BuildRequires: mvn(commons-jxpath:commons-jxpath)
|
||||
BuildRequires: %{?module_prefix}mvn(javax.annotation:jsr250-api)
|
||||
BuildRequires: %{?module_prefix}mvn(javax.inject:javax.inject)
|
||||
BuildRequires: mvn(javax.annotation:jsr250-api)
|
||||
BuildRequires: mvn(javax.inject:javax.inject)
|
||||
BuildRequires: mvn(junit:junit)
|
||||
BuildRequires: %{?module_prefix}mvn(org.apache.commons:commons-lang3)
|
||||
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-failsafe-plugin)
|
||||
BuildRequires: %{?module_prefix}mvn(org.apache.maven.resolver:maven-resolver-api)
|
||||
BuildRequires: %{?module_prefix}mvn(org.apache.maven.resolver:maven-resolver-connector-basic)
|
||||
BuildRequires: %{?module_prefix}mvn(org.apache.maven.resolver:maven-resolver-impl)
|
||||
BuildRequires: %{?module_prefix}mvn(org.apache.maven.resolver:maven-resolver-spi)
|
||||
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: %{?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.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-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::shaded:)
|
||||
BuildRequires: mvn(org.apache.maven.wagon:wagon-provider-api)
|
||||
BuildRequires: mvn(org.codehaus.modello:modello-maven-plugin)
|
||||
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
|
||||
BuildRequires: %{?module_prefix}mvn(org.codehaus.plexus:plexus-classworlds)
|
||||
BuildRequires: %{?module_prefix}mvn(org.codehaus.plexus:plexus-component-annotations)
|
||||
BuildRequires: mvn(org.codehaus.plexus:plexus-classworlds)
|
||||
BuildRequires: mvn(org.codehaus.plexus:plexus-component-annotations)
|
||||
BuildRequires: mvn(org.codehaus.plexus:plexus-component-metadata)
|
||||
BuildRequires: %{?module_prefix}mvn(org.codehaus.plexus:plexus-interpolation)
|
||||
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.codehaus.plexus:plexus-interpolation)
|
||||
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: %{?module_prefix}mvn(org.fusesource.jansi:jansi)
|
||||
BuildRequires: mvn(org.mockito:mockito-core) >= 2
|
||||
BuildRequires: %{?module_prefix}mvn(org.slf4j:jcl-over-slf4j)
|
||||
BuildRequires: %{?module_prefix}mvn(org.slf4j:slf4j-api)
|
||||
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)
|
||||
BuildRequires: mvn(org.xmlunit:xmlunit-matchers)
|
||||
BuildRequires: mvn(org.fusesource.jansi:jansi)
|
||||
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(xmlunit:xmlunit)
|
||||
|
||||
BuildRequires: slf4j-sources = %{bundled_slf4j_version}
|
||||
|
||||
%if 0%{?module_prefix:1}
|
||||
%package -n %{module_prefix}%{name}
|
||||
Summary: %{summary}
|
||||
%if %{with logback}
|
||||
BuildRequires: mvn(ch.qos.logback:logback-classic)
|
||||
%endif
|
||||
|
||||
Requires: %{?module_prefix}%{name}-lib = %{epoch}:%{version}-%{release}
|
||||
Requires: %{name}-lib = %{epoch}:%{version}-%{release}
|
||||
|
||||
%if 0%{?fedora}
|
||||
Requires(post): (alternatives if fedora-release >= 30 else chkconfig)
|
||||
Requires(postun): (alternatives if fedora-release >= 30 else chkconfig)
|
||||
%else
|
||||
Requires(post): chkconfig
|
||||
Requires(postun): chkconfig
|
||||
%endif
|
||||
|
||||
# Require full javapackages-tools since maven-script uses
|
||||
# /usr/share/java-utils/java-functions
|
||||
Requires: javapackages-tools
|
||||
|
||||
# Theoretically Maven might be usable with just JRE, but typical Maven
|
||||
# workflow requires full JDK, so we recommend it here.
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
Recommends: java-devel
|
||||
%else
|
||||
Requires: java-devel
|
||||
%endif
|
||||
%{?fedora:Recommends}%{!?fedora:Requires}: java-devel
|
||||
|
||||
%if 0%{?module_prefix:1}
|
||||
%description -n %{module_prefix}%{name}
|
||||
%{summary}.
|
||||
%endif
|
||||
# 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: aopalliance
|
||||
Requires: apache-commons-cli
|
||||
Requires: apache-commons-codec
|
||||
Requires: apache-commons-io
|
||||
Requires: apache-commons-lang3
|
||||
Requires: apache-commons-logging
|
||||
Requires: atinject
|
||||
Requires: cdi-api
|
||||
Requires: geronimo-annotation
|
||||
Requires: google-guice
|
||||
Requires: guava20
|
||||
Requires: hawtjni-runtime
|
||||
Requires: httpcomponents-client
|
||||
Requires: httpcomponents-core
|
||||
Requires: jansi
|
||||
Requires: jansi-native
|
||||
Requires: jcl-over-slf4j
|
||||
Requires: maven-resolver-api
|
||||
Requires: maven-resolver-connector-basic
|
||||
Requires: maven-resolver-impl
|
||||
Requires: maven-resolver-spi
|
||||
Requires: maven-resolver-transport-wagon
|
||||
Requires: maven-resolver-util
|
||||
Requires: maven-shared-utils
|
||||
Requires: maven-wagon-file
|
||||
Requires: maven-wagon-http
|
||||
Requires: maven-wagon-http-shared
|
||||
Requires: maven-wagon-provider-api
|
||||
Requires: plexus-cipher
|
||||
Requires: plexus-classworlds
|
||||
Requires: plexus-containers-component-annotations
|
||||
Requires: plexus-interpolation
|
||||
Requires: plexus-sec-dispatcher
|
||||
Requires: plexus-utils
|
||||
Requires: sisu-inject
|
||||
Requires: sisu-plexus
|
||||
Requires: 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,
|
||||
reporting and documentation from a central piece of information.
|
||||
|
||||
%package -n %{?module_prefix}%{name}-lib
|
||||
%package lib
|
||||
Summary: Core part of Maven
|
||||
# If XMvn is part of the same RPM transaction then it should be
|
||||
# installed first to avoid triggering rhbz#1014355.
|
||||
OrderWithRequires: xmvn-minimal
|
||||
|
||||
# Require full javapackages-tools since maven-script uses
|
||||
# /usr/share/java-utils/java-functions
|
||||
Requires: javapackages-tools
|
||||
# Maven upstream uses patched version of SLF4J. They unpack
|
||||
# slf4j-simple-sources.jar, apply non-upstreamable, Maven-specific
|
||||
# patch (using a script written in Groovy), compile and package as
|
||||
# maven-slf4j-provider.jar, together with Maven-specific additions.
|
||||
Provides: bundled(slf4j) = %{bundled_slf4j_version}
|
||||
|
||||
%description -n %{?module_prefix}%{name}-lib
|
||||
%description lib
|
||||
Core part of Apache Maven that can be used as a library.
|
||||
|
||||
%{?javadoc_package}
|
||||
%package javadoc
|
||||
Summary: API documentation for %{name}
|
||||
|
||||
%description javadoc
|
||||
%{summary}.
|
||||
|
||||
%prep
|
||||
%setup -q -n apache-%{name}-%{version}
|
||||
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
# TODO Delete after maven-3.6.3
|
||||
# Fix Tycho pomless build
|
||||
# https://issues.apache.org/jira/browse/MNG-6765
|
||||
# https://github.com/apache/maven/commit/07ab962c85950b034be3216996900920c0204c3a
|
||||
sed -i 's/@Named/@Named\( "core-default" \)/' maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProcessor.java
|
||||
|
||||
# not really used during build, but a precaution
|
||||
find -name '*.jar' -not -path '*/test/*' -delete
|
||||
find -name '*.class' -delete
|
||||
find -name '*.bat' -delete
|
||||
|
||||
%pom_remove_dep -r :powermock-reflect
|
||||
|
||||
sed -i 's:\r::' apache-maven/src/conf/settings.xml
|
||||
|
||||
# Downloads dependency licenses from the Internet and aggregates them.
|
||||
@ -164,17 +187,13 @@ sed -i "
|
||||
|
||||
%mvn_package :apache-maven __noinstall
|
||||
|
||||
%pom_change_dep :jansi :::runtime maven-embedder
|
||||
%if %{without logback}
|
||||
%pom_remove_dep -r :logback-classic
|
||||
%patch2 -p1
|
||||
%endif
|
||||
|
||||
%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
|
||||
|
||||
%build
|
||||
%mvn_build -- -Dproject.build.sourceEncoding=UTF-8
|
||||
|
||||
@ -194,9 +213,18 @@ install -d -m 755 %{buildroot}%{confdir}
|
||||
install -d -m 755 %{buildroot}%{_datadir}/bash-completion/completions/
|
||||
|
||||
cp -a $M2_HOME/{bin,lib,boot} %{buildroot}%{homedir}/
|
||||
%if !0%{?sclraw_phase}
|
||||
xmvn-subst -R %{buildroot} -s %{buildroot}%{homedir}
|
||||
%endif
|
||||
|
||||
# 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
|
||||
@ -214,26 +242,18 @@ install -d -m 755 %{buildroot}%{_mandir}/man1/
|
||||
touch %{buildroot}%{_bindir}/{mvn,mvnDebug}
|
||||
touch %{buildroot}%{_mandir}/man1/{mvn,mvnDebug}.1
|
||||
|
||||
# Versioned commands and manpages
|
||||
%if 0%{?maven_version_suffix:1}
|
||||
ln -s %{homedir}/bin/mvn %{buildroot}%{_bindir}/mvn%{maven_version_suffix}
|
||||
ln -s %{homedir}/bin/mvnDebug %{buildroot}%{_bindir}/mvnDebug%{maven_version_suffix}
|
||||
ln -s %{homedir}/bin/mvn.1.gz %{buildroot}%{_mandir}/man1/mvn%{maven_version_suffix}.1.gz
|
||||
ln -s %{homedir}/bin/mvnDebug.1.gz %{buildroot}%{_mandir}/man1/mvnDebug%{maven_version_suffix}.1.gz
|
||||
%endif
|
||||
|
||||
|
||||
%post -n %{?module_prefix}%{name}
|
||||
%post
|
||||
update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alternatives_priority}0 \
|
||||
--slave %{_bindir}/mvnDebug mvnDebug %{homedir}/bin/mvnDebug \
|
||||
--slave %{_mandir}/man1/mvn.1.gz mvn1 %{homedir}/bin/mvn.1.gz \
|
||||
--slave %{_mandir}/man1/mvnDebug.1.gz mvnDebug1 %{homedir}/bin/mvn.1.gz \
|
||||
|
||||
%postun -n %{?module_prefix}%{name}
|
||||
[[ $1 -eq 0 ]] && update-alternatives --remove mvn %{homedir}/bin/mvn
|
||||
%postun
|
||||
[[ $1 -eq 0 ]] && update-alternatives --remove %{name} %{homedir}/bin/mvn
|
||||
|
||||
|
||||
%files -n %{?module_prefix}%{name}-lib -f .mfiles
|
||||
%files lib -f .mfiles
|
||||
%doc README.md
|
||||
%license LICENSE NOTICE
|
||||
%{homedir}
|
||||
@ -243,45 +263,18 @@ update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alt
|
||||
%config(noreplace) %{confdir}/settings.xml
|
||||
%config(noreplace) %{confdir}/logging/simplelogger.properties
|
||||
|
||||
%files -n %{?module_prefix}%{name}
|
||||
%files
|
||||
%ghost %{_bindir}/mvn
|
||||
%ghost %{_bindir}/mvnDebug
|
||||
%{_datadir}/bash-completion
|
||||
%ghost %{_mandir}/man1/mvn.1.gz
|
||||
%ghost %{_mandir}/man1/mvnDebug.1.gz
|
||||
%if 0%{?maven_version_suffix:1}
|
||||
%{_bindir}/mvn%{maven_version_suffix}
|
||||
%{_bindir}/mvnDebug%{maven_version_suffix}
|
||||
%{_mandir}/man1/mvn%{maven_version_suffix}.1.gz
|
||||
%{_mandir}/man1/mvnDebug%{maven_version_suffix}.1.gz
|
||||
%endif
|
||||
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%license LICENSE NOTICE
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.6.2-2
|
||||
- Mass rebuild for javapackages-tools 201902
|
||||
|
||||
* Thu Oct 03 2019 Marian Koncek <mkoncek@redhat.com> - 1:3.6.2-1
|
||||
- Update to upstream version 3.6.2
|
||||
|
||||
* Wed Jul 03 2019 Marian Koncek <mkoncek@redhat.com> - 1:3.6.1-5
|
||||
- Port to modello version 1.11
|
||||
|
||||
* Thu May 30 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.6.1-4
|
||||
- Backport upstream fix for Tycho P2 integarion
|
||||
|
||||
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.6.1-3
|
||||
- Mass rebuild for javapackages-tools 201901
|
||||
|
||||
* Wed Apr 17 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.6.1-2
|
||||
- Update to Mockito 2
|
||||
|
||||
* Sat Apr 13 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.6.1-1
|
||||
- Update to upstream version 3.6.1
|
||||
|
||||
* Fri Apr 12 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.5.4-6
|
||||
- Update SLF4J version to 1.7.26
|
||||
|
||||
* Mon Jul 30 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:3.5.4-2
|
||||
- Require javapackages-tools for maven-lib.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user