You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2026/08/19 16:21:08 UTC
(maven-wagon) 02/03: Upgrade maven-scm to 2.2.1
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch wagon-3.x
in repository https://gitbox.apache.org/repos/asf/maven-wagon.git
commit ee8532c7f05704f6b43b7194cceeead97212f02f
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Wed Aug 19 07:02:23 2026 +0200
Upgrade maven-scm to 2.2.1
2.x dropped plexus-container-default from maven-scm-manager-plexus, so the
exclusion no longer belongs on that dependency. It moves to
maven-scm-provider-gittest, where maven-scm-test still pulls the old
container in through maven-plugin-testing-harness. That path is tracked as
apache/maven-scm#1394 and is already fixed for maven-scm 2.2.2.
GitScmTestUtils.setDefaultUser became setDefaultGitConfig and now throws
IOException.
---
wagon-providers/wagon-scm/pom.xml | 26 +++++++++++-----------
.../providers/scm/UserSafeGitExeScmProvider.java | 8 ++++++-
2 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/wagon-providers/wagon-scm/pom.xml b/wagon-providers/wagon-scm/pom.xml
index 7d7dbb31..188311f6 100644
--- a/wagon-providers/wagon-scm/pom.xml
+++ b/wagon-providers/wagon-scm/pom.xml
@@ -31,7 +31,7 @@ under the License.
<description>Wagon provider that gets and puts artifacts using a Source Control Management system</description>
<properties>
- <mavenScmVersion>1.11.1</mavenScmVersion>
+ <mavenScmVersion>2.2.1</mavenScmVersion>
</properties>
<dependencies>
@@ -45,18 +45,6 @@ under the License.
<artifactId>maven-scm-manager-plexus</artifactId>
<version>${mavenScmVersion}</version>
<scope>runtime</scope>
- <exclusions>
- <!--
- | Drags in plexus-container-default 1.0-alpha-9, which collides with the Plexus shim
- | (two copies of PlexusContainer and PlexusTestCase on the test classpath, with the
- | 2005 alpha-9 copy winning). It also drags in classworlds 1.1-alpha-2 and junit 4.13.2
- | at runtime scope, which would leak JUnit into this provider's consumers.
- -->
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-container-default</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
@@ -73,6 +61,18 @@ under the License.
<artifactId>maven-scm-provider-gittest</artifactId>
<version>${mavenScmVersion}</version>
<scope>test</scope>
+ <exclusions>
+ <!--
+ | maven-scm-test still builds on maven-plugin-testing-harness 3.3.0, whose
+ | plexus-archiver 2.2 drags in plexus-container-default: a second copy of
+ | PlexusContainer and PlexusTestCase next to the Plexus shim. Tracked as
+ | https://github.com/apache/maven-scm/issues/1394 and fixed for maven-scm 2.2.2.
+ -->
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.scm</groupId>
diff --git a/wagon-providers/wagon-scm/src/test/java/org/apache/maven/wagon/providers/scm/UserSafeGitExeScmProvider.java b/wagon-providers/wagon-scm/src/test/java/org/apache/maven/wagon/providers/scm/UserSafeGitExeScmProvider.java
index b01fc2f3..687e75e7 100644
--- a/wagon-providers/wagon-scm/src/test/java/org/apache/maven/wagon/providers/scm/UserSafeGitExeScmProvider.java
+++ b/wagon-providers/wagon-scm/src/test/java/org/apache/maven/wagon/providers/scm/UserSafeGitExeScmProvider.java
@@ -18,6 +18,8 @@
*/
package org.apache.maven.wagon.providers.scm;
+import java.io.IOException;
+
import org.apache.maven.scm.ScmException;
import org.apache.maven.scm.ScmFileSet;
import org.apache.maven.scm.ScmVersion;
@@ -31,7 +33,11 @@ public class UserSafeGitExeScmProvider extends GitExeScmProvider {
@Override
public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion, String message)
throws ScmException {
- GitScmTestUtils.setDefaultUser(fileSet.getBasedir());
+ try {
+ GitScmTestUtils.setDefaultGitConfig(fileSet.getBasedir());
+ } catch (IOException e) {
+ throw new ScmException("Cannot write the test git configuration", e);
+ }
return super.checkIn(repository, fileSet, scmVersion, message);
}