From 99d1f730f0efbfa9508968f69cf5a3c7c871ada0 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 29 Nov 2018 12:42:46 +0000 Subject: [PATCH 01/53] Expand conditionals --- maven.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/maven.spec b/maven.spec index c54cf78..4cf03e7 100644 --- a/maven.spec +++ b/maven.spec @@ -1,4 +1,3 @@ -%bcond_without logback %global bundled_slf4j_version 1.7.25 %global homedir %{_datadir}/%{name}%{?maven_version_suffix} @@ -69,9 +68,6 @@ BuildRequires: mvn(xmlunit:xmlunit) BuildRequires: slf4j-sources = %{bundled_slf4j_version} -%if %{with logback} -BuildRequires: mvn(ch.qos.logback:logback-classic) -%endif Requires: %{name}-lib = %{epoch}:%{version}-%{release} @@ -187,10 +183,8 @@ sed -i " %mvn_package :apache-maven __noinstall -%if %{without logback} %pom_remove_dep -r :logback-classic %patch2 -p1 -%endif %mvn_alias :maven-resolver-provider :maven-aether-provider From 290828571ab1141eb31f512bce881ebdfd190d58 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 12 Apr 2019 20:59:32 +0200 Subject: [PATCH 02/53] Update SLF4J version to 1.7.26 --- maven.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/maven.spec b/maven.spec index 4cf03e7..2be1bc2 100644 --- a/maven.spec +++ b/maven.spec @@ -1,12 +1,12 @@ -%global bundled_slf4j_version 1.7.25 +%global bundled_slf4j_version 1.7.26 %global homedir %{_datadir}/%{name}%{?maven_version_suffix} %global confdir %{_sysconfdir}/%{name}%{?maven_version_suffix} Name: maven Epoch: 1 Version: 3.5.4 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Java project management and project comprehension tool # maven itself is ASL 2.0 # bundled slf4j is MIT @@ -269,6 +269,9 @@ update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alt %changelog +* Fri Apr 12 2019 Mikolaj Izdebski - 1:3.5.4-6 +- Update SLF4J version to 1.7.26 + * Mon Jul 30 2018 Severin Gehwolf - 1:3.5.4-2 - Require javapackages-tools for maven-lib. From 573b3506789172b7e3939d8f63f438c5ada15c8a Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sat, 13 Apr 2019 17:03:06 +0200 Subject: [PATCH 03/53] Update to upstream version 3.6.1 --- .gitignore | 1 + 0001-Adapt-mvn-script.patch | 8 +- 0002-Invoke-logback-via-reflection.patch | 10 +- ...rt-MNG-6335-Update-Mockito-to-2.12.0.patch | 79 ++++-- ...NG-6479-Upgrade-XMLUnit-to-2.2.1-183.patch | 252 ++++++++++++++++++ maven.spec | 26 +- sources | 2 +- 7 files changed, 330 insertions(+), 48 deletions(-) create mode 100644 0004-Revert-MNG-6479-Upgrade-XMLUnit-to-2.2.1-183.patch diff --git a/.gitignore b/.gitignore index 8d1c967..d8c2277 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ /apache-maven-3.5.2-src.tar.gz /apache-maven-3.5.3-src.tar.gz /apache-maven-3.5.4-src.tar.gz +/apache-maven-3.6.1-src.tar.gz diff --git a/0001-Adapt-mvn-script.patch b/0001-Adapt-mvn-script.patch index 0b5361b..bff3bd3 100644 --- a/0001-Adapt-mvn-script.patch +++ b/0001-Adapt-mvn-script.patch @@ -1,14 +1,14 @@ -From 46041685a82b861bc8616bb603e341adb740a302 Mon Sep 17 00:00:00 2001 +From 7f6fe1e63da317cb497da815f8d90cd6873f0351 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 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn -index a554c66..818cf70 100755 +index a554c6617..818cf70b8 100755 --- a/apache-maven/src/bin/mvn +++ b/apache-maven/src/bin/mvn @@ -22,7 +22,7 @@ @@ -65,5 +65,5 @@ index a554c66..818cf70 100755 # For Cygwin, switch paths to Windows format before running java -- -2.17.1 +2.20.1 diff --git a/0002-Invoke-logback-via-reflection.patch b/0002-Invoke-logback-via-reflection.patch index 71d45e6..991ba63 100644 --- a/0002-Invoke-logback-via-reflection.patch +++ b/0002-Invoke-logback-via-reflection.patch @@ -1,17 +1,17 @@ -From 4e1e32e3a96c6876a22cca6743288b8c8df4adb0 Mon Sep 17 00:00:00 2001 +From a676bedf0fe2386b3afd5da817202acaf271eaa1 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 ++++++++++++++----- 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 5d9fab7..ced38cb 100644 +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 @@ public class LogbackConfiguration +@@ -35,22 +35,31 @@ @Override public void setRootLoggerLevel( Level level ) { @@ -49,5 +49,5 @@ index 5d9fab7..ced38cb 100644 @Override -- -2.17.1 +2.20.1 diff --git a/0003-Revert-MNG-6335-Update-Mockito-to-2.12.0.patch b/0003-Revert-MNG-6335-Update-Mockito-to-2.12.0.patch index 24ff301..b60bdd1 100644 --- a/0003-Revert-MNG-6335-Update-Mockito-to-2.12.0.patch +++ b/0003-Revert-MNG-6335-Update-Mockito-to-2.12.0.patch @@ -1,7 +1,7 @@ -From 6b5e263ebd03be9551c4e6aa394ac2334fff7c03 Mon Sep 17 00:00:00 2001 +From e3b125fab7973d647288b9039fc897438b27c203 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Tue, 13 Mar 2018 11:49:16 +0100 -Subject: [PATCH 3/3] Revert "[ MNG-6335] Update Mockito to 2.12.0" +Subject: [PATCH 3/4] Revert "[ MNG-6335] Update Mockito to 2.12.0" This reverts commit a03489b67d04a4b014ff5d1c151b331a39bf100b. --- @@ -9,14 +9,15 @@ This reverts commit a03489b67d04a4b014ff5d1c151b331a39bf100b. .../toolchain/DefaultToolchainManagerTest.java | 4 ++-- .../building/DefaultToolchainsBuilderTest.java | 14 +++++++------- maven-embedder/pom.xml | 1 - + .../java/org/apache/maven/cli/MavenCliTest.java | 6 +++--- pom.xml | 2 +- - 5 files changed, 19 insertions(+), 17 deletions(-) + 6 files changed, 22 insertions(+), 20 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 +index c93756463..1e4844154 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; +@@ -20,7 +20,8 @@ */ import static org.junit.Assert.assertEquals; @@ -26,7 +27,7 @@ index c937564..1e48441 100644 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 +@@ -144,8 +145,9 @@ public void testToolchainsForConfiguredType() verify( logger, never() ).error( anyString() ); assertEquals( 2, toolchains.length ); } @@ -38,7 +39,7 @@ index c937564..1e48441 100644 public void testMisconfiguredToolchain() throws Exception { -@@ -153,11 +155,12 @@ public class DefaultToolchainManagerPrivateTest +@@ -153,11 +155,12 @@ public void testMisconfiguredToolchain() MavenSession session = mock( MavenSession.class ); MavenExecutionRequest req = new DefaultMavenExecutionRequest(); when( session.getRequest() ).thenReturn( req ); @@ -55,10 +56,10 @@ index c937564..1e48441 100644 } } 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 +index 84444c08e..6e85c4246 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; +@@ -20,6 +20,7 @@ */ import static org.junit.Assert.assertEquals; @@ -66,7 +67,7 @@ index 84444c0..6e85c42 100644 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; +@@ -38,7 +39,6 @@ import org.codehaus.plexus.logging.Logger; import org.junit.Before; import org.junit.Test; @@ -74,7 +75,7 @@ index 84444c0..6e85c42 100644 import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -@@ -142,7 +142,7 @@ public class DefaultToolchainManagerTest +@@ -142,7 +142,7 @@ public void testRequirements() executionRequest.setToolchains( toolchainModels ); when( session.getRequest() ).thenReturn( executionRequest ); ToolchainPrivate basicPrivate = mock( ToolchainPrivate.class ); @@ -84,10 +85,10 @@ index 84444c0..6e85c42 100644 List 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 +index fc530df5a..80fca0942 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; +@@ -21,7 +21,8 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -97,7 +98,7 @@ index fc530df..80fca09 100644 import static org.mockito.Mockito.when; import java.io.IOException; -@@ -34,7 +35,6 @@ import org.apache.maven.toolchain.model.PersistedToolchains; +@@ -34,7 +35,6 @@ import org.apache.maven.toolchain.model.ToolchainModel; import org.junit.Before; import org.junit.Test; @@ -105,7 +106,7 @@ index fc530df..80fca09 100644 import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -@@ -78,7 +78,7 @@ public class DefaultToolchainsBuilderTest +@@ -78,7 +78,7 @@ public void testBuildRequestWithUserToolchains() toolchain.setType( "TYPE" ); toolchain.addProvide( "key", "user_value" ); userResult.addToolchain( toolchain ); @@ -114,7 +115,7 @@ index fc530df..80fca09 100644 ToolchainsBuildingResult result = toolchainBuilder.build( request ); assertNotNull( result.getEffectiveToolchains() ); -@@ -101,7 +101,7 @@ public class DefaultToolchainsBuilderTest +@@ -101,7 +101,7 @@ public void testBuildRequestWithGlobalToolchains() toolchain.setType( "TYPE" ); toolchain.addProvide( "key", "global_value" ); globalResult.addToolchain( toolchain ); @@ -123,7 +124,7 @@ index fc530df..80fca09 100644 ToolchainsBuildingResult result = toolchainBuilder.build( request ); assertNotNull( result.getEffectiveToolchains() ); -@@ -131,7 +131,7 @@ public class DefaultToolchainsBuilderTest +@@ -131,7 +131,7 @@ public void testBuildRequestWithBothToolchains() globalToolchain.setType( "TYPE" ); globalToolchain.addProvide( "key", "global_value" ); globalResult.addToolchain( globalToolchain ); @@ -132,7 +133,7 @@ index fc530df..80fca09 100644 ToolchainsBuildingResult result = toolchainBuilder.build( request ); assertNotNull( result.getEffectiveToolchains() ); -@@ -150,7 +150,7 @@ public class DefaultToolchainsBuilderTest +@@ -150,7 +150,7 @@ public void testStrictToolchainsParseException() throws Exception ToolchainsBuildingRequest request = new DefaultToolchainsBuildingRequest(); request.setGlobalToolchainsSource( new StringSource( "" ) ); ToolchainsParseException parseException = new ToolchainsParseException( "MESSAGE", 4, 2 ); @@ -141,7 +142,7 @@ index fc530df..80fca09 100644 try { -@@ -169,7 +169,7 @@ public class DefaultToolchainsBuilderTest +@@ -169,7 +169,7 @@ public void testIOException() throws Exception ToolchainsBuildingRequest request = new DefaultToolchainsBuildingRequest(); request.setGlobalToolchainsSource( new StringSource( "", "LOCATION" ) ); IOException ioException = new IOException( "MESSAGE" ); @@ -151,10 +152,10 @@ index fc530df..80fca09 100644 try { diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml -index 8a00565..2a9668b 100644 +index e32819196..3320d6c99 100644 --- a/maven-embedder/pom.xml +++ b/maven-embedder/pom.xml -@@ -141,7 +141,6 @@ under the License. +@@ -137,7 +137,6 @@ under the License. org.mockito mockito-core @@ -162,19 +163,43 @@ index 8a00565..2a9668b 100644 org.fusesource.jansi +diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java b/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java +index 5f4c5b69a..88810d936 100644 +--- a/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java ++++ b/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java +@@ -24,7 +24,7 @@ + import static org.junit.Assert.assertTrue; + import static org.junit.Assert.fail; + import static org.junit.Assume.assumeTrue; +-import static org.mockito.Mockito.any; ++import static org.mockito.Mockito.isA; + import static org.mockito.Mockito.inOrder; + import static org.mockito.Mockito.mock; + import static org.mockito.Mockito.times; +@@ -327,8 +327,8 @@ protected void customizeContainer(PlexusContainer container) { + customizedMavenCli.toolchains(cliRequest); + + InOrder orderdEventSpyDispatcherMock = inOrder(eventSpyDispatcherMock); +- orderdEventSpyDispatcherMock.verify(eventSpyDispatcherMock, times(1)).onEvent(any(ToolchainsBuildingRequest.class)); +- orderdEventSpyDispatcherMock.verify(eventSpyDispatcherMock, times(1)).onEvent(any(ToolchainsBuildingResult.class)); ++ orderdEventSpyDispatcherMock.verify(eventSpyDispatcherMock, times(1)).onEvent(isA(ToolchainsBuildingRequest.class)); ++ orderdEventSpyDispatcherMock.verify(eventSpyDispatcherMock, times(1)).onEvent(isA(ToolchainsBuildingResult.class)); + } + + } diff --git a/pom.xml b/pom.xml -index ef1d0b0..77b3395 100644 +index 237cdc39e..84fc037bc 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,7 @@ under the License. 1.4 - 3.5 + 3.8.1 4.12 -- 2.12.0 +- 2.21.0 + 1.10.19 1.7.1 - 1.24 - 3.1.0 + 1.25 + 3.2.0 -- -2.17.1 +2.20.1 diff --git a/0004-Revert-MNG-6479-Upgrade-XMLUnit-to-2.2.1-183.patch b/0004-Revert-MNG-6479-Upgrade-XMLUnit-to-2.2.1-183.patch new file mode 100644 index 0000000..f330081 --- /dev/null +++ b/0004-Revert-MNG-6479-Upgrade-XMLUnit-to-2.2.1-183.patch @@ -0,0 +1,252 @@ +From 4145b42a37b2b8ad87cfc464f62d7aace1b33ebf Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Sat, 13 Apr 2019 17:07:44 +0200 +Subject: [PATCH 4/4] Revert "[MNG-6479] Upgrade XMLUnit to 2.2.1 (#183)" + +This reverts commit 91fa89ea2876448bf73b47763d43307149601749. +--- + maven-model-builder/pom.xml | 10 +-- + .../DefaultInheritanceAssemblerTest.java | 66 +++++++++++-------- + .../plugin-configuration-expected.xml | 2 +- + pom.xml | 13 ---- + 4 files changed, 43 insertions(+), 48 deletions(-) + +diff --git a/maven-model-builder/pom.xml b/maven-model-builder/pom.xml +index 9b4f87027..9404d2524 100644 +--- a/maven-model-builder/pom.xml ++++ b/maven-model-builder/pom.xml +@@ -71,13 +71,9 @@ under the License. + test + + +- org.xmlunit +- xmlunit-core +- test +- +- +- org.xmlunit +- xmlunit-matchers ++ xmlunit ++ xmlunit ++ 1.6 + test + + +diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/inheritance/DefaultInheritanceAssemblerTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/inheritance/DefaultInheritanceAssemblerTest.java +index 07a121ae5..dce6c0123 100644 +--- a/maven-model-builder/src/test/java/org/apache/maven/model/inheritance/DefaultInheritanceAssemblerTest.java ++++ b/maven-model-builder/src/test/java/org/apache/maven/model/inheritance/DefaultInheritanceAssemblerTest.java +@@ -21,16 +21,21 @@ + + import org.apache.maven.model.Model; + import org.apache.maven.model.building.SimpleProblemCollector; ++import org.apache.maven.model.io.ModelParseException; + import org.apache.maven.model.io.ModelReader; + import org.apache.maven.model.io.ModelWriter; + import org.codehaus.plexus.PlexusTestCase; ++import org.custommonkey.xmlunit.XMLAssert; ++import org.custommonkey.xmlunit.XMLUnit; + +-import org.xmlunit.matchers.CompareMatcher; ++import junit.framework.AssertionFailedError; + + import java.io.File; ++import java.io.FileInputStream; + import java.io.IOException; +- +-import static org.junit.Assert.assertThat; ++import java.io.InputStreamReader; ++import java.io.Reader; ++import java.nio.charset.StandardCharsets; + + /** + * @author Hervé Boutemy +@@ -61,7 +66,7 @@ private File getPom( String name ) + } + + private Model getModel( String name ) +- throws IOException ++ throws ModelParseException, IOException + { + return reader.read( getPom( name ), null ); + } +@@ -75,7 +80,7 @@ public void testPluginConfiguration() + /** + * Check most classical urls inheritance: directory structure where parent POM in parent directory + * and child directory == artifactId +- * @throws IOException Model read problem ++ * @throws Exception + */ + public void testUrls() + throws Exception +@@ -85,10 +90,10 @@ public void testUrls() + + /** + * Flat directory structure: parent & child POMs in sibling directories, child directory == artifactId. +- * @throws IOException Model read problem ++ * @throws Exception + */ + public void testFlatUrls() +- throws IOException ++ throws Exception + { + testInheritance( "flat-urls" ); + } +@@ -127,10 +132,10 @@ public void testNoAppendUrls3() + * Tricky case: flat directory structure, but child directory != artifactId. + * Model interpolation does not give same result when calculated from build or from repo... + * This is why MNG-5000 fix in code is marked as bad practice (uses file names) +- * @throws IOException Model read problem ++ * @throws Exception + */ + public void testFlatTrickyUrls() +- throws IOException ++ throws Exception + { + // parent references child with artifactId (which is not directory name) + // then relative path calculation will fail during build from disk but success when calculated from repo +@@ -140,49 +145,46 @@ public void testFlatTrickyUrls() + testInheritance( "tricky-flat-artifactId-urls", false ); + //fail( "should have failed since module reference == artifactId != directory name" ); + } +- catch ( AssertionError afe ) ++ catch ( AssertionFailedError afe ) + { + // expected failure: wrong relative path calculation + assertTrue( afe.getMessage(), +- afe.getMessage().contains( +- "Expected text value 'http://www.apache.org/path/to/parent/child-artifact-id/' but was " + +- "'http://www.apache.org/path/to/parent/../child-artifact-id/'" ) ); ++ afe.getMessage().contains( "http://www.apache.org/path/to/parent/child-artifact-id/" ) ); + } + // but ok from repo: local disk is ignored + testInheritance( "tricky-flat-artifactId-urls", true ); + + // parent references child with directory name (which is not artifact id) +- // then relative path calculation will success during build from disk but fail when calculated from repo ++ // then relative path calculation will success during build from disk but failwhen calculated from repo + testInheritance( "tricky-flat-directory-urls", false ); + try + { + testInheritance( "tricky-flat-directory-urls", true ); + fail( "should have failed since module reference == directory name != artifactId" ); + } +- catch ( AssertionError afe ) ++ catch ( AssertionFailedError afe ) + { + // expected failure +- assertTrue( afe.getMessage(), afe.getMessage().contains( +- "Expected text value 'http://www.apache.org/path/to/parent/../child-artifact-id/' but was " + +- "'http://www.apache.org/path/to/parent/child-artifact-id/'" ) ); ++ assertTrue( afe.getMessage(), ++ afe.getMessage().contains( "http://www.apache.org/path/to/parent/child-artifact-id/" ) ); + } + } + + public void testWithEmptyUrl() +- throws IOException ++ throws Exception + { + testInheritance( "empty-urls", false ); + } + + public void testInheritance( String baseName ) +- throws IOException ++ throws Exception + { + testInheritance( baseName, false ); + testInheritance( baseName, true ); + } + + public void testInheritance( String baseName, boolean fromRepo ) +- throws IOException ++ throws Exception + { + Model parent = getModel( baseName + "-parent" ); + +@@ -207,12 +209,17 @@ public void testInheritance( String baseName, boolean fromRepo ) + + // check with getPom( baseName + "-expected" ) + File expected = getPom( baseName + "-expected" ); +- +- assertThat( actual, CompareMatcher.isIdenticalTo( expected ).ignoreComments().ignoreWhitespace() ); +- } ++ try ( Reader control = new InputStreamReader( new FileInputStream( expected ), StandardCharsets.UTF_8 ); ++ Reader test = new InputStreamReader( new FileInputStream( actual ), StandardCharsets.UTF_8 ) ) ++ { ++ XMLUnit.setIgnoreComments( true ); ++ XMLUnit.setIgnoreWhitespace( true ); ++ XMLAssert.assertXMLEqual( control, test ); ++ } ++ } + + public void testModulePathNotArtifactId() +- throws IOException ++ throws Exception + { + Model parent = getModel( "module-path-not-artifactId-parent" ); + +@@ -228,7 +235,12 @@ public void testModulePathNotArtifactId() + + // check with getPom( "module-path-not-artifactId-effective" ) + File expected = getPom( "module-path-not-artifactId-expected" ); +- +- assertThat( actual, CompareMatcher.isIdenticalTo(expected).ignoreComments().ignoreWhitespace() ); ++ try ( Reader control = new InputStreamReader( new FileInputStream( expected ), StandardCharsets.UTF_8 ); ++ Reader test = new InputStreamReader( new FileInputStream( actual ), StandardCharsets.UTF_8 ) ) ++ { ++ XMLUnit.setIgnoreComments( true ); ++ XMLUnit.setIgnoreWhitespace( true ); ++ XMLAssert.assertXMLEqual( control, test ); ++ } + } + } +diff --git a/maven-model-builder/src/test/resources/poms/inheritance/plugin-configuration-expected.xml b/maven-model-builder/src/test/resources/poms/inheritance/plugin-configuration-expected.xml +index 318ee4488..00a21f3dd 100644 +--- a/maven-model-builder/src/test/resources/poms/inheritance/plugin-configuration-expected.xml ++++ b/maven-model-builder/src/test/resources/poms/inheritance/plugin-configuration-expected.xml +@@ -34,9 +34,9 @@ under the License. + + + parent ++ post@mailing.list.com + subscribe@mailing.list.com + unsubscribe@mailing.list.com +- post@mailing.list.com + + + +diff --git a/pom.xml b/pom.xml +index 84fc037bc..2e7907137 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -66,7 +66,6 @@ under the License. + 1.3 + 1.3.3 + 1.7.25 +- 2.2.1 + true + + apache-maven +@@ -405,18 +404,6 @@ under the License. + ${mockitoVersion} + test + +- +- org.xmlunit +- xmlunit-core +- ${xmlunitVersion} +- test +- +- +- org.xmlunit +- xmlunit-matchers +- ${xmlunitVersion} +- test +- + + + +-- +2.20.1 + diff --git a/maven.spec b/maven.spec index 2be1bc2..2492891 100644 --- a/maven.spec +++ b/maven.spec @@ -1,12 +1,11 @@ - %global bundled_slf4j_version 1.7.26 %global homedir %{_datadir}/%{name}%{?maven_version_suffix} %global confdir %{_sysconfdir}/%{name}%{?maven_version_suffix} Name: maven Epoch: 1 -Version: 3.5.4 -Release: 6%{?dist} +Version: 3.6.1 +Release: 1%{?dist} Summary: Java project management and project comprehension tool # maven itself is ASL 2.0 # bundled slf4j is MIT @@ -14,7 +13,7 @@ License: ASL 2.0 and MIT URL: http://maven.apache.org/ BuildArch: noarch -Source0: http://archive.apache.org/dist/%{name}/%{name}-3/%{version}/source/apache-%{name}-%{version}-src.tar.gz +Source0: http://archive.apache.org/dist/%{name}/%{name}-3/%{version}/sources/apache-%{name}-%{version}-src.tar.gz Source1: maven-bash-completion Source2: mvn.1 @@ -24,9 +23,10 @@ Patch1: 0001-Adapt-mvn-script.patch Patch2: 0002-Invoke-logback-via-reflection.patch # We don't have mockito 2 yet Patch3: 0003-Revert-MNG-6335-Update-Mockito-to-2.12.0.patch +# We don't have xmlunit 2 yet +Patch4: 0004-Revert-MNG-6479-Upgrade-XMLUnit-to-2.2.1-183.patch BuildRequires: maven-local -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) @@ -47,24 +47,24 @@ 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.modello:modello-maven-plugin) >= 1.10.0 BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) 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-utils) +BuildRequires: mvn(org.codehaus.plexus:plexus-utils) >= 3.2.0 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.mockito:mockito-core) +BuildRequires: mvn(org.mockito:mockito-core) < 2 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: mvn(xmlunit:xmlunit) < 2 BuildRequires: slf4j-sources = %{bundled_slf4j_version} @@ -94,7 +94,7 @@ Requires: atinject Requires: cdi-api Requires: geronimo-annotation Requires: google-guice -Requires: guava20 +Requires: guava Requires: hawtjni-runtime Requires: httpcomponents-client Requires: httpcomponents-core @@ -155,7 +155,9 @@ Summary: API documentation for %{name} %setup -q -n apache-%{name}-%{version} %patch1 -p1 +%patch2 -p1 %patch3 -p1 +%patch4 -p1 # not really used during build, but a precaution find -name '*.jar' -not -path '*/test/*' -delete @@ -184,7 +186,6 @@ sed -i " %mvn_package :apache-maven __noinstall %pom_remove_dep -r :logback-classic -%patch2 -p1 %mvn_alias :maven-resolver-provider :maven-aether-provider @@ -269,6 +270,9 @@ update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alt %changelog +* Sat Apr 13 2019 Mikolaj Izdebski - 1:3.6.1-1 +- Update to upstream version 3.6.1 + * Fri Apr 12 2019 Mikolaj Izdebski - 1:3.5.4-6 - Update SLF4J version to 1.7.26 diff --git a/sources b/sources index 97c23dc..3599cb3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (apache-maven-3.5.4-src.tar.gz) = faf3c13af3350d056fd49aa3d0a631533a0340332bda8f88a9d8a4c489ec291981b29354a9ed6ff7a8565e0b79eaf16803f908067c5dbd16820cd9025852b39f +SHA512 (apache-maven-3.6.1-src.tar.gz) = 11a31022cffa0518584703fffd9fce998332ac5f6c2a50db3b590e90f3bdd1508d9e0cb5ba89a699ef6536b237bcc96166cfde3d45bce6346fa21b05b4d12bf8 From 552c6341de7c2180413ce58f15637bf6f9d66a88 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 15 Apr 2019 14:48:12 +0200 Subject: [PATCH 04/53] Build against XMLUnit 2 --- ...NG-6479-Upgrade-XMLUnit-to-2.2.1-183.patch | 252 ------------------ maven.spec | 5 +- 2 files changed, 1 insertion(+), 256 deletions(-) delete mode 100644 0004-Revert-MNG-6479-Upgrade-XMLUnit-to-2.2.1-183.patch diff --git a/0004-Revert-MNG-6479-Upgrade-XMLUnit-to-2.2.1-183.patch b/0004-Revert-MNG-6479-Upgrade-XMLUnit-to-2.2.1-183.patch deleted file mode 100644 index f330081..0000000 --- a/0004-Revert-MNG-6479-Upgrade-XMLUnit-to-2.2.1-183.patch +++ /dev/null @@ -1,252 +0,0 @@ -From 4145b42a37b2b8ad87cfc464f62d7aace1b33ebf Mon Sep 17 00:00:00 2001 -From: Mikolaj Izdebski -Date: Sat, 13 Apr 2019 17:07:44 +0200 -Subject: [PATCH 4/4] Revert "[MNG-6479] Upgrade XMLUnit to 2.2.1 (#183)" - -This reverts commit 91fa89ea2876448bf73b47763d43307149601749. ---- - maven-model-builder/pom.xml | 10 +-- - .../DefaultInheritanceAssemblerTest.java | 66 +++++++++++-------- - .../plugin-configuration-expected.xml | 2 +- - pom.xml | 13 ---- - 4 files changed, 43 insertions(+), 48 deletions(-) - -diff --git a/maven-model-builder/pom.xml b/maven-model-builder/pom.xml -index 9b4f87027..9404d2524 100644 ---- a/maven-model-builder/pom.xml -+++ b/maven-model-builder/pom.xml -@@ -71,13 +71,9 @@ under the License. - test - - -- org.xmlunit -- xmlunit-core -- test -- -- -- org.xmlunit -- xmlunit-matchers -+ xmlunit -+ xmlunit -+ 1.6 - test - - -diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/inheritance/DefaultInheritanceAssemblerTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/inheritance/DefaultInheritanceAssemblerTest.java -index 07a121ae5..dce6c0123 100644 ---- a/maven-model-builder/src/test/java/org/apache/maven/model/inheritance/DefaultInheritanceAssemblerTest.java -+++ b/maven-model-builder/src/test/java/org/apache/maven/model/inheritance/DefaultInheritanceAssemblerTest.java -@@ -21,16 +21,21 @@ - - import org.apache.maven.model.Model; - import org.apache.maven.model.building.SimpleProblemCollector; -+import org.apache.maven.model.io.ModelParseException; - import org.apache.maven.model.io.ModelReader; - import org.apache.maven.model.io.ModelWriter; - import org.codehaus.plexus.PlexusTestCase; -+import org.custommonkey.xmlunit.XMLAssert; -+import org.custommonkey.xmlunit.XMLUnit; - --import org.xmlunit.matchers.CompareMatcher; -+import junit.framework.AssertionFailedError; - - import java.io.File; -+import java.io.FileInputStream; - import java.io.IOException; -- --import static org.junit.Assert.assertThat; -+import java.io.InputStreamReader; -+import java.io.Reader; -+import java.nio.charset.StandardCharsets; - - /** - * @author Hervé Boutemy -@@ -61,7 +66,7 @@ private File getPom( String name ) - } - - private Model getModel( String name ) -- throws IOException -+ throws ModelParseException, IOException - { - return reader.read( getPom( name ), null ); - } -@@ -75,7 +80,7 @@ public void testPluginConfiguration() - /** - * Check most classical urls inheritance: directory structure where parent POM in parent directory - * and child directory == artifactId -- * @throws IOException Model read problem -+ * @throws Exception - */ - public void testUrls() - throws Exception -@@ -85,10 +90,10 @@ public void testUrls() - - /** - * Flat directory structure: parent & child POMs in sibling directories, child directory == artifactId. -- * @throws IOException Model read problem -+ * @throws Exception - */ - public void testFlatUrls() -- throws IOException -+ throws Exception - { - testInheritance( "flat-urls" ); - } -@@ -127,10 +132,10 @@ public void testNoAppendUrls3() - * Tricky case: flat directory structure, but child directory != artifactId. - * Model interpolation does not give same result when calculated from build or from repo... - * This is why MNG-5000 fix in code is marked as bad practice (uses file names) -- * @throws IOException Model read problem -+ * @throws Exception - */ - public void testFlatTrickyUrls() -- throws IOException -+ throws Exception - { - // parent references child with artifactId (which is not directory name) - // then relative path calculation will fail during build from disk but success when calculated from repo -@@ -140,49 +145,46 @@ public void testFlatTrickyUrls() - testInheritance( "tricky-flat-artifactId-urls", false ); - //fail( "should have failed since module reference == artifactId != directory name" ); - } -- catch ( AssertionError afe ) -+ catch ( AssertionFailedError afe ) - { - // expected failure: wrong relative path calculation - assertTrue( afe.getMessage(), -- afe.getMessage().contains( -- "Expected text value 'http://www.apache.org/path/to/parent/child-artifact-id/' but was " + -- "'http://www.apache.org/path/to/parent/../child-artifact-id/'" ) ); -+ afe.getMessage().contains( "http://www.apache.org/path/to/parent/child-artifact-id/" ) ); - } - // but ok from repo: local disk is ignored - testInheritance( "tricky-flat-artifactId-urls", true ); - - // parent references child with directory name (which is not artifact id) -- // then relative path calculation will success during build from disk but fail when calculated from repo -+ // then relative path calculation will success during build from disk but failwhen calculated from repo - testInheritance( "tricky-flat-directory-urls", false ); - try - { - testInheritance( "tricky-flat-directory-urls", true ); - fail( "should have failed since module reference == directory name != artifactId" ); - } -- catch ( AssertionError afe ) -+ catch ( AssertionFailedError afe ) - { - // expected failure -- assertTrue( afe.getMessage(), afe.getMessage().contains( -- "Expected text value 'http://www.apache.org/path/to/parent/../child-artifact-id/' but was " + -- "'http://www.apache.org/path/to/parent/child-artifact-id/'" ) ); -+ assertTrue( afe.getMessage(), -+ afe.getMessage().contains( "http://www.apache.org/path/to/parent/child-artifact-id/" ) ); - } - } - - public void testWithEmptyUrl() -- throws IOException -+ throws Exception - { - testInheritance( "empty-urls", false ); - } - - public void testInheritance( String baseName ) -- throws IOException -+ throws Exception - { - testInheritance( baseName, false ); - testInheritance( baseName, true ); - } - - public void testInheritance( String baseName, boolean fromRepo ) -- throws IOException -+ throws Exception - { - Model parent = getModel( baseName + "-parent" ); - -@@ -207,12 +209,17 @@ public void testInheritance( String baseName, boolean fromRepo ) - - // check with getPom( baseName + "-expected" ) - File expected = getPom( baseName + "-expected" ); -- -- assertThat( actual, CompareMatcher.isIdenticalTo( expected ).ignoreComments().ignoreWhitespace() ); -- } -+ try ( Reader control = new InputStreamReader( new FileInputStream( expected ), StandardCharsets.UTF_8 ); -+ Reader test = new InputStreamReader( new FileInputStream( actual ), StandardCharsets.UTF_8 ) ) -+ { -+ XMLUnit.setIgnoreComments( true ); -+ XMLUnit.setIgnoreWhitespace( true ); -+ XMLAssert.assertXMLEqual( control, test ); -+ } -+ } - - public void testModulePathNotArtifactId() -- throws IOException -+ throws Exception - { - Model parent = getModel( "module-path-not-artifactId-parent" ); - -@@ -228,7 +235,12 @@ public void testModulePathNotArtifactId() - - // check with getPom( "module-path-not-artifactId-effective" ) - File expected = getPom( "module-path-not-artifactId-expected" ); -- -- assertThat( actual, CompareMatcher.isIdenticalTo(expected).ignoreComments().ignoreWhitespace() ); -+ try ( Reader control = new InputStreamReader( new FileInputStream( expected ), StandardCharsets.UTF_8 ); -+ Reader test = new InputStreamReader( new FileInputStream( actual ), StandardCharsets.UTF_8 ) ) -+ { -+ XMLUnit.setIgnoreComments( true ); -+ XMLUnit.setIgnoreWhitespace( true ); -+ XMLAssert.assertXMLEqual( control, test ); -+ } - } - } -diff --git a/maven-model-builder/src/test/resources/poms/inheritance/plugin-configuration-expected.xml b/maven-model-builder/src/test/resources/poms/inheritance/plugin-configuration-expected.xml -index 318ee4488..00a21f3dd 100644 ---- a/maven-model-builder/src/test/resources/poms/inheritance/plugin-configuration-expected.xml -+++ b/maven-model-builder/src/test/resources/poms/inheritance/plugin-configuration-expected.xml -@@ -34,9 +34,9 @@ under the License. - - - parent -+ post@mailing.list.com - subscribe@mailing.list.com - unsubscribe@mailing.list.com -- post@mailing.list.com - - - -diff --git a/pom.xml b/pom.xml -index 84fc037bc..2e7907137 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -66,7 +66,6 @@ under the License. - 1.3 - 1.3.3 - 1.7.25 -- 2.2.1 - true - - apache-maven -@@ -405,18 +404,6 @@ under the License. - ${mockitoVersion} - test - -- -- org.xmlunit -- xmlunit-core -- ${xmlunitVersion} -- test -- -- -- org.xmlunit -- xmlunit-matchers -- ${xmlunitVersion} -- test -- - - - --- -2.20.1 - diff --git a/maven.spec b/maven.spec index 2492891..75559f5 100644 --- a/maven.spec +++ b/maven.spec @@ -23,8 +23,6 @@ Patch1: 0001-Adapt-mvn-script.patch Patch2: 0002-Invoke-logback-via-reflection.patch # We don't have mockito 2 yet Patch3: 0003-Revert-MNG-6335-Update-Mockito-to-2.12.0.patch -# We don't have xmlunit 2 yet -Patch4: 0004-Revert-MNG-6479-Upgrade-XMLUnit-to-2.2.1-183.patch BuildRequires: maven-local BuildRequires: mvn(com.google.inject:guice::no_aop:) @@ -64,7 +62,7 @@ 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) < 2 +BuildRequires: mvn(xmlunit:xmlunit) >= 2 BuildRequires: slf4j-sources = %{bundled_slf4j_version} @@ -157,7 +155,6 @@ Summary: API documentation for %{name} %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 # not really used during build, but a precaution find -name '*.jar' -not -path '*/test/*' -delete From d18a8dccf1ca1b881e3967a8d76cfaa2287395d2 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Mon, 15 Apr 2019 15:41:14 +0200 Subject: [PATCH 05/53] Fix xmlunit BuildRequires --- maven.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/maven.spec b/maven.spec index 75559f5..12dd7c1 100644 --- a/maven.spec +++ b/maven.spec @@ -62,7 +62,8 @@ 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) >= 2 +BuildRequires: mvn(org.xmlunit:xmlunit-core) +BuildRequires: mvn(org.xmlunit:xmlunit-matchers) BuildRequires: slf4j-sources = %{bundled_slf4j_version} From 512a4ddea8025a71449ad87a545d5c8575a3a28d Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Wed, 17 Apr 2019 03:45:20 +0200 Subject: [PATCH 06/53] Update to Mockito 2 --- ...rt-MNG-6335-Update-Mockito-to-2.12.0.patch | 205 ------------------ maven.spec | 10 +- 2 files changed, 5 insertions(+), 210 deletions(-) delete mode 100644 0003-Revert-MNG-6335-Update-Mockito-to-2.12.0.patch diff --git a/0003-Revert-MNG-6335-Update-Mockito-to-2.12.0.patch b/0003-Revert-MNG-6335-Update-Mockito-to-2.12.0.patch deleted file mode 100644 index b60bdd1..0000000 --- a/0003-Revert-MNG-6335-Update-Mockito-to-2.12.0.patch +++ /dev/null @@ -1,205 +0,0 @@ -From e3b125fab7973d647288b9039fc897438b27c203 Mon Sep 17 00:00:00 2001 -From: Michael Simacek -Date: Tue, 13 Mar 2018 11:49:16 +0100 -Subject: [PATCH 3/4] 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 - - .../java/org/apache/maven/cli/MavenCliTest.java | 6 +++--- - pom.xml | 2 +- - 6 files changed, 22 insertions(+), 20 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 c93756463..1e4844154 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 @@ - */ - - 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 void testToolchainsForConfiguredType() - 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 void testMisconfiguredToolchain() - 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 84444c08e..6e85c4246 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 @@ - */ - - 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.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 void testRequirements() - executionRequest.setToolchains( toolchainModels ); - when( session.getRequest() ).thenReturn( executionRequest ); - ToolchainPrivate basicPrivate = mock( ToolchainPrivate.class ); -- when( basicPrivate.matchesRequirements( ArgumentMatchers.anyMap() ) ).thenReturn( false ).thenReturn( true ); -+ when( basicPrivate.matchesRequirements( anyMap() ) ).thenReturn( false ).thenReturn( true ); - when( toolchainFactory_basicType.createToolchain( isA( ToolchainModel.class ) ) ).thenReturn( basicPrivate ); - - List 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 fc530df5a..80fca0942 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 @@ - - 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.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 void testBuildRequestWithUserToolchains() - toolchain.setType( "TYPE" ); - toolchain.addProvide( "key", "user_value" ); - userResult.addToolchain( toolchain ); -- when( toolchainsReader.read( any( InputStream.class ), ArgumentMatchers.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 void testBuildRequestWithGlobalToolchains() - toolchain.setType( "TYPE" ); - toolchain.addProvide( "key", "global_value" ); - globalResult.addToolchain( toolchain ); -- when( toolchainsReader.read( any( InputStream.class ), ArgumentMatchers.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 void testBuildRequestWithBothToolchains() - globalToolchain.setType( "TYPE" ); - globalToolchain.addProvide( "key", "global_value" ); - globalResult.addToolchain( globalToolchain ); -- when( toolchainsReader.read( any( InputStream.class ), ArgumentMatchers.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 void testStrictToolchainsParseException() throws Exception - ToolchainsBuildingRequest request = new DefaultToolchainsBuildingRequest(); - request.setGlobalToolchainsSource( new StringSource( "" ) ); - ToolchainsParseException parseException = new ToolchainsParseException( "MESSAGE", 4, 2 ); -- when( toolchainsReader.read( any( InputStream.class ), ArgumentMatchers.anyMap()) ).thenThrow( parseException ); -+ when( toolchainsReader.read( any( InputStream.class ), anyMap() ) ).thenThrow( parseException ); - - try - { -@@ -169,7 +169,7 @@ public void testIOException() throws Exception - ToolchainsBuildingRequest request = new DefaultToolchainsBuildingRequest(); - request.setGlobalToolchainsSource( new StringSource( "", "LOCATION" ) ); - IOException ioException = new IOException( "MESSAGE" ); -- when( toolchainsReader.read( any( InputStream.class ), ArgumentMatchers.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 e32819196..3320d6c99 100644 ---- a/maven-embedder/pom.xml -+++ b/maven-embedder/pom.xml -@@ -137,7 +137,6 @@ under the License. - - org.mockito - mockito-core -- test - - - org.fusesource.jansi -diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java b/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java -index 5f4c5b69a..88810d936 100644 ---- a/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java -+++ b/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java -@@ -24,7 +24,7 @@ - import static org.junit.Assert.assertTrue; - import static org.junit.Assert.fail; - import static org.junit.Assume.assumeTrue; --import static org.mockito.Mockito.any; -+import static org.mockito.Mockito.isA; - import static org.mockito.Mockito.inOrder; - import static org.mockito.Mockito.mock; - import static org.mockito.Mockito.times; -@@ -327,8 +327,8 @@ protected void customizeContainer(PlexusContainer container) { - customizedMavenCli.toolchains(cliRequest); - - InOrder orderdEventSpyDispatcherMock = inOrder(eventSpyDispatcherMock); -- orderdEventSpyDispatcherMock.verify(eventSpyDispatcherMock, times(1)).onEvent(any(ToolchainsBuildingRequest.class)); -- orderdEventSpyDispatcherMock.verify(eventSpyDispatcherMock, times(1)).onEvent(any(ToolchainsBuildingResult.class)); -+ orderdEventSpyDispatcherMock.verify(eventSpyDispatcherMock, times(1)).onEvent(isA(ToolchainsBuildingRequest.class)); -+ orderdEventSpyDispatcherMock.verify(eventSpyDispatcherMock, times(1)).onEvent(isA(ToolchainsBuildingResult.class)); - } - - } -diff --git a/pom.xml b/pom.xml -index 237cdc39e..84fc037bc 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -53,7 +53,7 @@ under the License. - 1.4 - 3.8.1 - 4.12 -- 2.21.0 -+ 1.10.19 - 1.7.1 - 1.25 - 3.2.0 --- -2.20.1 - diff --git a/maven.spec b/maven.spec index 12dd7c1..bd4a486 100644 --- a/maven.spec +++ b/maven.spec @@ -5,7 +5,7 @@ Name: maven Epoch: 1 Version: 3.6.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Java project management and project comprehension tool # maven itself is ASL 2.0 # bundled slf4j is MIT @@ -21,8 +21,6 @@ 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 -# We don't have mockito 2 yet -Patch3: 0003-Revert-MNG-6335-Update-Mockito-to-2.12.0.patch BuildRequires: maven-local BuildRequires: mvn(com.google.inject:guice::no_aop:) @@ -56,7 +54,7 @@ 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.mockito:mockito-core) < 2 +BuildRequires: mvn(org.mockito:mockito-core) >= 2 BuildRequires: mvn(org.slf4j:jcl-over-slf4j) BuildRequires: mvn(org.slf4j:slf4j-api) BuildRequires: mvn(org.slf4j:slf4j-simple) @@ -155,7 +153,6 @@ Summary: API documentation for %{name} %patch1 -p1 %patch2 -p1 -%patch3 -p1 # not really used during build, but a precaution find -name '*.jar' -not -path '*/test/*' -delete @@ -268,6 +265,9 @@ update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alt %changelog +* Wed Apr 17 2019 Mikolaj Izdebski - 1:3.6.1-2 +- Update to Mockito 2 + * Sat Apr 13 2019 Mikolaj Izdebski - 1:3.6.1-1 - Update to upstream version 3.6.1 From 0bb8e05ca3af3cea51231f44a1328715e3d3a436 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Tue, 21 May 2019 10:16:42 +0200 Subject: [PATCH 07/53] Expand macros in java-devel Recommends --- maven.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maven.spec b/maven.spec index bd4a486..9630ec2 100644 --- a/maven.spec +++ b/maven.spec @@ -73,7 +73,7 @@ Requires(postun): chkconfig # Theoretically Maven might be usable with just JRE, but typical Maven # workflow requires full JDK, so we recommend it here. -%{?fedora:Recommends}%{!?fedora:Requires}: java-devel +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 From c3354fde79739e6b1910d56bcac3106daac0e85f Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Tue, 21 May 2019 10:17:18 +0200 Subject: [PATCH 08/53] Try using boolean deps for Requires on alternatives --- maven.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maven.spec b/maven.spec index 9630ec2..1f10c5b 100644 --- a/maven.spec +++ b/maven.spec @@ -68,8 +68,8 @@ BuildRequires: slf4j-sources = %{bundled_slf4j_version} Requires: %{name}-lib = %{epoch}:%{version}-%{release} -Requires(post): chkconfig -Requires(postun): chkconfig +Requires(post): (alternatives if fedora-release >= 30 else chkconfig) +Requires(postun): (alternatives if fedora-release >= 30 else chkconfig) # Theoretically Maven might be usable with just JRE, but typical Maven # workflow requires full JDK, so we recommend it here. From 158ba408cae1e6e559b3d1a343b6cd145095453e Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 24 May 2019 17:00:57 +0200 Subject: [PATCH 09/53] Mass rebuild for javapackages-tools 201901 --- maven.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/maven.spec b/maven.spec index 1f10c5b..cfc9cdb 100644 --- a/maven.spec +++ b/maven.spec @@ -5,7 +5,7 @@ Name: maven Epoch: 1 Version: 3.6.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Java project management and project comprehension tool # maven itself is ASL 2.0 # bundled slf4j is MIT @@ -265,6 +265,9 @@ update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alt %changelog +* Fri May 24 2019 Mikolaj Izdebski - 1:3.6.1-3 +- Mass rebuild for javapackages-tools 201901 + * Wed Apr 17 2019 Mikolaj Izdebski - 1:3.6.1-2 - Update to Mockito 2 From 1cb745f99881a2831a2b49405de6125a47331878 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 30 May 2019 11:52:50 +0200 Subject: [PATCH 10/53] Backport upstream fix for Tycho P2 integarion --- 0001-Adapt-mvn-script.patch | 6 +-- 0002-Invoke-logback-via-reflection.patch | 6 +-- ...MNG-5995-Remove-dependency-to-maven-.patch | 52 +++++++++++++++++++ maven.spec | 7 ++- 4 files changed, 64 insertions(+), 7 deletions(-) create mode 100644 0003-MNG-6642-Revert-MNG-5995-Remove-dependency-to-maven-.patch diff --git a/0001-Adapt-mvn-script.patch b/0001-Adapt-mvn-script.patch index bff3bd3..aeac507 100644 --- a/0001-Adapt-mvn-script.patch +++ b/0001-Adapt-mvn-script.patch @@ -1,7 +1,7 @@ -From 7f6fe1e63da317cb497da815f8d90cd6873f0351 Mon Sep 17 00:00:00 2001 +From 9e51d86115b066cbf3d44392810b3f6fd63fdfc9 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 +Subject: [PATCH 1/3] Adapt mvn script --- apache-maven/src/bin/mvn | 19 ++++++++++++++++--- @@ -65,5 +65,5 @@ index a554c6617..818cf70b8 100755 # For Cygwin, switch paths to Windows format before running java -- -2.20.1 +2.21.0 diff --git a/0002-Invoke-logback-via-reflection.patch b/0002-Invoke-logback-via-reflection.patch index 991ba63..4ab9c09 100644 --- a/0002-Invoke-logback-via-reflection.patch +++ b/0002-Invoke-logback-via-reflection.patch @@ -1,7 +1,7 @@ -From a676bedf0fe2386b3afd5da817202acaf271eaa1 Mon Sep 17 00:00:00 2001 +From 4fa2cfaa19a0752a656b2a223a77c3af25d2de12 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 +Subject: [PATCH 2/3] Invoke logback via reflection --- .../logging/impl/LogbackConfiguration.java | 19 ++++++++++++++----- @@ -49,5 +49,5 @@ index 5d9fab744..ced38cb5a 100644 @Override -- -2.20.1 +2.21.0 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 new file mode 100644 index 0000000..6d517b1 --- /dev/null +++ b/0003-MNG-6642-Revert-MNG-5995-Remove-dependency-to-maven-.patch @@ -0,0 +1,52 @@ +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 + maven-compat (#185)" + +This partially reverts commit bb3ec5da71d26d105972392f0a20bc61bc5d8c53 to restore working with Tycho P2 repository. +--- + .../apache/maven/project/DefaultProjectBuildingHelper.java | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java +index 0bd94a86a..3159fac6b 100644 +--- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java ++++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java +@@ -33,7 +33,6 @@ + import org.apache.maven.artifact.Artifact; + import org.apache.maven.artifact.InvalidRepositoryException; + import org.apache.maven.artifact.repository.ArtifactRepository; +-import org.apache.maven.bridge.MavenRepositorySystem; + import org.apache.maven.classrealm.ClassRealmManager; + import org.apache.maven.model.Build; + import org.apache.maven.model.Extension; +@@ -45,6 +44,7 @@ + import org.apache.maven.plugin.PluginManagerException; + import org.apache.maven.plugin.PluginResolutionException; + import org.apache.maven.plugin.version.PluginVersionResolutionException; ++import org.apache.maven.repository.RepositorySystem; + import org.codehaus.plexus.PlexusContainer; + import org.codehaus.plexus.classworlds.realm.ClassRealm; + import org.codehaus.plexus.component.annotations.Component; +@@ -78,7 +78,7 @@ + private ProjectRealmCache projectRealmCache; + + @Requirement +- private MavenRepositorySystem repositorySystem; ++ private RepositorySystem repositorySystem; + + @Requirement + private MavenPluginManager pluginManager; +@@ -92,7 +92,7 @@ + + for ( Repository repository : pomRepositories ) + { +- internalRepositories.add( MavenRepositorySystem.buildArtifactRepository( repository ) ); ++ internalRepositories.add( repositorySystem.buildArtifactRepository( repository ) ); + } + + repositorySystem.injectMirror( request.getRepositorySession(), internalRepositories ); +-- +2.21.0 + diff --git a/maven.spec b/maven.spec index cfc9cdb..f7a2725 100644 --- a/maven.spec +++ b/maven.spec @@ -5,7 +5,7 @@ Name: maven Epoch: 1 Version: 3.6.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Java project management and project comprehension tool # maven itself is ASL 2.0 # bundled slf4j is MIT @@ -21,6 +21,7 @@ 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-MNG-6642-Revert-MNG-5995-Remove-dependency-to-maven-.patch BuildRequires: maven-local BuildRequires: mvn(com.google.inject:guice::no_aop:) @@ -153,6 +154,7 @@ Summary: API documentation for %{name} %patch1 -p1 %patch2 -p1 +%patch3 -p1 # not really used during build, but a precaution find -name '*.jar' -not -path '*/test/*' -delete @@ -265,6 +267,9 @@ update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alt %changelog +* Thu May 30 2019 Mikolaj Izdebski - 1:3.6.1-4 +- Backport upstream fix for Tycho P2 integarion + * Fri May 24 2019 Mikolaj Izdebski - 1:3.6.1-3 - Mass rebuild for javapackages-tools 201901 From fb2a269fa60591201e8d69d691456048fca9b843 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sat, 29 Jun 2019 12:33:06 +0200 Subject: [PATCH 11/53] Fix requires on maven-wagon and sisu --- maven.spec | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/maven.spec b/maven.spec index f7a2725..dc9ed96 100644 --- a/maven.spec +++ b/maven.spec @@ -106,18 +106,14 @@ 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: maven-wagon 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: sisu Requires: slf4j %description From 1cc7f8ab12755562d8bd33c72a901f0d5996a00b Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sat, 29 Jun 2019 13:09:04 +0200 Subject: [PATCH 12/53] Fix requires on maven-resolver --- maven.spec | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/maven.spec b/maven.spec index dc9ed96..156e8f3 100644 --- a/maven.spec +++ b/maven.spec @@ -99,12 +99,7 @@ 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-resolver Requires: maven-shared-utils Requires: maven-wagon Requires: plexus-cipher From 0aef973c520706f5d37b70249511ad57d1868161 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sat, 29 Jun 2019 13:32:31 +0200 Subject: [PATCH 13/53] Use javadoc_package macro --- maven.spec | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/maven.spec b/maven.spec index 156e8f3..b7dddba 100644 --- a/maven.spec +++ b/maven.spec @@ -134,11 +134,7 @@ Provides: bundled(slf4j) = %{bundled_slf4j_version} %description lib Core part of Apache Maven that can be used as a library. -%package javadoc -Summary: API documentation for %{name} - -%description javadoc -%{summary}. +%{?javadoc_package} %prep %setup -q -n apache-%{name}-%{version} @@ -253,9 +249,6 @@ update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alt %ghost %{_mandir}/man1/mvn.1.gz %ghost %{_mandir}/man1/mvnDebug.1.gz -%files javadoc -f .mfiles-javadoc -%license LICENSE NOTICE - %changelog * Thu May 30 2019 Mikolaj Izdebski - 1:3.6.1-4 From 86248a8a468b47034364ad6b110ed81e6c5e425b Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sat, 29 Jun 2019 13:34:25 +0200 Subject: [PATCH 14/53] Add module prefixes to package names --- maven.spec | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/maven.spec b/maven.spec index b7dddba..61d5a32 100644 --- a/maven.spec +++ b/maven.spec @@ -116,7 +116,7 @@ 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 lib +%package -n %{?module_prefix}%{name}-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. @@ -131,9 +131,10 @@ Requires: javapackages-tools # maven-slf4j-provider.jar, together with Maven-specific additions. Provides: bundled(slf4j) = %{bundled_slf4j_version} -%description lib +%description -n %{?module_prefix}%{name}-lib Core part of Apache Maven that can be used as a library. +%{?module_package} %{?javadoc_package} %prep @@ -222,17 +223,17 @@ touch %{buildroot}%{_bindir}/{mvn,mvnDebug} touch %{buildroot}%{_mandir}/man1/{mvn,mvnDebug}.1 -%post +%post -n %{?module_prefix}%{name} 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 +%postun -n %{?module_prefix}%{name} [[ $1 -eq 0 ]] && update-alternatives --remove %{name} %{homedir}/bin/mvn -%files lib -f .mfiles +%files -n %{?module_prefix}%{name}-lib -f .mfiles %doc README.md %license LICENSE NOTICE %{homedir} @@ -242,7 +243,7 @@ update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alt %config(noreplace) %{confdir}/settings.xml %config(noreplace) %{confdir}/logging/simplelogger.properties -%files +%files -n %{?module_prefix}%{name} %ghost %{_bindir}/mvn %ghost %{_bindir}/mvnDebug %{_datadir}/bash-completion From ae085dde62945fc1b110b2c902ee6bb48b6893c2 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sat, 29 Jun 2019 13:38:31 +0200 Subject: [PATCH 15/53] Namespace requires and buildrequires --- maven.spec | 102 ++++++++++++++++++++++++++--------------------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/maven.spec b/maven.spec index 61d5a32..a16687f 100644 --- a/maven.spec +++ b/maven.spec @@ -24,50 +24,50 @@ Patch2: 0002-Invoke-logback-via-reflection.patch Patch3: 0003-MNG-6642-Revert-MNG-5995-Remove-dependency-to-maven-.patch BuildRequires: maven-local -BuildRequires: mvn(com.google.inject:guice::no_aop:) -BuildRequires: mvn(commons-cli:commons-cli) +BuildRequires: %{?module_prefix}mvn(com.google.inject:guice::no_aop:) +BuildRequires: %{?module_prefix}mvn(commons-cli:commons-cli) BuildRequires: mvn(commons-jxpath:commons-jxpath) -BuildRequires: mvn(javax.annotation:jsr250-api) -BuildRequires: mvn(javax.inject:javax.inject) +BuildRequires: %{?module_prefix}mvn(javax.annotation:jsr250-api) +BuildRequires: %{?module_prefix}mvn(javax.inject:javax.inject) BuildRequires: mvn(junit:junit) -BuildRequires: mvn(org.apache.commons:commons-lang3) +BuildRequires: %{?module_prefix}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.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: %{?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: 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: %{?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) -BuildRequires: mvn(org.codehaus.plexus:plexus-classworlds) -BuildRequires: mvn(org.codehaus.plexus:plexus-component-annotations) +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-component-metadata) -BuildRequires: mvn(org.codehaus.plexus:plexus-interpolation) -BuildRequires: mvn(org.codehaus.plexus:plexus-utils) >= 3.2.0 -BuildRequires: mvn(org.eclipse.sisu:org.eclipse.sisu.inject) -BuildRequires: mvn(org.eclipse.sisu:org.eclipse.sisu.plexus) +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.eclipse.sisu:sisu-maven-plugin) BuildRequires: mvn(org.fusesource.jansi:jansi) BuildRequires: mvn(org.mockito:mockito-core) >= 2 BuildRequires: mvn(org.slf4j:jcl-over-slf4j) -BuildRequires: mvn(org.slf4j:slf4j-api) +BuildRequires: %{?module_prefix}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: %{?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: slf4j-sources = %{bundled_slf4j_version} -Requires: %{name}-lib = %{epoch}:%{version}-%{release} +Requires: %{?module_prefix}%{name}-lib = %{epoch}:%{version}-%{release} Requires(post): (alternatives if fedora-release >= 30 else chkconfig) Requires(postun): (alternatives if fedora-release >= 30 else chkconfig) @@ -82,34 +82,34 @@ Recommends: java-devel # 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: guava -Requires: hawtjni-runtime -Requires: httpcomponents-client -Requires: httpcomponents-core -Requires: jansi -Requires: jansi-native -Requires: jcl-over-slf4j -Requires: maven-resolver -Requires: maven-shared-utils -Requires: maven-wagon -Requires: plexus-cipher -Requires: plexus-classworlds -Requires: plexus-containers-component-annotations -Requires: plexus-interpolation -Requires: plexus-sec-dispatcher -Requires: plexus-utils -Requires: sisu -Requires: slf4j +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 From 438f14fe7fbe7d355cbca4af1bcf1e449cbfb046 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sat, 29 Jun 2019 14:44:20 +0200 Subject: [PATCH 16/53] Add explicit BR on prefixed packages --- maven.spec | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/maven.spec b/maven.spec index a16687f..be4e5ce 100644 --- a/maven.spec +++ b/maven.spec @@ -66,6 +66,34 @@ 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} From b84a3416e565203d1a1b0544c107928d843c8590 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 1 Jul 2019 09:58:04 +0200 Subject: [PATCH 17/53] Avoid manually symlinking required libraries --- 0001-Adapt-mvn-script.patch | 2 +- 0002-Invoke-logback-via-reflection.patch | 2 +- ...MNG-5995-Remove-dependency-to-maven-.patch | 2 +- 0004-Use-non-shaded-HTTP-wagon.patch | 51 +++++++++++ maven.spec | 87 ++----------------- 5 files changed, 61 insertions(+), 83 deletions(-) create mode 100644 0004-Use-non-shaded-HTTP-wagon.patch 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} From 3d7478cfc8a082060326254ee20cba5a62c43484 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 1 Jul 2019 11:14:48 +0200 Subject: [PATCH 18/53] Change scope of jansi dependency to runtime --- maven.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/maven.spec b/maven.spec index f5bbbac..361f75d 100644 --- a/maven.spec +++ b/maven.spec @@ -136,6 +136,7 @@ sed -i " %mvn_package :apache-maven __noinstall +%pom_change_dep :jansi :::runtime maven-embedder %pom_remove_dep -r :logback-classic %mvn_alias :maven-resolver-provider :maven-aether-provider From a77ded0c2878cc066e110d5554b179b910866dd5 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 1 Jul 2019 11:20:15 +0200 Subject: [PATCH 19/53] Fix requires of namespaced main package --- maven.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/maven.spec b/maven.spec index 361f75d..800035e 100644 --- a/maven.spec +++ b/maven.spec @@ -67,6 +67,11 @@ BuildRequires: mvn(org.xmlunit:xmlunit-matchers) BuildRequires: slf4j-sources = %{bundled_slf4j_version} +%if 0%{?module_prefix:1} +%package -n %{module_prefix}%{name} +Summary: %{summary} +%endif + Requires: %{?module_prefix}%{name}-lib = %{epoch}:%{version}-%{release} Requires(post): (alternatives if fedora-release >= 30 else chkconfig) @@ -76,6 +81,11 @@ Requires(postun): (alternatives if fedora-release >= 30 else chkconfig) # workflow requires full JDK, so we recommend it here. Recommends: java-devel +%if 0%{?module_prefix:1} +%description -n %{module_prefix}%{name} +%{summary}. +%endif + %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, @@ -99,7 +109,6 @@ Provides: bundled(slf4j) = %{bundled_slf4j_version} %description -n %{?module_prefix}%{name}-lib Core part of Apache Maven that can be used as a library. -%{?module_package} %{?javadoc_package} %prep From 4f933c98bb2297c896597fb76257dc664e631e61 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 1 Jul 2019 14:24:02 +0200 Subject: [PATCH 20/53] Remove unused maven-script --- maven-script | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 maven-script diff --git a/maven-script b/maven-script deleted file mode 100644 index c4e898c..0000000 --- a/maven-script +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh - -for f in /etc/mavenrc /etc/java/maven.conf "$HOME/.mavenrc"; do - [ -f "$f" ] && . "$f" -done - -if [ -f /usr/share/java-utils/java-functions ] ; then - . /usr/share/java-utils/java-functions - set_jvm - set_javacmd -fi -export JAVA_HOME -export JAVACMD - -export M2_HOME="${M2_HOME:-/usr/share/maven}" - - -# traverses directory structure from process work directory to filesystem root -# first directory with .mvn subdirectory is considered project base directory -find_maven_basedir() { -( - basedir="`pwd`" - wdir="`pwd`" - while [ "$wdir" != '/' ] ; do - if [ -d "$wdir"/.mvn ] ; then - basedir=$wdir - break - fi - wdir="`cd "$wdir/.."; pwd`" - done - echo "${basedir}" -) -} - -export MAVEN_PROJECTBASEDIR="${MAVEN_BASEDIR:-`find_maven_basedir`}" - -export MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" - -project_opts=$( - [ -e "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config" ] && - cat /tmp/foo "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") - -exec "$JAVACMD" \ - $project_opts \ - $MAVEN_OPTS \ - $MAVEN_DEBUG_OPTS \ - -classpath $(build-classpath plexus-classworlds) \ - -Dclassworlds.conf="${M2_HOME}/bin/m2.conf" \ - -Dmaven.home="${M2_HOME}" \ - -Dmaven.multiModuleProjectDirectory="${MAVEN_PROJECTBASEDIR}" \ - org.codehaus.plexus.classworlds.launcher.Launcher \ - "$@" From 180d45516a27efffa4510df8891a74999475f62a Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 1 Jul 2019 14:26:52 +0200 Subject: [PATCH 21/53] Fix classworlds location in maven script --- 0001-Adapt-mvn-script.patch | 17 ++++------------- 0002-Invoke-logback-via-reflection.patch | 2 +- ...t-MNG-5995-Remove-dependency-to-maven-.patch | 2 +- 0004-Use-non-shaded-HTTP-wagon.patch | 2 +- 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/0001-Adapt-mvn-script.patch b/0001-Adapt-mvn-script.patch index e62d186..3b9b670 100644 --- a/0001-Adapt-mvn-script.patch +++ b/0001-Adapt-mvn-script.patch @@ -1,14 +1,14 @@ -From 9e51d86115b066cbf3d44392810b3f6fd63fdfc9 Mon Sep 17 00:00:00 2001 +From 056c94f86450c7c27f5bb11f98653c73bfe3d8e4 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 | 19 ++++++++++++++++--- - 1 file changed, 16 insertions(+), 3 deletions(-) + apache-maven/src/bin/mvn | 17 +++++++++++++++-- + 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn -index a554c6617..818cf70b8 100755 +index a554c6617..0c07ba6e2 100755 --- a/apache-maven/src/bin/mvn +++ b/apache-maven/src/bin/mvn @@ -22,7 +22,7 @@ @@ -55,15 +55,6 @@ index a554c6617..818cf70b8 100755 # make it fully qualified MAVEN_HOME=`cd "$MAVEN_HOME" && pwd` -@@ -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.21.0 diff --git a/0002-Invoke-logback-via-reflection.patch b/0002-Invoke-logback-via-reflection.patch index 44c017e..863977d 100644 --- a/0002-Invoke-logback-via-reflection.patch +++ b/0002-Invoke-logback-via-reflection.patch @@ -1,4 +1,4 @@ -From 4fa2cfaa19a0752a656b2a223a77c3af25d2de12 Mon Sep 17 00:00:00 2001 +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 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 47cc1bd..9986945 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,4 +1,4 @@ -From c533aada209c517c1666989d7115672e7522aa72 Mon Sep 17 00:00:00 2001 +From 56d10f48ebb2cdaf3882dc8afbef65a2ab529040 Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Sat, 13 Oct 2018 04:16:44 +0200 Subject: [PATCH 3/4] [MNG-6642] Revert "[MNG-5995] Remove dependency to diff --git a/0004-Use-non-shaded-HTTP-wagon.patch b/0004-Use-non-shaded-HTTP-wagon.patch index 5b2dcd6..0ebea69 100644 --- a/0004-Use-non-shaded-HTTP-wagon.patch +++ b/0004-Use-non-shaded-HTTP-wagon.patch @@ -1,4 +1,4 @@ -From 59092ee77227c480d3665d62554f0f0023d8a6c7 Mon Sep 17 00:00:00 2001 +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 From 5c6c03b4f242b46e18c1877aeb9058cf94f539c1 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 1 Jul 2019 14:38:35 +0200 Subject: [PATCH 22/53] Install versioned commands and manpages --- maven.spec | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/maven.spec b/maven.spec index 800035e..2598853 100644 --- a/maven.spec +++ b/maven.spec @@ -72,11 +72,15 @@ BuildRequires: slf4j-sources = %{bundled_slf4j_version} Summary: %{summary} %endif -Requires: %{?module_prefix}%{name}-lib = %{epoch}:%{version}-%{release} +Requires: %{?module_prefix}%{name}-lib = %{epoch}:%{version}-%{release} Requires(post): (alternatives if fedora-release >= 30 else chkconfig) Requires(postun): (alternatives if fedora-release >= 30 else chkconfig) +# 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. Recommends: java-devel @@ -97,9 +101,6 @@ Summary: Core part of Maven # 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 @@ -187,6 +188,14 @@ 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} update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alternatives_priority}0 \ @@ -214,6 +223,12 @@ update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alt %{_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 %changelog From ecd4aaccd162e6fe4438ba9a1f116cef2a33c562 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Mon, 22 Jul 2019 13:59:02 +0200 Subject: [PATCH 23/53] Port to modello 1.11 --- 0005-Port-to-modello-version-1.11.patch | 50 +++++++++++++++++++++++++ maven.spec | 8 +++- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 0005-Port-to-modello-version-1.11.patch diff --git a/0005-Port-to-modello-version-1.11.patch b/0005-Port-to-modello-version-1.11.patch new file mode 100644 index 0000000..b39a11e --- /dev/null +++ b/0005-Port-to-modello-version-1.11.patch @@ -0,0 +1,50 @@ +From 092d1d07a61517ed9c460874934c9e0f3e9aef9b Mon Sep 17 00:00:00 2001 +From: Marian Koncek +Date: Wed, 3 Jul 2019 09:54:14 +0200 +Subject: [PATCH] Port to modello version 1.11 + +--- + .../model/interpolation/StringSearchModelInterpolator.java | 6 ++++++ + pom.xml | 2 +- + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java +index 25982cd..e0a575f 100644 +--- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java ++++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java +@@ -19,6 +19,7 @@ package org.apache.maven.model.interpolation; + * under the License. + */ + ++import org.apache.maven.model.InputLocation; + import org.apache.maven.model.Model; + import org.apache.maven.model.building.ModelBuildingRequest; + import org.apache.maven.model.building.ModelProblem.Severity; +@@ -220,6 +221,11 @@ public class StringSearchModelInterpolator + return false; + } + ++ if ( InputLocation.class.equals( fieldType ) ) ++ { ++ return false; ++ } ++ + //noinspection SimplifiableIfStatement + if ( fieldType.isPrimitive() ) + { +diff --git a/pom.xml b/pom.xml +index 90c236d..49f3e76 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -59,7 +59,7 @@ under the License. + 3.3.2 + 1.4 + 1.7 +- 1.10.0 ++ 1.11 + 1.3 + 1.3.3 + 1.7.25 +-- +2.20.1 + diff --git a/maven.spec b/maven.spec index 2598853..4da1729 100644 --- a/maven.spec +++ b/maven.spec @@ -5,7 +5,7 @@ Name: maven Epoch: 1 Version: 3.6.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Java project management and project comprehension tool # maven itself is ASL 2.0 # bundled slf4j is MIT @@ -23,6 +23,8 @@ Patch1: 0001-Adapt-mvn-script.patch 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 +# TODO Should not be needed after 3.6.1 +Patch5: 0005-Port-to-modello-version-1.11.patch BuildRequires: maven-local BuildRequires: %{?module_prefix}mvn(com.google.inject:guice::no_aop:) @@ -119,6 +121,7 @@ Core part of Apache Maven that can be used as a library. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # not really used during build, but a precaution find -name '*.jar' -not -path '*/test/*' -delete @@ -232,6 +235,9 @@ update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alt %changelog +* Wed Jul 03 2019 Marian Koncek - 1:3.6.1-5 +- Port to modello version 1.11 + * Thu May 30 2019 Mikolaj Izdebski - 1:3.6.1-4 - Backport upstream fix for Tycho P2 integarion From 4dbb0e7ea782618c9c82a3768b1e463c5c37c977 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Wed, 14 Aug 2019 08:58:56 +0200 Subject: [PATCH 24/53] Update SLF4J version to 1.7.28 --- maven.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maven.spec b/maven.spec index 4da1729..7ff9d69 100644 --- a/maven.spec +++ b/maven.spec @@ -1,4 +1,4 @@ -%global bundled_slf4j_version 1.7.26 +%global bundled_slf4j_version 1.7.28 %global homedir %{_datadir}/%{name}%{?maven_version_suffix} %global confdir %{_sysconfdir}/%{name}%{?maven_version_suffix} From bf3622aec2a6e9b62c414b7d3fde73ecfd6e4dc9 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 19 Aug 2019 12:07:52 +0200 Subject: [PATCH 25/53] Don't use Recommends on RHEL 7 --- maven.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/maven.spec b/maven.spec index 7ff9d69..b5268d9 100644 --- a/maven.spec +++ b/maven.spec @@ -85,7 +85,11 @@ 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 %if 0%{?module_prefix:1} %description -n %{module_prefix}%{name} From bfa923c7f158aca956bdcfa5674b49a48c83c27f Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 19 Aug 2019 12:15:45 +0200 Subject: [PATCH 26/53] Don't use boolean deps on RHEL 7 --- maven.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maven.spec b/maven.spec index b5268d9..5052734 100644 --- a/maven.spec +++ b/maven.spec @@ -76,8 +76,13 @@ Summary: %{summary} Requires: %{?module_prefix}%{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 From c8ca7241d627edb0b328e7d65dc61afbd352e62e Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Tue, 3 Sep 2019 03:59:43 +0200 Subject: [PATCH 27/53] Avoid calling xmvn-subst during sclraw bootstrap --- maven.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/maven.spec b/maven.spec index 5052734..e3a697d 100644 --- a/maven.spec +++ b/maven.spec @@ -182,7 +182,9 @@ 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 install -p -m 644 %{SOURCE2} %{buildroot}%{homedir}/bin/ gzip -9 %{buildroot}%{homedir}/bin/mvn.1 From 0cc0d7aa1fd6a8de18e7309cf5e895c1a28a6d34 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Thu, 26 Sep 2019 16:31:45 +0200 Subject: [PATCH 28/53] Update to upstream version 3.6.2 --- .gitignore | 1 + ...MNG-5995-Remove-dependency-to-maven-.patch | 52 ---------- ...ch => 0003-Use-non-shaded-HTTP-wagon.patch | 0 0004-Remove-dependency-on-powermock.patch | 96 +++++++++++++++++++ 0005-Port-to-modello-version-1.11.patch | 50 ---------- maven.spec | 23 +++-- sources | 2 +- 7 files changed, 114 insertions(+), 110 deletions(-) delete mode 100644 0003-MNG-6642-Revert-MNG-5995-Remove-dependency-to-maven-.patch rename 0004-Use-non-shaded-HTTP-wagon.patch => 0003-Use-non-shaded-HTTP-wagon.patch (100%) create mode 100644 0004-Remove-dependency-on-powermock.patch delete mode 100644 0005-Port-to-modello-version-1.11.patch diff --git a/.gitignore b/.gitignore index d8c2277..0d88fa3 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ /apache-maven-3.5.3-src.tar.gz /apache-maven-3.5.4-src.tar.gz /apache-maven-3.6.1-src.tar.gz +/apache-maven-3.6.2-src.tar.gz 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 deleted file mode 100644 index 9986945..0000000 --- a/0003-MNG-6642-Revert-MNG-5995-Remove-dependency-to-maven-.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 56d10f48ebb2cdaf3882dc8afbef65a2ab529040 Mon Sep 17 00:00:00 2001 -From: Sylwester Lachiewicz -Date: Sat, 13 Oct 2018 04:16:44 +0200 -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. ---- - .../apache/maven/project/DefaultProjectBuildingHelper.java | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java -index 0bd94a86a..3159fac6b 100644 ---- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java -+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java -@@ -33,7 +33,6 @@ - import org.apache.maven.artifact.Artifact; - import org.apache.maven.artifact.InvalidRepositoryException; - import org.apache.maven.artifact.repository.ArtifactRepository; --import org.apache.maven.bridge.MavenRepositorySystem; - import org.apache.maven.classrealm.ClassRealmManager; - import org.apache.maven.model.Build; - import org.apache.maven.model.Extension; -@@ -45,6 +44,7 @@ - import org.apache.maven.plugin.PluginManagerException; - import org.apache.maven.plugin.PluginResolutionException; - import org.apache.maven.plugin.version.PluginVersionResolutionException; -+import org.apache.maven.repository.RepositorySystem; - import org.codehaus.plexus.PlexusContainer; - import org.codehaus.plexus.classworlds.realm.ClassRealm; - import org.codehaus.plexus.component.annotations.Component; -@@ -78,7 +78,7 @@ - private ProjectRealmCache projectRealmCache; - - @Requirement -- private MavenRepositorySystem repositorySystem; -+ private RepositorySystem repositorySystem; - - @Requirement - private MavenPluginManager pluginManager; -@@ -92,7 +92,7 @@ - - for ( Repository repository : pomRepositories ) - { -- internalRepositories.add( MavenRepositorySystem.buildArtifactRepository( repository ) ); -+ internalRepositories.add( repositorySystem.buildArtifactRepository( repository ) ); - } - - repositorySystem.injectMirror( request.getRepositorySession(), internalRepositories ); --- -2.21.0 - diff --git a/0004-Use-non-shaded-HTTP-wagon.patch b/0003-Use-non-shaded-HTTP-wagon.patch similarity index 100% rename from 0004-Use-non-shaded-HTTP-wagon.patch rename to 0003-Use-non-shaded-HTTP-wagon.patch diff --git a/0004-Remove-dependency-on-powermock.patch b/0004-Remove-dependency-on-powermock.patch new file mode 100644 index 0000000..848c925 --- /dev/null +++ b/0004-Remove-dependency-on-powermock.patch @@ -0,0 +1,96 @@ +From f6eb583525c7f777bde16182c57a47345fd53cb0 Mon Sep 17 00:00:00 2001 +From: Marian Koncek +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, ?> cache = +- (Map, ?>) 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, ?> cache = +- (Map, ?>) 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 + diff --git a/0005-Port-to-modello-version-1.11.patch b/0005-Port-to-modello-version-1.11.patch deleted file mode 100644 index b39a11e..0000000 --- a/0005-Port-to-modello-version-1.11.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 092d1d07a61517ed9c460874934c9e0f3e9aef9b Mon Sep 17 00:00:00 2001 -From: Marian Koncek -Date: Wed, 3 Jul 2019 09:54:14 +0200 -Subject: [PATCH] Port to modello version 1.11 - ---- - .../model/interpolation/StringSearchModelInterpolator.java | 6 ++++++ - pom.xml | 2 +- - 2 files changed, 7 insertions(+), 1 deletion(-) - -diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java -index 25982cd..e0a575f 100644 ---- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java -+++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java -@@ -19,6 +19,7 @@ package org.apache.maven.model.interpolation; - * under the License. - */ - -+import org.apache.maven.model.InputLocation; - import org.apache.maven.model.Model; - import org.apache.maven.model.building.ModelBuildingRequest; - import org.apache.maven.model.building.ModelProblem.Severity; -@@ -220,6 +221,11 @@ public class StringSearchModelInterpolator - return false; - } - -+ if ( InputLocation.class.equals( fieldType ) ) -+ { -+ return false; -+ } -+ - //noinspection SimplifiableIfStatement - if ( fieldType.isPrimitive() ) - { -diff --git a/pom.xml b/pom.xml -index 90c236d..49f3e76 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -59,7 +59,7 @@ under the License. - 3.3.2 - 1.4 - 1.7 -- 1.10.0 -+ 1.11 - 1.3 - 1.3.3 - 1.7.25 --- -2.20.1 - diff --git a/maven.spec b/maven.spec index e3a697d..1360b7c 100644 --- a/maven.spec +++ b/maven.spec @@ -4,8 +4,8 @@ Name: maven Epoch: 1 -Version: 3.6.1 -Release: 5%{?dist} +Version: 3.6.2 +Release: 1%{?dist} Summary: Java project management and project comprehension tool # maven itself is ASL 2.0 # bundled slf4j is MIT @@ -21,10 +21,8 @@ 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-MNG-6642-Revert-MNG-5995-Remove-dependency-to-maven-.patch -Patch4: 0004-Use-non-shaded-HTTP-wagon.patch -# TODO Should not be needed after 3.6.1 -Patch5: 0005-Port-to-modello-version-1.11.patch +Patch3: 0003-Use-non-shaded-HTTP-wagon.patch +Patch4: 0004-Remove-dependency-on-powermock.patch BuildRequires: maven-local BuildRequires: %{?module_prefix}mvn(com.google.inject:guice::no_aop:) @@ -37,6 +35,7 @@ BuildRequires: %{?module_prefix}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) @@ -130,13 +129,14 @@ Core part of Apache Maven that can be used as a library. %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 # 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. @@ -163,6 +163,12 @@ sed -i " %mvn_alias :maven-resolver-provider :maven-aether-provider +%pom_xpath_inject 'pom:build/pom:plugins' ' + + org.eclipse.sisu + sisu-maven-plugin +' maven-model-builder/pom.xml + %build %mvn_build -- -Dproject.build.sourceEncoding=UTF-8 @@ -246,6 +252,9 @@ update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alt %changelog +* Thu Oct 03 2019 Marian Koncek - 1:3.6.2-1 +- Update to upstream version 3.6.2 + * Wed Jul 03 2019 Marian Koncek - 1:3.6.1-5 - Port to modello version 1.11 diff --git a/sources b/sources index 3599cb3..e25e788 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (apache-maven-3.6.1-src.tar.gz) = 11a31022cffa0518584703fffd9fce998332ac5f6c2a50db3b590e90f3bdd1508d9e0cb5ba89a699ef6536b237bcc96166cfde3d45bce6346fa21b05b4d12bf8 +SHA512 (apache-maven-3.6.2-src.tar.gz) = 235198b48d29fe2f2394f2607a9a1637acfd0286beacb974c566f7f36ac6c469871a0db287539b2b62e6322d7423f586949e41cbbfea330fe03bf690688f6fd7 From 3e670f14fc02b23b47d70be4a459fd5b2023e64d Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Wed, 30 Oct 2019 10:59:21 +0100 Subject: [PATCH 29/53] Fix Tycho pomless build --- maven.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maven.spec b/maven.spec index 1360b7c..6842033 100644 --- a/maven.spec +++ b/maven.spec @@ -130,6 +130,12 @@ Core part of Apache Maven that can be used as a library. %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 From 755627b55857be9fe44c44c7e06e97ad593a63a1 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 31 Oct 2019 08:53:29 +0100 Subject: [PATCH 30/53] Fix postun scriplet failure Resolves: rhbz#1767324 --- maven.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maven.spec b/maven.spec index 6842033..c048ecd 100644 --- a/maven.spec +++ b/maven.spec @@ -230,7 +230,7 @@ update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alt --slave %{_mandir}/man1/mvnDebug.1.gz mvnDebug1 %{homedir}/bin/mvn.1.gz \ %postun -n %{?module_prefix}%{name} -[[ $1 -eq 0 ]] && update-alternatives --remove %{name} %{homedir}/bin/mvn +[[ $1 -eq 0 ]] && update-alternatives --remove mvn %{homedir}/bin/mvn %files -n %{?module_prefix}%{name}-lib -f .mfiles From 9f25715271313c64fff2fa0f3c8304854c7270f5 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Tue, 5 Nov 2019 17:29:28 +0100 Subject: [PATCH 31/53] Mass rebuild for javapackages-tools 201902 --- maven.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/maven.spec b/maven.spec index c048ecd..bdb18d1 100644 --- a/maven.spec +++ b/maven.spec @@ -5,7 +5,7 @@ Name: maven Epoch: 1 Version: 3.6.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Java project management and project comprehension tool # maven itself is ASL 2.0 # bundled slf4j is MIT @@ -258,6 +258,9 @@ update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alt %changelog +* Tue Nov 05 2019 Mikolaj Izdebski - 1:3.6.2-2 +- Mass rebuild for javapackages-tools 201902 + * Thu Oct 03 2019 Marian Koncek - 1:3.6.2-1 - Update to upstream version 3.6.2 From 48b4df576781b77e62159ba22a08d2c9abe55803 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 23 Jan 2020 09:09:08 +0100 Subject: [PATCH 32/53] Implement JDK bindings --- maven.spec | 51 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/maven.spec b/maven.spec index bdb18d1..874c665 100644 --- a/maven.spec +++ b/maven.spec @@ -5,7 +5,7 @@ Name: maven Epoch: 1 Version: 3.6.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Java project management and project comprehension tool # maven itself is ASL 2.0 # bundled slf4j is MIT @@ -74,6 +74,8 @@ Summary: %{summary} %endif Requires: %{?module_prefix}%{name}-lib = %{epoch}:%{version}-%{release} +Requires: %{?module_prefix}%{name}-jdk-binding = %{epoch}:%{version}-%{release} +Suggests: %{?module_prefix}%{name}-openjdk8 = %{epoch}:%{version}-%{release} %if 0%{?fedora} Requires(post): (alternatives if fedora-release >= 30 else chkconfig) @@ -87,14 +89,6 @@ Requires(postun): chkconfig # /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 - %if 0%{?module_prefix:1} %description -n %{module_prefix}%{name} %{summary}. @@ -120,6 +114,30 @@ Provides: bundled(slf4j) = %{bundled_slf4j_version} %description -n %{?module_prefix}%{name}-lib Core part of Apache Maven that can be used as a library. +%package -n %{?module_prefix}%{name}-openjdk8 +Summary: OpenJDK 8 binding +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 + +%description -n %{?module_prefix}%{name}-openjdk8 +OpenJDK 8 binding + +%package -n %{?module_prefix}%{name}-openjdk11 +Summary: OpenJDK 11 binding +RemovePathPostfixes: -openjdk11 +Provides: maven-jdk-binding = %{epoch}:%{version}-%{release} +Requires: maven = %{epoch}:%{version}-%{release} +Requires: java-11-openjdk-headless +# Theoretically Maven might be usable with just JRE, but typical Maven +# workflow requires full JDK, so we recommend it here. +Recommends: java-11-openjdk-devel + +%description -n %{?module_prefix}%{name}-openjdk11 +OpenJDK 11 binding + %{?javadoc_package} %prep @@ -176,7 +194,7 @@ sed -i " ' maven-model-builder/pom.xml %build -%mvn_build -- -Dproject.build.sourceEncoding=UTF-8 +%mvn_build -f -- -Dproject.build.sourceEncoding=UTF-8 mkdir m2home (cd m2home @@ -222,6 +240,11 @@ ln -s %{homedir}/bin/mvn.1.gz %{buildroot}%{_mandir}/man1/mvn%{maven_version_suf ln -s %{homedir}/bin/mvnDebug.1.gz %{buildroot}%{_mandir}/man1/mvnDebug%{maven_version_suffix}.1.gz %endif +# JDK bindings +install -d -m 755 %{buildroot}%{_javaconfdir}/ +echo JAVA_HOME=%{_jvmlibdir}/java-1.8.0-openjdk >%{buildroot}%{_javaconfdir}/maven.conf-openjdk8 +echo JAVA_HOME=%{_jvmlibdir}/java-11-openjdk >%{buildroot}%{_javaconfdir}/maven.conf-openjdk11 + %post -n %{?module_prefix}%{name} update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alternatives_priority}0 \ @@ -256,8 +279,16 @@ update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alt %{_mandir}/man1/mvnDebug%{maven_version_suffix}.1.gz %endif +%files openjdk8 +%config %{_javaconfdir}/maven.conf-openjdk8 + +%files openjdk11 +%config %{_javaconfdir}/maven.conf-openjdk11 %changelog +* Thu Jan 23 2020 Mikolaj Izdebski - 1:3.6.2-3 +- Implement JDK bindings + * Tue Nov 05 2019 Mikolaj Izdebski - 1:3.6.2-2 - Mass rebuild for javapackages-tools 201902 From eb44329cfdd6a3bb9e9256ead0cd3b5a9ee04861 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 23 Jan 2020 10:50:50 +0100 Subject: [PATCH 33/53] Suggest openjdk11 binding --- maven.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maven.spec b/maven.spec index 874c665..a25e3d7 100644 --- a/maven.spec +++ b/maven.spec @@ -75,7 +75,7 @@ Summary: %{summary} Requires: %{?module_prefix}%{name}-lib = %{epoch}:%{version}-%{release} Requires: %{?module_prefix}%{name}-jdk-binding = %{epoch}:%{version}-%{release} -Suggests: %{?module_prefix}%{name}-openjdk8 = %{epoch}:%{version}-%{release} +Suggests: %{?module_prefix}%{name}-openjdk11 = %{epoch}:%{version}-%{release} %if 0%{?fedora} Requires(post): (alternatives if fedora-release >= 30 else chkconfig) From c58f4fd6ddf49602db69f398899ea6674dc1fb63 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 23 Jan 2020 10:58:48 +0100 Subject: [PATCH 34/53] Require unversioned binding --- maven.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maven.spec b/maven.spec index a25e3d7..94c2629 100644 --- a/maven.spec +++ b/maven.spec @@ -74,7 +74,7 @@ Summary: %{summary} %endif Requires: %{?module_prefix}%{name}-lib = %{epoch}:%{version}-%{release} -Requires: %{?module_prefix}%{name}-jdk-binding = %{epoch}:%{version}-%{release} +Requires: %{?module_prefix}%{name}-jdk-binding Suggests: %{?module_prefix}%{name}-openjdk11 = %{epoch}:%{version}-%{release} %if 0%{?fedora} From a0956ace7768622e6ad1782ea59da26f475c11e1 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 23 Jan 2020 10:58:56 +0100 Subject: [PATCH 35/53] Add conflicts on bindings --- maven.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/maven.spec b/maven.spec index 94c2629..e06d5d2 100644 --- a/maven.spec +++ b/maven.spec @@ -121,6 +121,7 @@ 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 -n %{?module_prefix}%{name}-openjdk8 OpenJDK 8 binding @@ -134,6 +135,7 @@ Requires: java-11-openjdk-headless # Theoretically Maven might be usable with just JRE, but typical Maven # workflow requires full JDK, so we recommend it here. Recommends: java-11-openjdk-devel +Conflicts: maven-jdk-binding %description -n %{?module_prefix}%{name}-openjdk11 OpenJDK 11 binding From f674b36dd77314036922e5c65b0b48f50a4fff6c Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 23 Jan 2020 11:16:36 +0100 Subject: [PATCH 36/53] Re-enable tests --- maven.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maven.spec b/maven.spec index e06d5d2..1934d7e 100644 --- a/maven.spec +++ b/maven.spec @@ -196,7 +196,7 @@ sed -i " ' maven-model-builder/pom.xml %build -%mvn_build -f -- -Dproject.build.sourceEncoding=UTF-8 +%mvn_build -- -Dproject.build.sourceEncoding=UTF-8 mkdir m2home (cd m2home From 4263a6cb91650e6df8b5d2095880a4f46a70e6c8 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 23 Jan 2020 11:22:59 +0100 Subject: [PATCH 37/53] Always require JDK, not JRE --- maven.spec | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/maven.spec b/maven.spec index 1934d7e..3669c05 100644 --- a/maven.spec +++ b/maven.spec @@ -119,8 +119,7 @@ Summary: OpenJDK 8 binding 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 +Requires: java-1.8.0-openjdk-devel Conflicts: maven-jdk-binding %description -n %{?module_prefix}%{name}-openjdk8 @@ -131,10 +130,7 @@ Summary: OpenJDK 11 binding RemovePathPostfixes: -openjdk11 Provides: maven-jdk-binding = %{epoch}:%{version}-%{release} Requires: maven = %{epoch}:%{version}-%{release} -Requires: java-11-openjdk-headless -# Theoretically Maven might be usable with just JRE, but typical Maven -# workflow requires full JDK, so we recommend it here. -Recommends: java-11-openjdk-devel +Requires: java-11-openjdk-devel Conflicts: maven-jdk-binding %description -n %{?module_prefix}%{name}-openjdk11 From 0ec73bc570c872dd35c619dfb2abbfad984fc7ac Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sat, 25 Jan 2020 05:35:45 +0100 Subject: [PATCH 38/53] Bump slf4j version to 1.7.30 --- maven.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maven.spec b/maven.spec index 3669c05..e60393d 100644 --- a/maven.spec +++ b/maven.spec @@ -1,4 +1,4 @@ -%global bundled_slf4j_version 1.7.28 +%global bundled_slf4j_version 1.7.30 %global homedir %{_datadir}/%{name}%{?maven_version_suffix} %global confdir %{_sysconfdir}/%{name}%{?maven_version_suffix} From cfc7cd5ffa1be59889a839464a0d4f0b15a8c79b Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sat, 25 Jan 2020 14:40:08 +0100 Subject: [PATCH 39/53] Build with OpenJDK 8 --- maven.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/maven.spec b/maven.spec index e60393d..aaff37b 100644 --- a/maven.spec +++ b/maven.spec @@ -5,7 +5,7 @@ Name: maven Epoch: 1 Version: 3.6.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Java project management and project comprehension tool # maven itself is ASL 2.0 # bundled slf4j is MIT @@ -24,7 +24,7 @@ Patch2: 0002-Invoke-logback-via-reflection.patch Patch3: 0003-Use-non-shaded-HTTP-wagon.patch Patch4: 0004-Remove-dependency-on-powermock.patch -BuildRequires: maven-local +BuildRequires: maven-local-openjdk8 BuildRequires: %{?module_prefix}mvn(com.google.inject:guice::no_aop:) BuildRequires: %{?module_prefix}mvn(commons-cli:commons-cli) BuildRequires: mvn(commons-jxpath:commons-jxpath) @@ -284,6 +284,9 @@ update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alt %config %{_javaconfdir}/maven.conf-openjdk11 %changelog +* Sat Jan 25 2020 Mikolaj Izdebski - 1:3.6.2-4 +- Build with OpenJDK 8 + * Thu Jan 23 2020 Mikolaj Izdebski - 1:3.6.2-3 - Implement JDK bindings From 08c5f55d997888f77509418bf2898fa83a7c7b04 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sat, 25 Jan 2020 17:14:13 +0100 Subject: [PATCH 40/53] Update binding package descriptions --- maven.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/maven.spec b/maven.spec index aaff37b..bc0044f 100644 --- a/maven.spec +++ b/maven.spec @@ -115,7 +115,7 @@ Provides: bundled(slf4j) = %{bundled_slf4j_version} Core part of Apache Maven that can be used as a library. %package -n %{?module_prefix}%{name}-openjdk8 -Summary: OpenJDK 8 binding +Summary: OpenJDK 8 binding for Maven RemovePathPostfixes: -openjdk8 Provides: maven-jdk-binding = %{epoch}:%{version}-%{release} Requires: maven = %{epoch}:%{version}-%{release} @@ -123,10 +123,10 @@ Requires: java-1.8.0-openjdk-devel Conflicts: maven-jdk-binding %description -n %{?module_prefix}%{name}-openjdk8 -OpenJDK 8 binding +Configures Maven to run with OpenJDK 8. %package -n %{?module_prefix}%{name}-openjdk11 -Summary: OpenJDK 11 binding +Summary: OpenJDK 11 binding for Maven RemovePathPostfixes: -openjdk11 Provides: maven-jdk-binding = %{epoch}:%{version}-%{release} Requires: maven = %{epoch}:%{version}-%{release} @@ -134,7 +134,7 @@ Requires: java-11-openjdk-devel Conflicts: maven-jdk-binding %description -n %{?module_prefix}%{name}-openjdk11 -OpenJDK 11 binding +Configures Maven to run with OpenJDK 11. %{?javadoc_package} From f7004f1462c194eb23bed863c670ba48c55f1135 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Wed, 29 Jan 2020 13:53:22 +0100 Subject: [PATCH 41/53] Drop dependency on javapackages-tools --- 0001-Adapt-mvn-script.patch | 22 +++++++--------------- maven.spec | 4 ---- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/0001-Adapt-mvn-script.patch b/0001-Adapt-mvn-script.patch index 3b9b670..a05e573 100644 --- a/0001-Adapt-mvn-script.patch +++ b/0001-Adapt-mvn-script.patch @@ -1,14 +1,14 @@ -From 056c94f86450c7c27f5bb11f98653c73bfe3d8e4 Mon Sep 17 00:00:00 2001 +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 | 17 +++++++++++++++-- - 1 file changed, 15 insertions(+), 2 deletions(-) + 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..0c07ba6e2 100755 +index a554c6617..739501af4 100755 --- a/apache-maven/src/bin/mvn +++ b/apache-maven/src/bin/mvn @@ -22,7 +22,7 @@ @@ -20,13 +20,11 @@ index a554c6617..0c07ba6e2 100755 # 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,24 @@ if [ -z "$MAVEN_SKIP_RC" ] ; then +@@ -33,12 +33,16 @@ if [ -z "$MAVEN_SKIP_RC" ] ; then . /etc/mavenrc fi -+ if [ -f /etc/java/maven.conf ] ; then -+ . /etc/java/maven.conf -+ fi ++ . /etc/java/maven.conf + if [ -f "$HOME/.mavenrc" ] ; then . "$HOME/.mavenrc" @@ -34,18 +32,12 @@ index a554c6617..0c07ba6e2 100755 fi -+if [ -f /usr/share/java-utils/java-functions ] ; then -+ . /usr/share/java-utils/java-functions -+ set_jvm -+ set_javacmd -+fi +export JAVA_HOME -+export JAVACMD + # OS specific support. $var _must_ be set to either true or false. cygwin=false; mingw=false; -@@ -63,7 +75,8 @@ done +@@ -63,7 +67,8 @@ done saveddir=`pwd` diff --git a/maven.spec b/maven.spec index bc0044f..7c594fd 100644 --- a/maven.spec +++ b/maven.spec @@ -85,10 +85,6 @@ Requires(post): chkconfig Requires(postun): chkconfig %endif -# Require full javapackages-tools since maven-script uses -# /usr/share/java-utils/java-functions -Requires: javapackages-tools - %if 0%{?module_prefix:1} %description -n %{module_prefix}%{name} %{summary}. From 7c1e8179ba2f32e2cad5a4c8e9e97b4a0d2eacc2 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Wed, 4 Mar 2020 08:39:29 +0100 Subject: [PATCH 42/53] Update to upstream version 3.6.3 --- .gitignore | 1 + 0003-Use-non-shaded-HTTP-wagon.patch | 10 +++++----- 0004-Remove-dependency-on-powermock.patch | 4 ++-- maven.spec | 20 ++++++++++---------- sources | 2 +- 5 files changed, 19 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index 0d88fa3..e3deb1d 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ /apache-maven-3.5.4-src.tar.gz /apache-maven-3.6.1-src.tar.gz /apache-maven-3.6.2-src.tar.gz +/apache-maven-3.6.3-src.tar.gz diff --git a/0003-Use-non-shaded-HTTP-wagon.patch b/0003-Use-non-shaded-HTTP-wagon.patch index 0ebea69..d61abb3 100644 --- a/0003-Use-non-shaded-HTTP-wagon.patch +++ b/0003-Use-non-shaded-HTTP-wagon.patch @@ -9,7 +9,7 @@ Subject: [PATCH 4/4] Use non-shaded HTTP wagon 2 files changed, 16 deletions(-) diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml -index 2686570af..d22ae121d 100644 +index 82e12a3..f02a45e 100644 --- a/apache-maven/pom.xml +++ b/apache-maven/pom.xml @@ -63,21 +63,6 @@ under the License. @@ -33,12 +33,12 @@ index 2686570af..d22ae121d 100644 - - org.slf4j +