Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package maven-deploy-plugin for
openSUSE:Factory checked in at 2022-05-12 23:00:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/maven-deploy-plugin (Old)
and /work/SRC/openSUSE:Factory/.maven-deploy-plugin.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "maven-deploy-plugin"
Thu May 12 23:00:11 2022 rev:4 rq:976408 version:3.0.0~M2
Changes:
--------
--- /work/SRC/openSUSE:Factory/maven-deploy-plugin/maven-deploy-plugin.changes
2022-03-22 19:40:45.443124979 +0100
+++
/work/SRC/openSUSE:Factory/.maven-deploy-plugin.new.1538/maven-deploy-plugin.changes
2022-05-12 23:00:29.992808042 +0200
@@ -1,0 +2,12 @@
+Wed May 11 06:43:07 UTC 2022 - Fridrich Strba <[email protected]>
+
+- Upgrade to upstream tag 3.0.0 milestone M2
+ * port to maven 3
+- Added patches:
+ * 0001-MDEPLOY-291-Update-POM-parent-and-Maven-22.patch
+ + upstream patch to port tests to modern maven framework
+ * 0002-Fix-tests-with-Java-16.patch
+ + Add a profile to run tests with modular Java versions
+- Add with tests option
+
+-------------------------------------------------------------------
Old:
----
maven-deploy-plugin-2.8.2-source-release.zip
New:
----
0001-MDEPLOY-291-Update-POM-parent-and-Maven-22.patch
0002-Fix-tests-with-Java-16.patch
LICENSE-2.0.txt
maven-deploy-plugin-3.0.0-M2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ maven-deploy-plugin.spec ++++++
--- /var/tmp/diff_new_pack.l8oWOm/_old 2022-05-12 23:00:31.244809723 +0200
+++ /var/tmp/diff_new_pack.l8oWOm/_new 2022-05-12 23:00:31.248809729 +0200
@@ -16,27 +16,48 @@
#
+%global base_ver 3.0.0
+%global milestone M2
+%bcond_with tests
Name: maven-deploy-plugin
-Version: 2.8.2
+Version: %{base_ver}~%{milestone}
Release: 0
Summary: Maven Deploy Plugin
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://maven.apache.org/plugins/maven-deploy-plugin/
-Source0:
https://repo1.maven.org/maven2/org/apache/maven/plugins/%{name}/%{version}/%{name}-%{version}-source-release.zip
+Source0:
https://github.com/apache/%{name}/archive/refs/tags/%{name}-%{base_ver}-%{milestone}.tar.gz
+Source1: https://www.apache.org/licenses/LICENSE-2.0.txt
+Patch0: 0001-MDEPLOY-291-Update-POM-parent-and-Maven-22.patch
+Patch1: 0002-Fix-tests-with-Java-16.patch
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: maven-local
-BuildRequires: unzip
+BuildRequires: mvn(commons-io:commons-io)
BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations)
BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-plugins:pom:)
-BuildRequires: mvn(org.apache.maven:maven-artifact:2.2.1)
-BuildRequires: mvn(org.apache.maven:maven-model:2.2.1)
+BuildRequires: mvn(org.apache.maven.shared:maven-artifact-transfer)
+BuildRequires: mvn(org.apache.maven:maven-artifact)
+BuildRequires: mvn(org.apache.maven:maven-core)
+BuildRequires: mvn(org.apache.maven:maven-model)
BuildRequires: mvn(org.apache.maven:maven-plugin-api)
-BuildRequires: mvn(org.apache.maven:maven-project)
BuildRequires: mvn(org.codehaus.plexus:plexus-utils)
+BuildRequires: mvn(org.eclipse.aether:aether-api)
+BuildRequires: mvn(org.eclipse.aether:aether-util)
+BuildRequires: mvn(org.slf4j:slf4j-api)
BuildArch: noarch
+%if %{with tests}
+BuildRequires: mvn(junit:junit)
+BuildRequires:
mvn(org.apache.maven.plugin-testing:maven-plugin-testing-harness)
+BuildRequires: mvn(org.apache.maven:maven-aether-provider)
+BuildRequires: mvn(org.apache.maven:maven-compat)
+BuildRequires: mvn(org.eclipse.aether:aether-connector-basic)
+BuildRequires: mvn(org.eclipse.aether:aether-transport-file)
+BuildRequires: mvn(org.eclipse.aether:aether-transport-http)
+BuildRequires: mvn(org.mockito:mockito-core)
+BuildRequires: mvn(org.slf4j:slf4j-nop)
+%endif
%description
Uploads the project artifacts to the internal remote repository.
@@ -49,17 +70,19 @@
API documentation for %{name}.
%prep
-%setup -q
-
-%pom_add_plugin :maven-plugin-plugin . "
- <configuration>
- <helpPackageName>org.apache.maven.plugin.deploy</helpPackageName>
- </configuration>"
+%setup -q -n %{name}-%{name}-%{base_ver}-%{milestone}
+cp %{SOURCE1} LICENSE
+%autopatch -p1
%build
%{mvn_file} :%{name} %{name}
-%{mvn_build} -f -- \
+
+%{mvn_build} \
+%if %{without tests}
+ -f \
+%endif
+ -- \
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
-Dmaven.compiler.release=8 \
%endif
@@ -71,10 +94,8 @@
%files -f .mfiles
%license LICENSE
-%doc DEPENDENCIES NOTICE
%files javadoc -f .mfiles-javadoc
%license LICENSE
-%doc NOTICE
%changelog
++++++ 0001-MDEPLOY-291-Update-POM-parent-and-Maven-22.patch ++++++
>From 65baf4034acf16e07c7c344f6707ef434aabd0b4 Mon Sep 17 00:00:00 2001
From: Tamas Cservenak <[email protected]>
Date: Fri, 6 May 2022 09:54:39 +0200
Subject: [PATCH 1/2] [MDEPLOY-291] Update POM parent and Maven (#22)
Update plugin build:
* update parent to 36
* update maven to 3.2.5
* leave the plugin to Java7
* warn user if older that Maven 3.9.0 is used to deploy a maven-plugin
---
pom.xml | 89 +++++++++++++------
.../plugins/deploy/AbstractDeployMojo.java | 39 +++++++-
.../maven/plugins/deploy/DeployFileMojo.java | 1 +
.../maven/plugins/deploy/DeployMojo.java | 1 +
.../plugins/deploy/DeployFileMojoTest.java | 20 +++--
.../maven/plugins/deploy/DeployMojoTest.java | 17 ++--
.../apache/maven/plugins/deploy/Utils.java | 2 +-
.../deploy/stubs/ArtifactRepositoryStub.java | 12 +++
8 files changed, 136 insertions(+), 45 deletions(-)
diff --git a/pom.xml b/pom.xml
index 94d8784..10d2644 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,8 +25,8 @@ under the License.
<parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugins</artifactId>
- <version>34</version>
- <relativePath>../../pom/maven/maven-plugins/pom.xml</relativePath>
+ <version>36</version>
+ <relativePath/>
</parent>
<artifactId>maven-deploy-plugin</artifactId>
@@ -63,7 +63,9 @@ under the License.
</distributionManagement>
<properties>
- <mavenVersion>3.0</mavenVersion>
+ <mavenVersion>3.2.5</mavenVersion>
+ <slf4jVersion>1.7.5</slf4jVersion> <!-- Keep in sync with resolver used in
maven above -->
+ <resolverVersion>1.0.0.v20140518</resolverVersion> <!-- Keep in sync with
resolver used in maven above -->
<javaVersion>7</javaVersion>
<project.build.outputTimestamp>2021-12-27T14:10:57Z</project.build.outputTimestamp>
</properties>
@@ -73,50 +75,71 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${mavenVersion}</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${mavenVersion}</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<version>${mavenVersion}</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>${mavenVersion}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4jVersion}</version>
+ <scope>provided</scope>
</dependency>
-
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-artifact-transfer</artifactId>
<version>0.13.1</version>
</dependency>
- <!-- Upgrade of transitive dependency. -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>2.5</version>
+ <version>2.6</version>
</dependency>
-
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.aether</groupId>
+ <artifactId>aether-api</artifactId>
+ <version>${resolverVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.aether</groupId>
+ <artifactId>aether-util</artifactId>
+ <version>${resolverVersion}</version>
+ </dependency>
+
<!-- dependencies to annotations -->
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- <version>3.2.0</version>
- </dependency>
+
+ <!-- Test -->
<dependency>
<groupId>org.apache.maven.plugin-testing</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
- <version>2.1</version>
+ <version>3.3.0</version>
<scope>test</scope>
</dependency>
<dependency> <!-- used by maven-plugin-testing-harness, don't give it
compile scope! -->
@@ -126,33 +149,45 @@ under the License.
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <version>2.28.2</version>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-aether-provider</artifactId>
+ <version>${mavenVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.13.1</version>
+ <groupId>org.eclipse.aether</groupId>
+ <artifactId>aether-connector-basic</artifactId>
+ <version>${resolverVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.sonatype.aether</groupId>
- <artifactId>aether-connector-file</artifactId>
- <version>1.7</version>
+ <groupId>org.eclipse.aether</groupId>
+ <artifactId>aether-transport-file</artifactId>
+ <version>${resolverVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.7.5</version>
- <scope>provided</scope>
+ <groupId>org.eclipse.aether</groupId>
+ <artifactId>aether-transport-http</artifactId>
+ <version>${resolverVersion}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <version>2.28.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.13.2</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
- <version>1.7.5</version>
+ <version>${slf4jVersion}</version>
<scope>test</scope>
</dependency>
diff --git
a/src/main/java/org/apache/maven/plugins/deploy/AbstractDeployMojo.java
b/src/main/java/org/apache/maven/plugins/deploy/AbstractDeployMojo.java
index f933e36..3939a8e 100644
--- a/src/main/java/org/apache/maven/plugins/deploy/AbstractDeployMojo.java
+++ b/src/main/java/org/apache/maven/plugins/deploy/AbstractDeployMojo.java
@@ -26,7 +26,12 @@ import
org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.rtinfo.RuntimeInformation;
+import org.eclipse.aether.util.version.GenericVersionScheme;
+import org.eclipse.aether.version.InvalidVersionSpecificationException;
+import org.eclipse.aether.version.Version;
/**
* Abstract class for Deploy mojo's.
@@ -52,7 +57,14 @@ public abstract class AbstractDeployMojo
@Parameter( defaultValue = "${session}", readonly = true, required = true )
private MavenSession session;
-
+
+ @Component
+ private RuntimeInformation runtimeInformation;
+
+ private static final String AFFECTED_MAVEN_PACKAGING = "maven-plugin";
+
+ private static final String FIXED_MAVEN_VERSION = "3.9.0";
+
/* Setters and Getters */
void failIfOffline()
@@ -79,4 +91,29 @@ public abstract class AbstractDeployMojo
{
return session;
}
+
+ protected void warnIfAffectedPackagingAndMaven( final String packaging )
+ {
+ if ( AFFECTED_MAVEN_PACKAGING.equals( packaging ) )
+ {
+ try
+ {
+ GenericVersionScheme versionScheme = new
GenericVersionScheme();
+ Version fixedMavenVersion = versionScheme.parseVersion(
FIXED_MAVEN_VERSION );
+ Version currentMavenVersion = versionScheme.parseVersion(
runtimeInformation.getMavenVersion() );
+ if ( fixedMavenVersion.compareTo( currentMavenVersion ) > 0 )
+ {
+ getLog().warn( "" );
+ getLog().warn( "You are about to deploy a maven-plugin
using Maven " + currentMavenVersion + "." );
+ getLog().warn( "This plugin should be used ONLY with Maven
3.9.0 and newer, as MNG-7055" );
+ getLog().warn( "is fixed in those versions of Maven only!"
);
+ getLog().warn( "" );
+ }
+ }
+ catch ( InvalidVersionSpecificationException e )
+ {
+ // skip it: Generic does not throw, only API contains this
exception
+ }
+ }
+ }
}
diff --git a/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java
b/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java
index 4304421..12267e7 100644
--- a/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java
+++ b/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java
@@ -481,6 +481,7 @@ public class DeployFileMojo
try
{
+ warnIfAffectedPackagingAndMaven( packaging );
artifactDeployer.deploy( getSession().getProjectBuildingRequest(),
deploymentRepository,
deployableArtifacts );
}
diff --git a/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
b/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
index ae26134..4aaa971 100644
--- a/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
+++ b/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
@@ -207,6 +207,7 @@ public class DeployMojo
{
try
{
+ warnIfAffectedPackagingAndMaven( pir.getProject().getPackaging() );
projectDeployer.deploy( pbr, pir, repo );
}
catch ( NoFileAssignedException e )
diff --git
a/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java
b/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java
index 6c7064b..371838b 100644
--- a/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java
@@ -30,11 +30,12 @@ import org.apache.maven.execution.MavenSession;
import org.apache.maven.model.Model;
import org.apache.maven.plugin.testing.AbstractMojoTestCase;
import org.apache.maven.project.ProjectBuildingRequest;
-import org.apache.maven.repository.internal.MavenRepositorySystemSession;
+import org.eclipse.aether.DefaultRepositorySystemSession;
+import org.eclipse.aether.repository.LocalRepository;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import org.sonatype.aether.impl.internal.SimpleLocalRepositoryManager;
+import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory;
/**
* @author <a href="mailto:[email protected]">Allan Ramirez</a>
@@ -91,9 +92,10 @@ public class DeployFileMojoTest
assertNotNull( mojo );
ProjectBuildingRequest buildingRequest = mock (
ProjectBuildingRequest.class );
+ when( buildingRequest.getRepositoryMerging() ).thenReturn(
ProjectBuildingRequest.RepositoryMerging.POM_DOMINANT );
when( session.getProjectBuildingRequest() ).thenReturn(
buildingRequest );
- MavenRepositorySystemSession repositorySession = new
MavenRepositorySystemSession();
- repositorySession.setLocalRepositoryManager( new
SimpleLocalRepositoryManager( LOCAL_REPO ) );
+ DefaultRepositorySystemSession repositorySession = new
DefaultRepositorySystemSession();
+ repositorySession.setLocalRepositoryManager( new
SimpleLocalRepositoryManagerFactory().newInstance( repositorySession, new
LocalRepository( LOCAL_REPO ) ) );
when( buildingRequest.getRepositorySession() ).thenReturn(
repositorySession );
String groupId = (String) getVariableValueFromObject( mojo, "groupId"
);
@@ -192,9 +194,10 @@ public class DeployFileMojoTest
assertNotNull( mojo );
ProjectBuildingRequest buildingRequest = mock (
ProjectBuildingRequest.class );
+ when( buildingRequest.getRepositoryMerging() ).thenReturn(
ProjectBuildingRequest.RepositoryMerging.POM_DOMINANT );
when( session.getProjectBuildingRequest() ).thenReturn(
buildingRequest );
- MavenRepositorySystemSession repositorySession = new
MavenRepositorySystemSession();
- repositorySession.setLocalRepositoryManager( new
SimpleLocalRepositoryManager( LOCAL_REPO ) );
+ DefaultRepositorySystemSession repositorySession = new
DefaultRepositorySystemSession();
+ repositorySession.setLocalRepositoryManager( new
SimpleLocalRepositoryManagerFactory().newInstance( repositorySession, new
LocalRepository( LOCAL_REPO ) ) );
when( buildingRequest.getRepositorySession() ).thenReturn(
repositorySession );
String classifier = ( String ) getVariableValueFromObject( mojo,
"classifier" );
@@ -240,9 +243,10 @@ public class DeployFileMojoTest
assertNotNull( mojo );
ProjectBuildingRequest buildingRequest = mock (
ProjectBuildingRequest.class );
+ when( buildingRequest.getRepositoryMerging() ).thenReturn(
ProjectBuildingRequest.RepositoryMerging.POM_DOMINANT );
when( session.getProjectBuildingRequest() ).thenReturn(
buildingRequest );
- MavenRepositorySystemSession repositorySession = new
MavenRepositorySystemSession();
- repositorySession.setLocalRepositoryManager( new
SimpleLocalRepositoryManager( LOCAL_REPO ) );
+ DefaultRepositorySystemSession repositorySession = new
DefaultRepositorySystemSession();
+ repositorySession.setLocalRepositoryManager( new
SimpleLocalRepositoryManagerFactory().newInstance( repositorySession, new
LocalRepository( LOCAL_REPO ) ) );
when( buildingRequest.getRepositorySession() ).thenReturn(
repositorySession );
String groupId = (String) getVariableValueFromObject( mojo, "groupId"
);
diff --git a/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java
b/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java
index 63fe2de..6404f5a 100644
--- a/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java
@@ -40,14 +40,15 @@ import
org.apache.maven.plugins.deploy.stubs.ArtifactRepositoryStub;
import org.apache.maven.plugins.deploy.stubs.DeployArtifactStub;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.ProjectBuildingRequest;
-import org.apache.maven.repository.internal.MavenRepositorySystemSession;
import org.apache.maven.shared.transfer.project.deploy.ProjectDeployerRequest;
import org.codehaus.plexus.util.FileUtils;
+import org.eclipse.aether.DefaultRepositorySystemSession;
+import org.eclipse.aether.repository.LocalRepository;
import org.junit.Ignore;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import org.sonatype.aether.impl.internal.SimpleLocalRepositoryManager;
+import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory;
/**
* @author <a href="mailto:[email protected]">Allan Ramirez</a>
@@ -132,8 +133,8 @@ public class DeployMojoTest
ProjectBuildingRequest buildingRequest = mock (
ProjectBuildingRequest.class );
when( session.getProjectBuildingRequest() ).thenReturn(
buildingRequest );
- MavenRepositorySystemSession repositorySession = new
MavenRepositorySystemSession();
- repositorySession.setLocalRepositoryManager( new
SimpleLocalRepositoryManager( LOCAL_REPO ) );
+ DefaultRepositorySystemSession repositorySession = new
DefaultRepositorySystemSession();
+ repositorySession.setLocalRepositoryManager( new
SimpleLocalRepositoryManagerFactory().newInstance( repositorySession, new
LocalRepository( LOCAL_REPO ) ) );
when( buildingRequest.getRepositorySession() ).thenReturn(
repositorySession );
File file = new File( getBasedir(),
@@ -303,8 +304,8 @@ public class DeployMojoTest
ProjectBuildingRequest buildingRequest = mock (
ProjectBuildingRequest.class );
when( session.getProjectBuildingRequest() ).thenReturn(
buildingRequest );
- MavenRepositorySystemSession repositorySession = new
MavenRepositorySystemSession();
- repositorySession.setLocalRepositoryManager( new
SimpleLocalRepositoryManager( LOCAL_REPO ) );
+ DefaultRepositorySystemSession repositorySession = new
DefaultRepositorySystemSession();
+ repositorySession.setLocalRepositoryManager( new
SimpleLocalRepositoryManagerFactory().newInstance( repositorySession, new
LocalRepository( LOCAL_REPO ) ) );
when( buildingRequest.getRepositorySession() ).thenReturn(
repositorySession );
File pomFile = new File( getBasedir(),
@@ -415,8 +416,8 @@ public class DeployMojoTest
ProjectBuildingRequest buildingRequest = mock (
ProjectBuildingRequest.class );
when( session.getProjectBuildingRequest() ).thenReturn(
buildingRequest );
- MavenRepositorySystemSession repositorySession = new
MavenRepositorySystemSession();
- repositorySession.setLocalRepositoryManager( new
SimpleLocalRepositoryManager( LOCAL_REPO ) );
+ DefaultRepositorySystemSession repositorySession = new
DefaultRepositorySystemSession();
+ repositorySession.setLocalRepositoryManager( new
SimpleLocalRepositoryManagerFactory().newInstance( repositorySession, new
LocalRepository( LOCAL_REPO ) ) );
when( buildingRequest.getRepositorySession() ).thenReturn(
repositorySession );
MavenProject project = (MavenProject) getVariableValueFromObject(
mojo, "project" );
diff --git a/src/test/java/org/apache/maven/plugins/deploy/Utils.java
b/src/test/java/org/apache/maven/plugins/deploy/Utils.java
index 4df7442..f4acbc9 100644
--- a/src/test/java/org/apache/maven/plugins/deploy/Utils.java
+++ b/src/test/java/org/apache/maven/plugins/deploy/Utils.java
@@ -26,7 +26,7 @@ import java.util.List;
import java.util.Map;
import org.apache.maven.plugin.MojoExecutionException;
-import org.sonatype.aether.util.ChecksumUtils;
+import org.eclipse.aether.util.ChecksumUtils;
/**
* A utility class to assist testing.
diff --git
a/src/test/java/org/apache/maven/plugins/deploy/stubs/ArtifactRepositoryStub.java
b/src/test/java/org/apache/maven/plugins/deploy/stubs/ArtifactRepositoryStub.java
index 0b94ebe..92db6c1 100644
---
a/src/test/java/org/apache/maven/plugins/deploy/stubs/ArtifactRepositoryStub.java
+++
b/src/test/java/org/apache/maven/plugins/deploy/stubs/ArtifactRepositoryStub.java
@@ -131,4 +131,16 @@ public class ArtifactRepositoryStub
{
return blacklisted;
}
+
+ // @Override
+ public boolean isBlocked()
+ {
+ return false;
+ }
+
+ // @Override
+ public void setBlocked( boolean b )
+ {
+
+ }
}
--
2.36.0
++++++ 0002-Fix-tests-with-Java-16.patch ++++++
>From a183366cbd1b5a8c4beb9cf671832522b512363a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <[email protected]>
Date: Wed, 11 May 2022 08:29:14 +0200
Subject: [PATCH 2/2] Fix tests with Java 16+
---
pom.xml | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/pom.xml b/pom.xml
index 10d2644..48027cc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -250,5 +250,21 @@ under the License.
</pluginManagement>
</build>
</profile>
+ <profile>
+ <id>jdk9+</id>
+ <activation>
+ <jdk>[9,)</jdk>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>
--
2.36.0
++++++ LICENSE-2.0.txt ++++++
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.