diff --git a/0001-Update-maven-invoker-to-version-3.0.1.patch b/0001-Update-maven-invoker-to-version-3.0.1.patch new file mode 100644 index 0000000..da4e2e4 --- /dev/null +++ b/0001-Update-maven-invoker-to-version-3.0.1.patch @@ -0,0 +1,115 @@ +From 5d8219051b8419aeb33f15f6a5e38084f1782572 Mon Sep 17 00:00:00 2001 +From: Marian Koncek +Date: Wed, 29 May 2019 16:55:20 +0200 +Subject: [PATCH] Update maven-invoker to version 3.0.1 + +--- + xmvn-parent/pom.xml | 2 +- + xmvn-tools/xmvn-bisect/pom.xml | 4 ++ + .../xmvn/tools/bisect/BisectCliRequest.java | 38 ++++++++++++++++--- + 3 files changed, 37 insertions(+), 7 deletions(-) + +diff --git a/xmvn-parent/pom.xml b/xmvn-parent/pom.xml +index 5c21cfa..edf6cbd 100644 +--- a/xmvn-parent/pom.xml ++++ b/xmvn-parent/pom.xml +@@ -86,7 +86,7 @@ + 1.64 + 4.4.1 + 2.4.10 +- 2.2 ++ 3.0.1 + 1.0.3 + 3.5.0 + 3.0.24 +diff --git a/xmvn-tools/xmvn-bisect/pom.xml b/xmvn-tools/xmvn-bisect/pom.xml +index ce592ad..1410022 100644 +--- a/xmvn-tools/xmvn-bisect/pom.xml ++++ b/xmvn-tools/xmvn-bisect/pom.xml +@@ -49,5 +49,9 @@ + + + ++ ++ org.codehaus.plexus ++ plexus-utils ++ + + +diff --git a/xmvn-tools/xmvn-bisect/src/main/java/org/fedoraproject/xmvn/tools/bisect/BisectCliRequest.java b/xmvn-tools/xmvn-bisect/src/main/java/org/fedoraproject/xmvn/tools/bisect/BisectCliRequest.java +index 795bfd9..1f0fcf5 100644 +--- a/xmvn-tools/xmvn-bisect/src/main/java/org/fedoraproject/xmvn/tools/bisect/BisectCliRequest.java ++++ b/xmvn-tools/xmvn-bisect/src/main/java/org/fedoraproject/xmvn/tools/bisect/BisectCliRequest.java +@@ -29,6 +29,8 @@ import com.beust.jcommander.Parameter; + import com.beust.jcommander.ParameterException; + import org.apache.maven.shared.invoker.DefaultInvocationRequest; + import org.apache.maven.shared.invoker.InvocationRequest; ++import org.apache.maven.shared.invoker.InvocationRequest.CheckSumPolicy; ++import org.apache.maven.shared.invoker.InvocationRequest.ReactorFailureBehavior; + import org.codehaus.plexus.util.StringUtils; + + /** +@@ -178,6 +180,30 @@ public class BisectCliRequest + return null; + } + ++ private static CheckSumPolicy stringToCheckSumPolicy( String policy ) ++ { ++ if ( policy == null ) ++ return null; ++ if ( policy.equals( "fail" ) ) ++ return CheckSumPolicy.Fail; ++ if ( policy.equals( "warn" ) ) ++ return CheckSumPolicy.Warn; ++ ++ throw new IllegalArgumentException( "Invalid checksum policy selected" ); ++ } ++ ++ private static String checkSumPolicyToString( CheckSumPolicy policy ) ++ { ++ if ( policy == null ) ++ return null; ++ if ( policy.equals( CheckSumPolicy.Fail ) ) ++ return "fail"; ++ if ( policy.equals( CheckSumPolicy.Warn ) ) ++ return "warn"; ++ ++ throw new IllegalArgumentException( "Invalid checksum policy selected" ); ++ } ++ + private void setDefaultValues() + { + String userHome = System.getProperty( "user.home" ); +@@ -193,11 +219,11 @@ public class BisectCliRequest + alsoMake = request.isAlsoMake(); + alsoMakeDependents = request.isAlsoMakeDependents(); + debug = request.isDebug(); +- failureBehavior = request.getFailureBehavior(); +- globalChecksumPolicy = request.getGlobalChecksumPolicy(); ++ failureBehavior = request.getReactorFailureBehavior().getLongOption(); ++ globalChecksumPolicy = checkSumPolicyToString( request.getGlobalChecksumPolicy() ); + globalSettings = StringUtils.defaultString( request.getGlobalSettingsFile() ); + goals = request.getGoals(); +- batchMode = !request.isInteractive(); ++ batchMode = request.isBatchMode(); + javaHome = fileToString( request.getJavaHome() ); + localRepository = fileToString( request.getLocalRepositoryDirectory( null ) ); + mavenOpts = request.getMavenOpts(); +@@ -222,11 +248,11 @@ public class BisectCliRequest + request.setAlsoMake( alsoMake ); + request.setAlsoMakeDependents( alsoMakeDependents ); + request.setDebug( debug ); +- request.setFailureBehavior( failureBehavior ); +- request.setGlobalChecksumPolicy( globalChecksumPolicy ); ++ request.setReactorFailureBehavior( ReactorFailureBehavior.valueOfByLongOption( failureBehavior ) ); ++ request.setGlobalChecksumPolicy( stringToCheckSumPolicy( globalChecksumPolicy ) ); + request.setGlobalSettingsFile( stringToFile( globalSettings ) ); + request.setGoals( goals ); +- request.setInteractive( !batchMode ); ++ request.setBatchMode( batchMode ); + request.setJavaHome( stringToFile( javaHome ) ); + request.setLocalRepositoryDirectory( stringToFile( localRepository ) ); + request.setMavenOpts( mavenOpts ); +-- +2.20.1 + diff --git a/xmvn.spec b/xmvn.spec index 02576a3..a424872 100644 --- a/xmvn.spec +++ b/xmvn.spec @@ -10,7 +10,7 @@ Name: xmvn Version: 3.0.0 -Release: 26%{?dist} +Release: 27%{?dist} Summary: Local Extensions for Apache Maven License: ASL 2.0 URL: https://fedora-java.github.io/xmvn/ @@ -28,6 +28,7 @@ Patch6: 0001-Use-apache-commons-compress-for-manifest-injection-a.patch Patch7: 0001-port-to-gradle-4.4.1.patch Patch8: 0001-test-Fix-XML-namespace-in-installer-test-resources.patch Patch9: 0001-Port-to-Xmlunit-2.6.2.patch +Patch10: 0001-Update-maven-invoker-to-version-3.0.1.patch BuildRequires: maven >= 3.5.0 BuildRequires: maven-local @@ -220,6 +221,7 @@ This package provides %{summary}. %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 # Bisect IT has no chances of working in local, offline mode, without # network access - it needs to access remote repositories. @@ -369,6 +371,9 @@ cp -P ${maven_home}/bin/m2.conf %{buildroot}%{_datadir}/%{name}/bin/ %doc LICENSE NOTICE %changelog +* Mon Sep 02 2019 Marian Koncek - 3.0.0-27 +- Port to maven-invoker 3.0.1 + * Thu Aug 22 2019 Fabio Valentini - 3.0.0-26 - Port to xmlunit2.