From 0cc0d7aa1fd6a8de18e7309cf5e895c1a28a6d34 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Thu, 26 Sep 2019 16:31:45 +0200 Subject: [PATCH] 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