diff --git a/.gitignore b/.gitignore index f0ccfba..7ab0843 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,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 03b7a1f..7b9591f 100644 --- a/maven.spec +++ b/maven.spec @@ -6,8 +6,8 @@ Name: maven Epoch: 1 -Version: 3.6.1 -Release: 6%{?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 @@ -23,10 +23,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: this patch is not needed for maven 3.6.2+ -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: mvn(com.google.inject:guice::no_aop:) @@ -39,6 +37,7 @@ BuildRequires: mvn(org.apache.commons:commons-lang3) BuildRequires: mvn(org.apache.maven:maven-parent:pom:) BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-failsafe-plugin) BuildRequires: 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) @@ -133,6 +132,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 Summary: Core part of Maven # If XMvn is part of the same RPM transaction then it should be @@ -151,25 +151,34 @@ 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}. + %prep %setup -q -n apache-%{name}-%{version} %patch1 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 + +# TODO: Delete after maven-3.6.3 +# Fix Tycho pomless build +# https://issues.apache.org/jira/browse/MNG-6765 +# https://github.com/apache/maven/commit/07ab962c85950b034be3216996900920c0204c3a +sed -i 's/@Named/@Named\( "core-default" \)/' maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProcessor.java # not really used during build, but a precaution find -name '*.jar' -not -path '*/test/*' -delete find -name '*.class' -delete find -name '*.bat' -delete +%pom_remove_dep -r :powermock-reflect + sed -i 's:\r::' apache-maven/src/conf/settings.xml # Downloads dependency licenses from the Internet and aggregates them. @@ -198,6 +207,14 @@ sed -i " %mvn_alias :maven-resolver-provider :maven-aether-provider +# inject missing sisu-maven-plugin in maven-model-builder +%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 @@ -279,6 +296,9 @@ update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alt %changelog +* Thu May 14 2020 Fabio Valentini - 1:3.6.2-1 +- Update to version 3.6.2. + * Thu May 14 2020 Fabio Valentini - 1:3.6.1-6 - Port to modello 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