You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2022/01/27 14:53:05 UTC
[maven] 01/01: Upgrade Maven Resolver to 1.8.0
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch maven-resolver-1.8.0
in repository https://gitbox.apache.org/repos/asf/maven.git
commit 59905bbd13f4db4c96d9e7ad573fedcfc5cbfb82
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Thu Jan 27 15:52:49 2022 +0100
Upgrade Maven Resolver to 1.8.0
---
.../repository/internal/RelocatedArtifact.java | 34 +++-------------------
pom.xml | 2 +-
2 files changed, 5 insertions(+), 31 deletions(-)
diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RelocatedArtifact.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RelocatedArtifact.java
index a0a21e9..1449359 100644
--- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RelocatedArtifact.java
+++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RelocatedArtifact.java
@@ -89,38 +89,11 @@ public final class RelocatedArtifact
}
}
- // Revise these three methods when MRESOLVER-233 is delivered
@Override
- public Artifact setVersion( String version )
+ protected Artifact newInstance( String version, Map<String, String> properties, File file )
{
- String current = getVersion();
- if ( current.equals( version ) || ( version == null && current.length() <= 0 ) )
- {
- return this;
- }
- return new RelocatedArtifact( artifact, groupId, artifactId, version, message );
- }
-
- @Override
- public Artifact setFile( File file )
- {
- File current = getFile();
- if ( Objects.equals( current, file ) )
- {
- return this;
- }
- return new RelocatedArtifact( artifact.setFile( file ), groupId, artifactId, version, message );
- }
-
- @Override
- public Artifact setProperties( Map<String, String> properties )
- {
- Map<String, String> current = getProperties();
- if ( current.equals( properties ) || ( properties == null && current.isEmpty() ) )
- {
- return this;
- }
- return new RelocatedArtifact( artifact.setProperties( properties ), groupId, artifactId, version, message );
+ return new RelocatedArtifact( artifact.setProperties( properties ).setFile( file ),
+ this.groupId, this.artifactId, version, this.message );
}
public String getClassifier()
@@ -152,4 +125,5 @@ public final class RelocatedArtifact
{
return message;
}
+
}
diff --git a/pom.xml b/pom.xml
index 1ff9ccf..c140a79 100644
--- a/pom.xml
+++ b/pom.xml
@@ -65,7 +65,7 @@ under the License.
<cipherVersion>2.0</cipherVersion>
<modelloVersion>1.11</modelloVersion>
<jxpathVersion>1.3</jxpathVersion>
- <resolverVersion>1.7.2</resolverVersion>
+ <resolverVersion>1.8.0-SNAPSHOT</resolverVersion>
<slf4jVersion>1.7.32</slf4jVersion>
<xmlunitVersion>2.6.4</xmlunitVersion>
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>