From 75c0c6f7feee4476237a7f785693040830ed2f09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 22:34:46 +0000 Subject: [PATCH 1/2] Bump org.apache.maven.plugins:maven-plugins from 43 to 44 Bumps [org.apache.maven.plugins:maven-plugins](https://github.com/apache/maven-parent) from 43 to 44. - [Release notes](https://github.com/apache/maven-parent/releases) - [Commits](https://github.com/apache/maven-parent/commits/v44) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-plugins dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ca49d4c69..a2dc6f0a6 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ under the License. org.apache.maven.plugins maven-plugins - 43 + 44 From e726bece48a4f5867d5b187ffbc376d9349fa6ef Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Tue, 25 Mar 2025 19:32:06 +0100 Subject: [PATCH 2/2] Fix checkstyle in tests --- pom.xml | 1 + .../plugins/dependency/TestCollectMojo.java | 2 +- .../TestIncludeExcludeUnpackMojo.java | 8 ++--- ...tIncludeExcludeUnpackDependenciesMojo.java | 8 ++--- .../TestUnpackDependenciesMojo.java | 5 +-- .../TestUnpackDependenciesMojo2.java | 5 +-- .../resolvers/GoOfflineMojoTest.java | 36 +++++++++---------- 7 files changed, 34 insertions(+), 31 deletions(-) diff --git a/pom.xml b/pom.xml index a2dc6f0a6..3c6f9fb14 100644 --- a/pom.xml +++ b/pom.xml @@ -254,6 +254,7 @@ under the License. org.apache.maven.plugin-tools maven-plugin-annotations + ${version.maven-plugin-tools} provided diff --git a/src/test/java/org/apache/maven/plugins/dependency/TestCollectMojo.java b/src/test/java/org/apache/maven/plugins/dependency/TestCollectMojo.java index 9e86c813a..71fb6a03c 100644 --- a/src/test/java/org/apache/maven/plugins/dependency/TestCollectMojo.java +++ b/src/test/java/org/apache/maven/plugins/dependency/TestCollectMojo.java @@ -74,7 +74,7 @@ public void testCollectTestEnvironment() throws Exception { * * @throws Exception if a problem occurs */ - public void testCollectTestEnvironment_excludeTransitive() throws Exception { + public void testCollectTestEnvironmentExcludeTransitive() throws Exception { File testPom = new File(getBasedir(), "target/test-classes/unit/collect-test/plugin-config.xml"); CollectDependenciesMojo mojo = (CollectDependenciesMojo) lookupMojo("collect", testPom); diff --git a/src/test/java/org/apache/maven/plugins/dependency/fromConfiguration/TestIncludeExcludeUnpackMojo.java b/src/test/java/org/apache/maven/plugins/dependency/fromConfiguration/TestIncludeExcludeUnpackMojo.java index 02c3644c8..c930cda29 100644 --- a/src/test/java/org/apache/maven/plugins/dependency/fromConfiguration/TestIncludeExcludeUnpackMojo.java +++ b/src/test/java/org/apache/maven/plugins/dependency/fromConfiguration/TestIncludeExcludeUnpackMojo.java @@ -33,13 +33,13 @@ import org.apache.maven.project.MavenProject; public class TestIncludeExcludeUnpackMojo extends AbstractDependencyMojoTestCase { - private final String PACKED_FILE = "test.zip"; + private static final String PACKED_FILE = "test.zip"; - private final String UNPACKED_FILE_PREFIX = "test"; + private static final String UNPACKED_FILE_PREFIX = "test"; - private final String UNPACKED_FILE_SUFFIX = ".txt"; + private static final String UNPACKED_FILE_SUFFIX = ".txt"; - private final String PACKED_FILE_PATH = "target/test-classes/unit/unpack-dependencies-test/" + PACKED_FILE; + private static final String PACKED_FILE_PATH = "target/test-classes/unit/unpack-dependencies-test/" + PACKED_FILE; private UnpackMojo mojo; diff --git a/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestIncludeExcludeUnpackDependenciesMojo.java b/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestIncludeExcludeUnpackDependenciesMojo.java index 0617b8755..e59b042e9 100644 --- a/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestIncludeExcludeUnpackDependenciesMojo.java +++ b/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestIncludeExcludeUnpackDependenciesMojo.java @@ -28,13 +28,13 @@ import org.apache.maven.project.MavenProject; public class TestIncludeExcludeUnpackDependenciesMojo extends AbstractDependencyMojoTestCase { - private final String PACKED_FILE = "test.zip"; + private static final String PACKED_FILE = "test.zip"; - private final String UNPACKED_FILE_PREFIX = "test"; + private static final String UNPACKED_FILE_PREFIX = "test"; - private final String UNPACKED_FILE_SUFFIX = ".txt"; + private static final String UNPACKED_FILE_SUFFIX = ".txt"; - private final String PACKED_FILE_PATH = "target/test-classes/unit/unpack-dependencies-test/" + PACKED_FILE; + private static final String PACKED_FILE_PATH = "target/test-classes/unit/unpack-dependencies-test/" + PACKED_FILE; private UnpackDependenciesMojo mojo; diff --git a/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestUnpackDependenciesMojo.java b/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestUnpackDependenciesMojo.java index 9c913e2ae..1ad120f46 100644 --- a/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestUnpackDependenciesMojo.java +++ b/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestUnpackDependenciesMojo.java @@ -43,9 +43,10 @@ public class TestUnpackDependenciesMojo extends AbstractDependencyMojoTestCase { - private final String UNPACKABLE_FILE = "test.txt"; + private static final String UNPACKABLE_FILE = "test.txt"; - private final String UNPACKABLE_FILE_PATH = "target/test-classes/unit/unpack-dependencies-test/" + UNPACKABLE_FILE; + private static final String UNPACKABLE_FILE_PATH = + "target/test-classes/unit/unpack-dependencies-test/" + UNPACKABLE_FILE; UnpackDependenciesMojo mojo; diff --git a/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestUnpackDependenciesMojo2.java b/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestUnpackDependenciesMojo2.java index 27e43c9fc..85d85e117 100644 --- a/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestUnpackDependenciesMojo2.java +++ b/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestUnpackDependenciesMojo2.java @@ -36,9 +36,10 @@ public class TestUnpackDependenciesMojo2 extends AbstractDependencyMojoTestCase { - private final String UNPACKABLE_FILE = "test.txt"; + private static final String UNPACKABLE_FILE = "test.txt"; - private final String UNPACKABLE_FILE_PATH = "target/test-classes/unit/unpack-dependencies-test/" + UNPACKABLE_FILE; + private static final String UNPACKABLE_FILE_PATH = + "target/test-classes/unit/unpack-dependencies-test/" + UNPACKABLE_FILE; private UnpackDependenciesMojo mojo; diff --git a/src/test/java/org/apache/maven/plugins/dependency/resolvers/GoOfflineMojoTest.java b/src/test/java/org/apache/maven/plugins/dependency/resolvers/GoOfflineMojoTest.java index caa00f160..af3938585 100644 --- a/src/test/java/org/apache/maven/plugins/dependency/resolvers/GoOfflineMojoTest.java +++ b/src/test/java/org/apache/maven/plugins/dependency/resolvers/GoOfflineMojoTest.java @@ -44,19 +44,19 @@ protected void setUp() throws Exception { getContainer().addComponent(session, MavenSession.class.getName()); } - String GROUP_EXCLUDE_PREFIX = "skip.this.groupid"; + private static final String GROUP_EXCLUDE_PREFIX = "skip.this.groupid"; - String ARTIFACT_EXCLUDE_PREFIX = "skip-this-artifact"; + private static final String ARTIFACT_EXCLUDE_PREFIX = "skip-this-artifact"; - String CLASSIFIER_EXCLUDE_PREFIX = "skipThisClassifier"; + private static final String CLASSIFIER_EXCLUDE_PREFIX = "skipThisClassifier"; - String DUMMY_ARTIFACT_NAME = "dummy-artifact"; + private static final String DUMMY_ARTIFACT_NAME = "dummy-artifact"; - String STUB_ARTIFACT_VERSION = "3.14"; + private static final String STUB_ARTIFACT_VERSION = "3.14"; - String VALID_GROUP = "org.junit.jupiter"; + private static final String VALID_GROUP = "org.junit.jupiter"; - public void test_excludeGroupIds() throws Exception { + public void testExcludeGroupIds() throws Exception { File testPom = new File(getBasedir(), "target/test-classes/unit/go-offline-test/exclude-plugin-config.xml"); subject = (GoOfflineMojo) lookupMojo("go-offline", testPom); @@ -91,7 +91,7 @@ public void test_excludeGroupIds() throws Exception { assertFalse(artifacts.contains(artifact2)); } - public void test_excludeArtifactIds() throws Exception { + public void testExcludeArtifactIds() throws Exception { File testPom = new File(getBasedir(), "target/test-classes/unit/go-offline-test/exclude-plugin-config.xml"); subject = (GoOfflineMojo) lookupMojo("go-offline", testPom); @@ -126,7 +126,7 @@ public void test_excludeArtifactIds() throws Exception { assertFalse(artifacts.contains(artifact2)); } - public void test_excludeScope() throws Exception { + public void testExcludeScope() throws Exception { File testPom = new File(getBasedir(), "target/test-classes/unit/go-offline-test/exclude-plugin-config.xml"); subject = (GoOfflineMojo) lookupMojo("go-offline", testPom); @@ -162,7 +162,7 @@ public void test_excludeScope() throws Exception { assertFalse(artifacts.contains(artifact2)); } - public void test_excludeTypes() throws Exception { + public void testExcludeTypes() throws Exception { File testPom = new File(getBasedir(), "target/test-classes/unit/go-offline-test/exclude-plugin-config.xml"); subject = (GoOfflineMojo) lookupMojo("go-offline", testPom); @@ -208,7 +208,7 @@ public void test_excludeTypes() throws Exception { * @throws Exception */ @Disabled("Requires update to maven-plugin-test-harness to support this test") - public void xtest_excludeClassifiers() throws Exception { + public void xtestExcludeClassifiers() throws Exception { File testPom = new File(getBasedir(), "target/test-classes/unit/go-offline-test/exclude-plugin-config.xml"); subject = (GoOfflineMojo) lookupMojo("go-offline", testPom); @@ -245,13 +245,13 @@ public void xtest_excludeClassifiers() throws Exception { assertTrue(artifacts.contains(artifact3)); } - String GROUP_INCLUDE_PREFIX = "include.this.groupid"; + private static final String GROUP_INCLUDE_PREFIX = "include.this.groupid"; - String ARTIFACT_INCLUDE_PREFIX = "include-this-artifact"; + private static final String ARTIFACT_INCLUDE_PREFIX = "include-this-artifact"; - String CLASSIFIER_INCLUDE_PREFIX = "includeThisClassifier"; + private static final String CLASSIFIER_INCLUDE_PREFIX = "includeThisClassifier"; - public void test_includeGroupIds() throws Exception { + public void testIncludeGroupIds() throws Exception { File testPom = new File(getBasedir(), "target/test-classes/unit/go-offline-test/include-gid-plugin-config.xml"); subject = (GoOfflineMojo) lookupMojo("go-offline", testPom); @@ -287,7 +287,7 @@ public void test_includeGroupIds() throws Exception { assertTrue(artifacts.contains(artifact2)); } - public void test_includeArtifactIds() throws Exception { + public void testIncludeArtifactIds() throws Exception { File testPom = new File(getBasedir(), "target/test-classes/unit/go-offline-test/include-aid-plugin-config.xml"); subject = (GoOfflineMojo) lookupMojo("go-offline", testPom); @@ -323,7 +323,7 @@ public void test_includeArtifactIds() throws Exception { assertTrue(artifacts.contains(artifact2)); } - public void test_includeScope() throws Exception { + public void testIncludeScope() throws Exception { File testPom = new File(getBasedir(), "target/test-classes/unit/go-offline-test/include-scope-plugin-config.xml"); @@ -363,7 +363,7 @@ public void test_includeScope() throws Exception { assertFalse(artifacts.contains(artifact3)); } - public void test_includeTypes() throws Exception { + public void testIncludeTypes() throws Exception { File testPom = new File(getBasedir(), "target/test-classes/unit/go-offline-test/include-types-plugin-config.xml");