Update to upstream version 3.6.1

This commit is contained in:
Mikolaj Izdebski 2019-04-13 17:03:06 +02:00
parent 290828571a
commit 573b350678
7 changed files with 330 additions and 48 deletions

1
.gitignore vendored
View File

@ -21,3 +21,4 @@
/apache-maven-3.5.2-src.tar.gz /apache-maven-3.5.2-src.tar.gz
/apache-maven-3.5.3-src.tar.gz /apache-maven-3.5.3-src.tar.gz
/apache-maven-3.5.4-src.tar.gz /apache-maven-3.5.4-src.tar.gz
/apache-maven-3.6.1-src.tar.gz

View File

@ -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 <msimacek@redhat.com> From: Michael Simacek <msimacek@redhat.com>
Date: Wed, 1 Feb 2017 14:54:26 +0100 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 ++++++++++++++++--- apache-maven/src/bin/mvn | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-) 1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn 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 --- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn +++ b/apache-maven/src/bin/mvn
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
@ -65,5 +65,5 @@ index a554c66..818cf70 100755
# For Cygwin, switch paths to Windows format before running java # For Cygwin, switch paths to Windows format before running java
-- --
2.17.1 2.20.1

View File

@ -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 <msimacek@redhat.com> From: Michael Simacek <msimacek@redhat.com>
Date: Tue, 6 Jun 2017 13:47:43 +0200 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 ++++++++++++++----- .../logging/impl/LogbackConfiguration.java | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-) 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 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 --- 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 +++ 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 @Override
public void setRootLoggerLevel( Level level ) public void setRootLoggerLevel( Level level )
{ {
@ -49,5 +49,5 @@ index 5d9fab7..ced38cb 100644
@Override @Override
-- --
2.17.1 2.20.1

View File

@ -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 <msimacek@redhat.com> From: Michael Simacek <msimacek@redhat.com>
Date: Tue, 13 Mar 2018 11:49:16 +0100 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. This reverts commit a03489b67d04a4b014ff5d1c151b331a39bf100b.
--- ---
@ -9,14 +9,15 @@ This reverts commit a03489b67d04a4b014ff5d1c151b331a39bf100b.
.../toolchain/DefaultToolchainManagerTest.java | 4 ++-- .../toolchain/DefaultToolchainManagerTest.java | 4 ++--
.../building/DefaultToolchainsBuilderTest.java | 14 +++++++------- .../building/DefaultToolchainsBuilderTest.java | 14 +++++++-------
maven-embedder/pom.xml | 1 - maven-embedder/pom.xml | 1 -
.../java/org/apache/maven/cli/MavenCliTest.java | 6 +++---
pom.xml | 2 +- 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 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 --- a/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerPrivateTest.java
+++ b/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; 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.mock;
import static org.mockito.Mockito.never; import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify; 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() ); verify( logger, never() ).error( anyString() );
assertEquals( 2, toolchains.length ); assertEquals( 2, toolchains.length );
} }
@ -38,7 +39,7 @@ index c937564..1e48441 100644
public void testMisconfiguredToolchain() public void testMisconfiguredToolchain()
throws Exception throws Exception
{ {
@@ -153,11 +155,12 @@ public class DefaultToolchainManagerPrivateTest @@ -153,11 +155,12 @@ public void testMisconfiguredToolchain()
MavenSession session = mock( MavenSession.class ); MavenSession session = mock( MavenSession.class );
MavenExecutionRequest req = new DefaultMavenExecutionRequest(); MavenExecutionRequest req = new DefaultMavenExecutionRequest();
when( session.getRequest() ).thenReturn( req ); 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 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 --- a/maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainManagerTest.java
+++ b/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; import static org.junit.Assert.assertEquals;
@ -66,7 +67,7 @@ index 84444c0..6e85c42 100644
import static org.mockito.Matchers.isA; import static org.mockito.Matchers.isA;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify; 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.codehaus.plexus.logging.Logger;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
@ -74,7 +75,7 @@ index 84444c0..6e85c42 100644
import org.mockito.InjectMocks; import org.mockito.InjectMocks;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.MockitoAnnotations; import org.mockito.MockitoAnnotations;
@@ -142,7 +142,7 @@ public class DefaultToolchainManagerTest @@ -142,7 +142,7 @@ public void testRequirements()
executionRequest.setToolchains( toolchainModels ); executionRequest.setToolchains( toolchainModels );
when( session.getRequest() ).thenReturn( executionRequest ); when( session.getRequest() ).thenReturn( executionRequest );
ToolchainPrivate basicPrivate = mock( ToolchainPrivate.class ); ToolchainPrivate basicPrivate = mock( ToolchainPrivate.class );
@ -84,10 +85,10 @@ index 84444c0..6e85c42 100644
List<Toolchain> toolchains = List<Toolchain> toolchains =
diff --git a/maven-core/src/test/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilderTest.java b/maven-core/src/test/java/org/apache/maven/toolchain/building/DefaultToolchainsBuilderTest.java 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 --- 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 +++ 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.assertEquals;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
@ -97,7 +98,7 @@ index fc530df..80fca09 100644
import static org.mockito.Mockito.when; import static org.mockito.Mockito.when;
import java.io.IOException; 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.apache.maven.toolchain.model.ToolchainModel;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
@ -105,7 +106,7 @@ index fc530df..80fca09 100644
import org.mockito.InjectMocks; import org.mockito.InjectMocks;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.MockitoAnnotations; import org.mockito.MockitoAnnotations;
@@ -78,7 +78,7 @@ public class DefaultToolchainsBuilderTest @@ -78,7 +78,7 @@ public void testBuildRequestWithUserToolchains()
toolchain.setType( "TYPE" ); toolchain.setType( "TYPE" );
toolchain.addProvide( "key", "user_value" ); toolchain.addProvide( "key", "user_value" );
userResult.addToolchain( toolchain ); userResult.addToolchain( toolchain );
@ -114,7 +115,7 @@ index fc530df..80fca09 100644
ToolchainsBuildingResult result = toolchainBuilder.build( request ); ToolchainsBuildingResult result = toolchainBuilder.build( request );
assertNotNull( result.getEffectiveToolchains() ); assertNotNull( result.getEffectiveToolchains() );
@@ -101,7 +101,7 @@ public class DefaultToolchainsBuilderTest @@ -101,7 +101,7 @@ public void testBuildRequestWithGlobalToolchains()
toolchain.setType( "TYPE" ); toolchain.setType( "TYPE" );
toolchain.addProvide( "key", "global_value" ); toolchain.addProvide( "key", "global_value" );
globalResult.addToolchain( toolchain ); globalResult.addToolchain( toolchain );
@ -123,7 +124,7 @@ index fc530df..80fca09 100644
ToolchainsBuildingResult result = toolchainBuilder.build( request ); ToolchainsBuildingResult result = toolchainBuilder.build( request );
assertNotNull( result.getEffectiveToolchains() ); assertNotNull( result.getEffectiveToolchains() );
@@ -131,7 +131,7 @@ public class DefaultToolchainsBuilderTest @@ -131,7 +131,7 @@ public void testBuildRequestWithBothToolchains()
globalToolchain.setType( "TYPE" ); globalToolchain.setType( "TYPE" );
globalToolchain.addProvide( "key", "global_value" ); globalToolchain.addProvide( "key", "global_value" );
globalResult.addToolchain( globalToolchain ); globalResult.addToolchain( globalToolchain );
@ -132,7 +133,7 @@ index fc530df..80fca09 100644
ToolchainsBuildingResult result = toolchainBuilder.build( request ); ToolchainsBuildingResult result = toolchainBuilder.build( request );
assertNotNull( result.getEffectiveToolchains() ); assertNotNull( result.getEffectiveToolchains() );
@@ -150,7 +150,7 @@ public class DefaultToolchainsBuilderTest @@ -150,7 +150,7 @@ public void testStrictToolchainsParseException() throws Exception
ToolchainsBuildingRequest request = new DefaultToolchainsBuildingRequest(); ToolchainsBuildingRequest request = new DefaultToolchainsBuildingRequest();
request.setGlobalToolchainsSource( new StringSource( "" ) ); request.setGlobalToolchainsSource( new StringSource( "" ) );
ToolchainsParseException parseException = new ToolchainsParseException( "MESSAGE", 4, 2 ); ToolchainsParseException parseException = new ToolchainsParseException( "MESSAGE", 4, 2 );
@ -141,7 +142,7 @@ index fc530df..80fca09 100644
try try
{ {
@@ -169,7 +169,7 @@ public class DefaultToolchainsBuilderTest @@ -169,7 +169,7 @@ public void testIOException() throws Exception
ToolchainsBuildingRequest request = new DefaultToolchainsBuildingRequest(); ToolchainsBuildingRequest request = new DefaultToolchainsBuildingRequest();
request.setGlobalToolchainsSource( new StringSource( "", "LOCATION" ) ); request.setGlobalToolchainsSource( new StringSource( "", "LOCATION" ) );
IOException ioException = new IOException( "MESSAGE" ); IOException ioException = new IOException( "MESSAGE" );
@ -151,10 +152,10 @@ index fc530df..80fca09 100644
try try
{ {
diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml 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 --- a/maven-embedder/pom.xml
+++ b/maven-embedder/pom.xml +++ b/maven-embedder/pom.xml
@@ -141,7 +141,6 @@ under the License. @@ -137,7 +137,6 @@ under the License.
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId> <artifactId>mockito-core</artifactId>
@ -162,19 +163,43 @@ index 8a00565..2a9668b 100644
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.fusesource.jansi</groupId> <groupId>org.fusesource.jansi</groupId>
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 diff --git a/pom.xml b/pom.xml
index ef1d0b0..77b3395 100644 index 237cdc39e..84fc037bc 100644
--- a/pom.xml --- a/pom.xml
+++ b/pom.xml +++ b/pom.xml
@@ -53,7 +53,7 @@ under the License. @@ -53,7 +53,7 @@ under the License.
<commonsCliVersion>1.4</commonsCliVersion> <commonsCliVersion>1.4</commonsCliVersion>
<commonsLangVersion>3.5</commonsLangVersion> <commonsLangVersion>3.8.1</commonsLangVersion>
<junitVersion>4.12</junitVersion> <junitVersion>4.12</junitVersion>
- <mockitoVersion>2.12.0</mockitoVersion> - <mockitoVersion>2.21.0</mockitoVersion>
+ <mockitoVersion>1.10.19</mockitoVersion> + <mockitoVersion>1.10.19</mockitoVersion>
<plexusVersion>1.7.1</plexusVersion> <plexusVersion>1.7.1</plexusVersion>
<plexusInterpolationVersion>1.24</plexusInterpolationVersion> <plexusInterpolationVersion>1.25</plexusInterpolationVersion>
<plexusUtilsVersion>3.1.0</plexusUtilsVersion> <plexusUtilsVersion>3.2.0</plexusUtilsVersion>
-- --
2.17.1 2.20.1

View File

@ -0,0 +1,252 @@
From 4145b42a37b2b8ad87cfc464f62d7aace1b33ebf Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
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.
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.xmlunit</groupId>
- <artifactId>xmlunit-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.xmlunit</groupId>
- <artifactId>xmlunit-matchers</artifactId>
+ <groupId>xmlunit</groupId>
+ <artifactId>xmlunit</artifactId>
+ <version>1.6</version>
<scope>test</scope>
</dependency>
</dependencies>
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 &amp; 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.
<mailingLists>
<mailingList>
<name>parent</name>
+ <post>post@mailing.list.com</post>
<subscribe>subscribe@mailing.list.com</subscribe>
<unsubscribe>unsubscribe@mailing.list.com</unsubscribe>
- <post>post@mailing.list.com</post>
</mailingList>
</mailingLists>
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.
<jxpathVersion>1.3</jxpathVersion>
<resolverVersion>1.3.3</resolverVersion>
<slf4jVersion>1.7.25</slf4jVersion>
- <xmlunitVersion>2.2.1</xmlunitVersion>
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
<!-- Control the name of the distribution and information output by mvn -->
<distributionId>apache-maven</distributionId>
@@ -405,18 +404,6 @@ under the License.
<version>${mockitoVersion}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.xmlunit</groupId>
- <artifactId>xmlunit-core</artifactId>
- <version>${xmlunitVersion}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.xmlunit</groupId>
- <artifactId>xmlunit-matchers</artifactId>
- <version>${xmlunitVersion}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<!--bootstrap-start-comment-->
</dependencyManagement>
--
2.20.1

View File

@ -1,12 +1,11 @@
%global bundled_slf4j_version 1.7.26 %global bundled_slf4j_version 1.7.26
%global homedir %{_datadir}/%{name}%{?maven_version_suffix} %global homedir %{_datadir}/%{name}%{?maven_version_suffix}
%global confdir %{_sysconfdir}/%{name}%{?maven_version_suffix} %global confdir %{_sysconfdir}/%{name}%{?maven_version_suffix}
Name: maven Name: maven
Epoch: 1 Epoch: 1
Version: 3.5.4 Version: 3.6.1
Release: 6%{?dist} Release: 1%{?dist}
Summary: Java project management and project comprehension tool Summary: Java project management and project comprehension tool
# maven itself is ASL 2.0 # maven itself is ASL 2.0
# bundled slf4j is MIT # bundled slf4j is MIT
@ -14,7 +13,7 @@ License: ASL 2.0 and MIT
URL: http://maven.apache.org/ URL: http://maven.apache.org/
BuildArch: noarch 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 Source1: maven-bash-completion
Source2: mvn.1 Source2: mvn.1
@ -24,9 +23,10 @@ Patch1: 0001-Adapt-mvn-script.patch
Patch2: 0002-Invoke-logback-via-reflection.patch Patch2: 0002-Invoke-logback-via-reflection.patch
# We don't have mockito 2 yet # We don't have mockito 2 yet
Patch3: 0003-Revert-MNG-6335-Update-Mockito-to-2.12.0.patch 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: maven-local
BuildRequires: mvn(com.google.guava:guava:20.0)
BuildRequires: mvn(com.google.inject:guice::no_aop:) BuildRequires: mvn(com.google.inject:guice::no_aop:)
BuildRequires: mvn(commons-cli:commons-cli) BuildRequires: mvn(commons-cli:commons-cli)
BuildRequires: mvn(commons-jxpath:commons-jxpath) 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-file)
BuildRequires: mvn(org.apache.maven.wagon:wagon-http::shaded:) BuildRequires: mvn(org.apache.maven.wagon:wagon-http::shaded:)
BuildRequires: mvn(org.apache.maven.wagon:wagon-provider-api) 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.mojo:build-helper-maven-plugin)
BuildRequires: mvn(org.codehaus.plexus:plexus-classworlds) BuildRequires: mvn(org.codehaus.plexus:plexus-classworlds)
BuildRequires: mvn(org.codehaus.plexus:plexus-component-annotations) BuildRequires: mvn(org.codehaus.plexus:plexus-component-annotations)
BuildRequires: mvn(org.codehaus.plexus:plexus-component-metadata) BuildRequires: mvn(org.codehaus.plexus:plexus-component-metadata)
BuildRequires: mvn(org.codehaus.plexus:plexus-interpolation) 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.inject)
BuildRequires: mvn(org.eclipse.sisu:org.eclipse.sisu.plexus) BuildRequires: mvn(org.eclipse.sisu:org.eclipse.sisu.plexus)
BuildRequires: mvn(org.eclipse.sisu:sisu-maven-plugin) BuildRequires: mvn(org.eclipse.sisu:sisu-maven-plugin)
BuildRequires: mvn(org.fusesource.jansi:jansi) 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:jcl-over-slf4j)
BuildRequires: mvn(org.slf4j:slf4j-api) BuildRequires: mvn(org.slf4j:slf4j-api)
BuildRequires: mvn(org.slf4j:slf4j-simple) BuildRequires: mvn(org.slf4j:slf4j-simple)
BuildRequires: mvn(org.sonatype.plexus:plexus-cipher) BuildRequires: mvn(org.sonatype.plexus:plexus-cipher)
BuildRequires: mvn(org.sonatype.plexus:plexus-sec-dispatcher) BuildRequires: mvn(org.sonatype.plexus:plexus-sec-dispatcher)
BuildRequires: mvn(xmlunit:xmlunit) BuildRequires: mvn(xmlunit:xmlunit) < 2
BuildRequires: slf4j-sources = %{bundled_slf4j_version} BuildRequires: slf4j-sources = %{bundled_slf4j_version}
@ -94,7 +94,7 @@ Requires: atinject
Requires: cdi-api Requires: cdi-api
Requires: geronimo-annotation Requires: geronimo-annotation
Requires: google-guice Requires: google-guice
Requires: guava20 Requires: guava
Requires: hawtjni-runtime Requires: hawtjni-runtime
Requires: httpcomponents-client Requires: httpcomponents-client
Requires: httpcomponents-core Requires: httpcomponents-core
@ -155,7 +155,9 @@ Summary: API documentation for %{name}
%setup -q -n apache-%{name}-%{version} %setup -q -n apache-%{name}-%{version}
%patch1 -p1 %patch1 -p1
%patch2 -p1
%patch3 -p1 %patch3 -p1
%patch4 -p1
# not really used during build, but a precaution # not really used during build, but a precaution
find -name '*.jar' -not -path '*/test/*' -delete find -name '*.jar' -not -path '*/test/*' -delete
@ -184,7 +186,6 @@ sed -i "
%mvn_package :apache-maven __noinstall %mvn_package :apache-maven __noinstall
%pom_remove_dep -r :logback-classic %pom_remove_dep -r :logback-classic
%patch2 -p1
%mvn_alias :maven-resolver-provider :maven-aether-provider %mvn_alias :maven-resolver-provider :maven-aether-provider
@ -269,6 +270,9 @@ update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alt
%changelog %changelog
* Sat Apr 13 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.6.1-1
- Update to upstream version 3.6.1
* Fri Apr 12 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.5.4-6 * Fri Apr 12 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.5.4-6
- Update SLF4J version to 1.7.26 - Update SLF4J version to 1.7.26

View File

@ -1 +1 @@
SHA512 (apache-maven-3.5.4-src.tar.gz) = faf3c13af3350d056fd49aa3d0a631533a0340332bda8f88a9d8a4c489ec291981b29354a9ed6ff7a8565e0b79eaf16803f908067c5dbd16820cd9025852b39f SHA512 (apache-maven-3.6.1-src.tar.gz) = 11a31022cffa0518584703fffd9fce998332ac5f6c2a50db3b590e90f3bdd1508d9e0cb5ba89a699ef6536b237bcc96166cfde3d45bce6346fa21b05b4d12bf8