This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch jdk25
in repository https://gitbox.apache.org/repos/asf/maven-jarsigner-plugin.git

commit a71c121da0ff70d0af18b866a5a2739facf5cb70
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Sun Nov 16 00:34:31 2025 +0100

    Bump parent pom to 45
---
 pom.xml                                             |  5 ++++-
 .../jarsigner/JarsignerSignMojoParallelTest.java    | 10 ++++++++--
 .../jarsigner/JarsignerSignMojoRetryTest.java       | 21 +++++++++++----------
 .../plugins/jarsigner/JarsignerSignMojoTest.java    |  6 +++++-
 .../plugins/jarsigner/JarsignerSignMojoTsaTest.java |  2 +-
 .../plugins/jarsigner/JarsignerVerifyMojoTest.java  |  5 ++++-
 .../maven/plugins/jarsigner/TsaSelectorTest.java    |  3 ++-
 7 files changed, 35 insertions(+), 17 deletions(-)

diff --git a/pom.xml b/pom.xml
index 3b8aace..09543af 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-plugins</artifactId>
-    <version>43</version>
+    <version>45</version>
     <relativePath />
   </parent>
 
@@ -72,6 +72,8 @@ under the License.
     <mavenVersion>3.6.3</mavenVersion>
     <jacocoVersion>0.8.14</jacocoVersion>
     
<project.build.outputTimestamp>2024-09-03T16:36:13Z</project.build.outputTimestamp>
+
+    <version.maven-invoker-plugin>3.9.1</version.maven-invoker-plugin>
   </properties>
 
   <dependencies>
@@ -102,6 +104,7 @@ under the License.
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-annotations</artifactId>
+      <version>${version.maven-plugin-tools}</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
diff --git 
a/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojoParallelTest.java
 
b/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojoParallelTest.java
index 47aff1c..130156b 100644
--- 
a/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojoParallelTest.java
+++ 
b/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojoParallelTest.java
@@ -46,11 +46,17 @@ import static 
org.apache.maven.plugins.jarsigner.TestJavaToolResults.RESULT_ERRO
 import static org.apache.maven.plugins.jarsigner.TestJavaToolResults.RESULT_OK;
 import static org.hamcrest.CoreMatchers.containsString;
 import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertThrows;
+import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.contains;
 import static org.mockito.ArgumentMatchers.isA;
-import static org.mockito.Mockito.*;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.timeout;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 public class JarsignerSignMojoParallelTest {
     @Rule
diff --git 
a/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojoRetryTest.java
 
b/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojoRetryTest.java
index feba11c..80b54ec 100644
--- 
a/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojoRetryTest.java
+++ 
b/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojoRetryTest.java
@@ -45,7 +45,8 @@ import static 
org.apache.maven.plugins.jarsigner.TestJavaToolResults.RESULT_OK;
 import static org.hamcrest.CoreMatchers.containsString;
 import static org.hamcrest.CoreMatchers.not;
 import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThrows;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.contains;
 import static org.mockito.Mockito.argThat;
@@ -143,7 +144,7 @@ public class JarsignerSignMojoRetryTest {
     }
 
     @Test
-    public void testInvalidMaxTries_zero() throws Exception {
+    public void testInvalidMaxTriesZero() throws Exception {
         
when(jarSigner.execute(any(JarSignerSignRequest.class))).thenReturn(RESULT_ERROR);
 
         configuration.put("maxTries", "0"); // Setting an "invalid" value
@@ -161,7 +162,7 @@ public class JarsignerSignMojoRetryTest {
     }
 
     @Test
-    public void testInvalidMaxTries_negative() throws Exception {
+    public void testInvalidMaxTriesNegative() throws Exception {
         // Make result ok, to make this test check more things (compared to 
testInvalidMaxTries_zero())
         
when(jarSigner.execute(any(JarSignerSignRequest.class))).thenReturn(RESULT_OK);
 
@@ -195,7 +196,7 @@ public class JarsignerSignMojoRetryTest {
     }
 
     @Test
-    public void testInvalidMaxRetryDelaySeconds_negative() throws Exception {
+    public void testInvalidMaxRetryDelaySecondsNegative() throws Exception {
         when(jarSigner.execute(any(JarSignerSignRequest.class)))
                 .thenReturn(RESULT_ERROR)
                 .thenReturn(RESULT_OK);
@@ -217,16 +218,16 @@ public class JarsignerSignMojoRetryTest {
     public void testDefaultWaitStrategy() throws Exception {
         JarsignerSignMojo mojo = mojoTestCreator.configure(configuration);
 
-        long NO_SLEEP_VALUE = 42_001;
+        long noSleepValue = 42_001;
         // Storage of the most recent sleep value
-        AtomicLong sleepValue = new AtomicLong(NO_SLEEP_VALUE);
+        AtomicLong sleepValue = new AtomicLong(noSleepValue);
         Sleeper sleeper = value -> sleepValue.set(value);
 
         mojo.waitAfterFailure(0, Duration.ofSeconds(0), sleeper);
-        assertEquals(NO_SLEEP_VALUE, sleepValue.get());
+        assertEquals(noSleepValue, sleepValue.get());
 
         mojo.waitAfterFailure(1, Duration.ofSeconds(0), sleeper);
-        assertEquals(NO_SLEEP_VALUE, sleepValue.get());
+        assertEquals(noSleepValue, sleepValue.get());
 
         mojo.waitAfterFailure(0, Duration.ofSeconds(1), sleeper);
         assertEquals(1000, sleepValue.get());
@@ -243,10 +244,10 @@ public class JarsignerSignMojoRetryTest {
         mojo.waitAfterFailure(Integer.MAX_VALUE, Duration.ofSeconds(100), 
sleeper);
         assertEquals(100_000, sleepValue.get());
 
-        sleepValue.set(NO_SLEEP_VALUE); // "reset" sleep value
+        sleepValue.set(noSleepValue); // "reset" sleep value
         mojo.waitAfterFailure(Integer.MIN_VALUE, Duration.ofSeconds(100), 
sleeper);
         // Make sure sleep has not been invoked, should be the "reset" value
-        assertEquals(NO_SLEEP_VALUE, sleepValue.get());
+        assertEquals(noSleepValue, sleepValue.get());
 
         // Testing the attempt limit used in exponential function. Will return 
a odd value (2^20).
         mojo.waitAfterFailure(10000, Duration.ofDays(356), sleeper);
diff --git 
a/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojoTest.java 
b/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojoTest.java
index 0c62e11..beb96ab 100644
--- 
a/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojoTest.java
+++ 
b/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojoTest.java
@@ -51,7 +51,11 @@ import static org.hamcrest.CoreMatchers.hasItem;
 import static org.hamcrest.CoreMatchers.not;
 import static org.hamcrest.CoreMatchers.startsWith;
 import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertThrows;
+import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.contains;
 import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.mock;
diff --git 
a/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojoTsaTest.java
 
b/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojoTsaTest.java
index 80a0ced..df7fdba 100644
--- 
a/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojoTsaTest.java
+++ 
b/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojoTsaTest.java
@@ -42,7 +42,7 @@ import static 
org.apache.maven.plugins.jarsigner.TestJavaToolResults.RESULT_ERRO
 import static org.apache.maven.plugins.jarsigner.TestJavaToolResults.RESULT_OK;
 import static org.hamcrest.CoreMatchers.everyItem;
 import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.contains;
 import static org.mockito.Mockito.mock;
diff --git 
a/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerVerifyMojoTest.java 
b/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerVerifyMojoTest.java
index dc5fa3a..eb79d31 100644
--- 
a/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerVerifyMojoTest.java
+++ 
b/src/test/java/org/apache/maven/plugins/jarsigner/JarsignerVerifyMojoTest.java
@@ -40,7 +40,10 @@ import static 
org.apache.maven.plugins.jarsigner.TestJavaToolResults.RESULT_OK;
 import static org.hamcrest.CoreMatchers.containsString;
 import static org.hamcrest.CoreMatchers.startsWith;
 import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertThrows;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.argThat;
 import static org.mockito.Mockito.mock;
diff --git 
a/src/test/java/org/apache/maven/plugins/jarsigner/TsaSelectorTest.java 
b/src/test/java/org/apache/maven/plugins/jarsigner/TsaSelectorTest.java
index f224f76..b1fb5f7 100644
--- a/src/test/java/org/apache/maven/plugins/jarsigner/TsaSelectorTest.java
+++ b/src/test/java/org/apache/maven/plugins/jarsigner/TsaSelectorTest.java
@@ -28,7 +28,8 @@ import java.util.concurrent.atomic.AtomicReference;
 import org.apache.maven.plugins.jarsigner.TsaSelector.TsaServer;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
 
 public class TsaSelectorTest {
     private static final String[] EMPTY = new String[0];

Reply via email to