update to version 3.6.2

This commit is contained in:
Fabio Valentini 2020-05-14 11:56:33 +02:00
parent a12a73fe1c
commit 315a624a26
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF
7 changed files with 125 additions and 110 deletions

1
.gitignore vendored
View File

@ -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

View File

@ -1,52 +0,0 @@
From 56d10f48ebb2cdaf3882dc8afbef65a2ab529040 Mon Sep 17 00:00:00 2001
From: Sylwester Lachiewicz <slachiewicz@apache.org>
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

View File

@ -0,0 +1,96 @@
From f6eb583525c7f777bde16182c57a47345fd53cb0 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
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<Class<?>, ?> cache =
- (Map<Class<?>, ?>) 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<Class<?>, ?> cache =
- (Map<Class<?>, ?>) 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

View File

@ -1,50 +0,0 @@
From 092d1d07a61517ed9c460874934c9e0f3e9aef9b Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
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.
<wagonVersion>3.3.2</wagonVersion>
<securityDispatcherVersion>1.4</securityDispatcherVersion>
<cipherVersion>1.7</cipherVersion>
- <modelloVersion>1.10.0</modelloVersion>
+ <modelloVersion>1.11</modelloVersion>
<jxpathVersion>1.3</jxpathVersion>
<resolverVersion>1.3.3</resolverVersion>
<slf4jVersion>1.7.25</slf4jVersion>
--
2.20.1

View File

@ -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' '
<plugin>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
</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 <decathorpe@gmail.com> - 1:3.6.2-1
- Update to version 3.6.2.
* Thu May 14 2020 Fabio Valentini <decathorpe@gmail.com> - 1:3.6.1-6
- Port to modello 1.11.

View File

@ -1 +1 @@
SHA512 (apache-maven-3.6.1-src.tar.gz) = 11a31022cffa0518584703fffd9fce998332ac5f6c2a50db3b590e90f3bdd1508d9e0cb5ba89a699ef6536b237bcc96166cfde3d45bce6346fa21b05b4d12bf8
SHA512 (apache-maven-3.6.2-src.tar.gz) = 235198b48d29fe2f2394f2607a9a1637acfd0286beacb974c566f7f36ac6c469871a0db287539b2b62e6322d7423f586949e41cbbfea330fe03bf690688f6fd7