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

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


The following commit(s) were added to refs/heads/master by this push:
     new 9a25f7b  Format Groovy IT scripts
9a25f7b is described below

commit 9a25f7b0534273c0263c9f2320a6882eb3ca866e
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Wed Nov 25 20:34:41 2026 +0000

    Format Groovy IT scripts
    
    Formatting only: the CONVERSION-phase AST of every file is unchanged. See 
https://github.com/apache/maven-invoker-plugin/issues/811.
---
 src/it/archive-dir/verify.groovy          | 62 ++++++++++++++-----------------
 src/it/attachment-selection/verify.groovy | 33 ++++++++--------
 src/it/basic/verify.groovy                | 62 ++++++++++++++-----------------
 src/it/spacy path/verify.groovy           | 35 ++++++++---------
 src/it/type-detection/verify.groovy       | 60 ++++++++++++++----------------
 src/it/unsign/verify.groovy               | 56 +++++++++++++---------------
 6 files changed, 139 insertions(+), 169 deletions(-)

diff --git a/src/it/archive-dir/verify.groovy b/src/it/archive-dir/verify.groovy
index fc6aa6b..a4e7970 100644
--- a/src/it/archive-dir/verify.groovy
+++ b/src/it/archive-dir/verify.groovy
@@ -17,49 +17,43 @@
  * under the License.
  */
 
-import java.io.*;
-import java.util.jar.*;
+import java.io.*
+import java.util.jar.*
 
-File jarDir = new File( basedir, "target/classes/jars" );
+File jarDir = new File(basedir, "target/classes/jars")
 
-File includedJarFile = new File( jarDir, "included.jar" );
-System.out.println( "Checking for existence of " + includedJarFile );
-if ( !includedJarFile.isFile() )
-{
-    throw new Exception( "missing " + includedJarFile );
+File includedJarFile = new File(jarDir, "included.jar")
+System.out.println("Checking for existence of " + includedJarFile)
+if (!includedJarFile.isFile()) {
+    throw new Exception("missing " + includedJarFile)
 }
 
-JarFile includedJar = new JarFile( includedJarFile );
-System.out.println( "Checking for existence of " + includedJarFile.getName() + 
"!/META-INF/TESTING.SF" );
-if ( includedJar.getEntry( "META-INF/TESTING.SF" ) == null )
-{
-    throw new Exception( "missing " + includedJarFile.getName() + 
"!/META-INF/TESTING.SF" );
+JarFile includedJar = new JarFile(includedJarFile)
+System.out.println("Checking for existence of " + includedJarFile.getName() + 
"!/META-INF/TESTING.SF")
+if (includedJar.getEntry("META-INF/TESTING.SF") == null) {
+    throw new Exception("missing " + includedJarFile.getName() + 
"!/META-INF/TESTING.SF")
 }
-System.out.println( "Checking for existence of " + includedJarFile.getName() + 
"!/META-INF/TESTING.DSA" );
-if ( includedJar.getEntry( "META-INF/TESTING.DSA" ) == null )
-{
-    throw new Exception( "missing " + includedJarFile.getName() + 
"!/META-INF/TESTING.DSA" );
+System.out.println("Checking for existence of " + includedJarFile.getName() + 
"!/META-INF/TESTING.DSA")
+if (includedJar.getEntry("META-INF/TESTING.DSA") == null) {
+    throw new Exception("missing " + includedJarFile.getName() + 
"!/META-INF/TESTING.DSA")
 }
-includedJar.close();
+includedJar.close()
 
-File excludedJarFile = new File( jarDir, "excluded.jar" );
-System.out.println( "Checking for existence of " + excludedJarFile );
-if ( !excludedJarFile.isFile() )
-{
-    throw new Exception( "missing " + excludedJarFile );
+File excludedJarFile = new File(jarDir, "excluded.jar")
+System.out.println("Checking for existence of " + excludedJarFile)
+if (!excludedJarFile.isFile()) {
+    throw new Exception("missing " + excludedJarFile)
 }
 
-JarFile excludedJar = new JarFile( excludedJarFile );
-System.out.println( "Checking for absence of " + excludedJarFile.getName() + 
"!/META-INF/TESTING.SF" );
-if ( excludedJar.getEntry( "META-INF/TESTING.SF" ) != null )
-{
-    throw new Exception( "present " + excludedJarFile.getName() + 
"!/META-INF/TESTING.SF" );
+JarFile excludedJar = new JarFile(excludedJarFile)
+System.out.println("Checking for absence of " + excludedJarFile.getName() + 
"!/META-INF/TESTING.SF")
+if (excludedJar.getEntry("META-INF/TESTING.SF") != null) {
+    throw new Exception("present " + excludedJarFile.getName() + 
"!/META-INF/TESTING.SF")
 }
-System.out.println( "Checking for absence of " + excludedJarFile.getName() + 
"!/META-INF/TESTING.DSA" );
-if ( excludedJar.getEntry( "META-INF/TESTING.DSA" ) != null )
-{
-    throw new Exception( "present " + excludedJarFile.getName() + 
"!/META-INF/TESTING.DSA" );
+System.out.println("Checking for absence of " + excludedJarFile.getName() + 
"!/META-INF/TESTING.DSA")
+if (excludedJar.getEntry("META-INF/TESTING.DSA") != null) {
+    throw new Exception("present " + excludedJarFile.getName() + 
"!/META-INF/TESTING.DSA")
 }
-excludedJar.close();
+excludedJar.close()
 
-return true;
+return true
diff --git a/src/it/attachment-selection/verify.groovy 
b/src/it/attachment-selection/verify.groovy
index 55b66f2..2e5a27d 100644
--- a/src/it/attachment-selection/verify.groovy
+++ b/src/it/attachment-selection/verify.groovy
@@ -17,27 +17,24 @@
  * under the License.
  */
 
-import java.io.*;
-import java.util.zip.*;
+import java.io.*
+import java.util.zip.*
 
-File attachedJarFile = new File( basedir, "excluded.jar" );
-System.out.println( "Checking for existence of " + attachedJarFile );
-if ( !attachedJarFile.isFile() )
-{
-    throw new Exception( "missing " + attachedJarFile );
+File attachedJarFile = new File(basedir, "excluded.jar")
+System.out.println("Checking for existence of " + attachedJarFile)
+if (!attachedJarFile.isFile()) {
+    throw new Exception("missing " + attachedJarFile)
 }
 
-ZipFile attachedJar = new ZipFile( attachedJarFile );
-System.out.println( "Checking for absence of " + attachedJarFile.getName() + 
"!/META-INF/TESTING.SF" );
-if ( attachedJar.getEntry( "META-INF/TESTING.SF" ) != null )
-{
-    throw new Exception( "present " + attachedJarFile.getName() + 
"!/META-INF/TESTING.SF" );
+ZipFile attachedJar = new ZipFile(attachedJarFile)
+System.out.println("Checking for absence of " + attachedJarFile.getName() + 
"!/META-INF/TESTING.SF")
+if (attachedJar.getEntry("META-INF/TESTING.SF") != null) {
+    throw new Exception("present " + attachedJarFile.getName() + 
"!/META-INF/TESTING.SF")
 }
-System.out.println( "Checking for absence of " + attachedJarFile.getName() + 
"!/META-INF/TESTING.DSA" );
-if ( attachedJar.getEntry( "META-INF/TESTING.DSA" ) != null )
-{
-    throw new Exception( "present " + attachedJarFile.getName() + 
"!/META-INF/TESTING.DSA" );
+System.out.println("Checking for absence of " + attachedJarFile.getName() + 
"!/META-INF/TESTING.DSA")
+if (attachedJar.getEntry("META-INF/TESTING.DSA") != null) {
+    throw new Exception("present " + attachedJarFile.getName() + 
"!/META-INF/TESTING.DSA")
 }
-attachedJar.close();
+attachedJar.close()
 
-return true;
+return true
diff --git a/src/it/basic/verify.groovy b/src/it/basic/verify.groovy
index f1a989e..8bad3c4 100644
--- a/src/it/basic/verify.groovy
+++ b/src/it/basic/verify.groovy
@@ -17,49 +17,43 @@
  * under the License.
  */
 
-import java.io.*;
-import java.util.jar.*;
+import java.io.*
+import java.util.jar.*
 
-File targetDir = new File( basedir, "target" );
+File targetDir = new File(basedir, "target")
 
-File mainJarFile = new File( targetDir, "test-1.0.jar" );
-System.out.println( "Checking for existence of " + mainJarFile );
-if ( !mainJarFile.isFile() )
-{
-    throw new Exception( "missing " + mainJarFile );
+File mainJarFile = new File(targetDir, "test-1.0.jar")
+System.out.println("Checking for existence of " + mainJarFile)
+if (!mainJarFile.isFile()) {
+    throw new Exception("missing " + mainJarFile)
 }
 
-JarFile mainJar = new JarFile( mainJarFile );
-System.out.println( "Checking for existence of " + mainJarFile.getName() + 
"!/META-INF/TESTING.SF" );
-if ( mainJar.getEntry( "META-INF/TESTING.SF" ) == null )
-{
-    throw new Exception( "missing " + mainJarFile.getName() + 
"!/META-INF/TESTING.SF" );
+JarFile mainJar = new JarFile(mainJarFile)
+System.out.println("Checking for existence of " + mainJarFile.getName() + 
"!/META-INF/TESTING.SF")
+if (mainJar.getEntry("META-INF/TESTING.SF") == null) {
+    throw new Exception("missing " + mainJarFile.getName() + 
"!/META-INF/TESTING.SF")
 }
-System.out.println( "Checking for existence of " + mainJarFile.getName() + 
"!/META-INF/TESTING.DSA" );
-if ( mainJar.getEntry( "META-INF/TESTING.DSA" ) == null )
-{
-    throw new Exception( "missing " + mainJarFile.getName() + 
"!/META-INF/TESTING.DSA" );
+System.out.println("Checking for existence of " + mainJarFile.getName() + 
"!/META-INF/TESTING.DSA")
+if (mainJar.getEntry("META-INF/TESTING.DSA") == null) {
+    throw new Exception("missing " + mainJarFile.getName() + 
"!/META-INF/TESTING.DSA")
 }
-mainJar.close();
+mainJar.close()
 
-File attachedJarFile = new File( targetDir, "test-1.0-sources.jar" );
-System.out.println( "Checking for existence of " + attachedJarFile );
-if ( !attachedJarFile.isFile() )
-{
-    throw new Exception( "missing " + attachedJarFile );
+File attachedJarFile = new File(targetDir, "test-1.0-sources.jar")
+System.out.println("Checking for existence of " + attachedJarFile)
+if (!attachedJarFile.isFile()) {
+    throw new Exception("missing " + attachedJarFile)
 }
 
-JarFile attachedJar = new JarFile( attachedJarFile );
-System.out.println( "Checking for existence of " + attachedJarFile.getName() + 
"!/META-INF/TESTING.SF" );
-if ( attachedJar.getEntry( "META-INF/TESTING.SF" ) == null )
-{
-    throw new Exception( "missing " + attachedJarFile.getName() + 
"!/META-INF/TESTING.SF" );
+JarFile attachedJar = new JarFile(attachedJarFile)
+System.out.println("Checking for existence of " + attachedJarFile.getName() + 
"!/META-INF/TESTING.SF")
+if (attachedJar.getEntry("META-INF/TESTING.SF") == null) {
+    throw new Exception("missing " + attachedJarFile.getName() + 
"!/META-INF/TESTING.SF")
 }
-System.out.println( "Checking for existence of " + attachedJarFile.getName() + 
"!/META-INF/TESTING.DSA" );
-if ( attachedJar.getEntry( "META-INF/TESTING.DSA" ) == null )
-{
-    throw new Exception( "missing " + attachedJarFile.getName() + 
"!/META-INF/TESTING.DSA" );
+System.out.println("Checking for existence of " + attachedJarFile.getName() + 
"!/META-INF/TESTING.DSA")
+if (attachedJar.getEntry("META-INF/TESTING.DSA") == null) {
+    throw new Exception("missing " + attachedJarFile.getName() + 
"!/META-INF/TESTING.DSA")
 }
-attachedJar.close();
+attachedJar.close()
 
-return true;
+return true
diff --git a/src/it/spacy path/verify.groovy b/src/it/spacy path/verify.groovy
index 7086ab5..8701170 100644
--- a/src/it/spacy path/verify.groovy   
+++ b/src/it/spacy path/verify.groovy   
@@ -17,29 +17,26 @@
  * under the License.
  */
 
-import java.io.*;
-import java.util.jar.*;
+import java.io.*
+import java.util.jar.*
 
-File targetDir = new File( basedir, "target" );
+File targetDir = new File(basedir, "target")
 
-File mainJarFile = new File( targetDir, "test-1.0.jar" );
-System.out.println( "Checking for existence of " + mainJarFile );
-if ( !mainJarFile.isFile() )
-{
-    throw new Exception( "missing " + mainJarFile );
+File mainJarFile = new File(targetDir, "test-1.0.jar")
+System.out.println("Checking for existence of " + mainJarFile)
+if (!mainJarFile.isFile()) {
+    throw new Exception("missing " + mainJarFile)
 }
 
-JarFile mainJar = new JarFile( mainJarFile );
-System.out.println( "Checking for existence of " + mainJarFile.getName() + 
"!/META-INF/TESTING.SF" );
-if ( mainJar.getEntry( "META-INF/TESTING.SF" ) == null )
-{
-    throw new Exception( "missing " + mainJarFile.getName() + 
"!/META-INF/TESTING.SF" );
+JarFile mainJar = new JarFile(mainJarFile)
+System.out.println("Checking for existence of " + mainJarFile.getName() + 
"!/META-INF/TESTING.SF")
+if (mainJar.getEntry("META-INF/TESTING.SF") == null) {
+    throw new Exception("missing " + mainJarFile.getName() + 
"!/META-INF/TESTING.SF")
 }
-System.out.println( "Checking for existence of " + mainJarFile.getName() + 
"!/META-INF/TESTING.DSA" );
-if ( mainJar.getEntry( "META-INF/TESTING.DSA" ) == null )
-{
-    throw new Exception( "missing " + mainJarFile.getName() + 
"!/META-INF/TESTING.DSA" );
+System.out.println("Checking for existence of " + mainJarFile.getName() + 
"!/META-INF/TESTING.DSA")
+if (mainJar.getEntry("META-INF/TESTING.DSA") == null) {
+    throw new Exception("missing " + mainJarFile.getName() + 
"!/META-INF/TESTING.DSA")
 }
-mainJar.close();
+mainJar.close()
 
-return true;
+return true
diff --git a/src/it/type-detection/verify.groovy 
b/src/it/type-detection/verify.groovy
index 1963b77..ca95202 100644
--- a/src/it/type-detection/verify.groovy
+++ b/src/it/type-detection/verify.groovy
@@ -17,47 +17,41 @@
  * under the License.
  */
 
-import java.io.*;
-import java.util.zip.*;
+import java.io.*
+import java.util.zip.*
 
-File attachedJarFile = new File( basedir, "jar-with-unusual.ext" );
-System.out.println( "Checking for existence of " + attachedJarFile );
-if ( !attachedJarFile.isFile() )
-{
-    throw new Exception( "missing " + attachedJarFile );
+File attachedJarFile = new File(basedir, "jar-with-unusual.ext")
+System.out.println("Checking for existence of " + attachedJarFile)
+if (!attachedJarFile.isFile()) {
+    throw new Exception("missing " + attachedJarFile)
 }
 
-ZipFile attachedJar = new ZipFile( attachedJarFile );
-System.out.println( "Checking for existence of " + attachedJarFile.getName() + 
"!/META-INF/TESTING.SF" );
-if ( attachedJar.getEntry( "META-INF/TESTING.SF" ) == null )
-{
-    throw new Exception( "missing " + attachedJarFile.getName() + 
"!/META-INF/TESTING.SF" );
+ZipFile attachedJar = new ZipFile(attachedJarFile)
+System.out.println("Checking for existence of " + attachedJarFile.getName() + 
"!/META-INF/TESTING.SF")
+if (attachedJar.getEntry("META-INF/TESTING.SF") == null) {
+    throw new Exception("missing " + attachedJarFile.getName() + 
"!/META-INF/TESTING.SF")
 }
-System.out.println( "Checking for existence of " + attachedJarFile.getName() + 
"!/META-INF/TESTING.DSA" );
-if ( attachedJar.getEntry( "META-INF/TESTING.DSA" ) == null )
-{
-    throw new Exception( "missing " + attachedJarFile.getName() + 
"!/META-INF/TESTING.DSA" );
+System.out.println("Checking for existence of " + attachedJarFile.getName() + 
"!/META-INF/TESTING.DSA")
+if (attachedJar.getEntry("META-INF/TESTING.DSA") == null) {
+    throw new Exception("missing " + attachedJarFile.getName() + 
"!/META-INF/TESTING.DSA")
 }
-attachedJar.close();
+attachedJar.close()
 
-File attachedZipFile = new File( basedir, "some.zip" );
-System.out.println( "Checking for existence of " + attachedZipFile );
-if ( !attachedZipFile.isFile() )
-{
-    throw new Exception( "missing " + attachedZipFile );
+File attachedZipFile = new File(basedir, "some.zip")
+System.out.println("Checking for existence of " + attachedZipFile)
+if (!attachedZipFile.isFile()) {
+    throw new Exception("missing " + attachedZipFile)
 }
 
-ZipFile attachedZip = new ZipFile( attachedZipFile );
-System.out.println( "Checking for existence of " + attachedZipFile.getName() + 
"!/META-INF/TESTING.SF" );
-if ( attachedZip.getEntry( "META-INF/TESTING.SF" ) == null )
-{
-    throw new Exception( "missing " + attachedZipFile.getName() + 
"!/META-INF/TESTING.SF" );
+ZipFile attachedZip = new ZipFile(attachedZipFile)
+System.out.println("Checking for existence of " + attachedZipFile.getName() + 
"!/META-INF/TESTING.SF")
+if (attachedZip.getEntry("META-INF/TESTING.SF") == null) {
+    throw new Exception("missing " + attachedZipFile.getName() + 
"!/META-INF/TESTING.SF")
 }
-System.out.println( "Checking for existence of " + attachedZipFile.getName() + 
"!/META-INF/TESTING.DSA" );
-if ( attachedZip.getEntry( "META-INF/TESTING.DSA" ) == null )
-{
-    throw new Exception( "missing " + attachedZipFile.getName() + 
"!/META-INF/TESTING.DSA" );
+System.out.println("Checking for existence of " + attachedZipFile.getName() + 
"!/META-INF/TESTING.DSA")
+if (attachedZip.getEntry("META-INF/TESTING.DSA") == null) {
+    throw new Exception("missing " + attachedZipFile.getName() + 
"!/META-INF/TESTING.DSA")
 }
-attachedZip.close();
+attachedZip.close()
 
-return true;
+return true
diff --git a/src/it/unsign/verify.groovy b/src/it/unsign/verify.groovy
index 0c36862..91877ff 100644
--- a/src/it/unsign/verify.groovy
+++ b/src/it/unsign/verify.groovy
@@ -17,50 +17,44 @@
  * under the License.
  */
 
-import java.io.*;
-import java.util.jar.*;
+import java.io.*
+import java.util.jar.*
 
-File targetDir = new File( basedir, "target" );
+File targetDir = new File(basedir, "target")
 
-File mainJarFile = new File( targetDir, "test-1.0.jar" );
-System.out.println( "Checking for existence of " + mainJarFile );
-if ( !mainJarFile.isFile() )
-{
-    throw new Exception( "missing " + mainJarFile );
+File mainJarFile = new File(targetDir, "test-1.0.jar")
+System.out.println("Checking for existence of " + mainJarFile)
+if (!mainJarFile.isFile()) {
+    throw new Exception("missing " + mainJarFile)
 }
 
-JarFile mainJar = new JarFile( mainJarFile );
+JarFile mainJar = new JarFile(mainJarFile)
 
-System.out.println( "Checking for existence of " + mainJarFile.getName() + 
"!/META-INF/TESTING.SF" );
-if ( mainJar.getEntry( "META-INF/TESTING.SF" ) == null )
-{
-    throw new Exception( "missing " + mainJarFile.getName() + 
"!/META-INF/TESTING.SF" );
+System.out.println("Checking for existence of " + mainJarFile.getName() + 
"!/META-INF/TESTING.SF")
+if (mainJar.getEntry("META-INF/TESTING.SF") == null) {
+    throw new Exception("missing " + mainJarFile.getName() + 
"!/META-INF/TESTING.SF")
 }
 
-System.out.println( "Checking for existence of " + mainJarFile.getName() + 
"!/META-INF/TESTING.DSA" );
-if ( mainJar.getEntry( "META-INF/TESTING.DSA" ) == null )
-{
-    throw new Exception( "missing " + mainJarFile.getName() + 
"!/META-INF/TESTING.DSA" );
+System.out.println("Checking for existence of " + mainJarFile.getName() + 
"!/META-INF/TESTING.DSA")
+if (mainJar.getEntry("META-INF/TESTING.DSA") == null) {
+    throw new Exception("missing " + mainJarFile.getName() + 
"!/META-INF/TESTING.DSA")
 }
 
-System.out.println( "Checking for absence of " + mainJarFile.getName() + 
"!/META-INF/UNSIGNED.SF" );
-if ( mainJar.getEntry( "META-INF/UNSIGNED.SF" ) != null )
-{
-    throw new Exception( "present " + mainJarFile.getName() + 
"!/META-INF/UNSIGNED.SF" );
+System.out.println("Checking for absence of " + mainJarFile.getName() + 
"!/META-INF/UNSIGNED.SF")
+if (mainJar.getEntry("META-INF/UNSIGNED.SF") != null) {
+    throw new Exception("present " + mainJarFile.getName() + 
"!/META-INF/UNSIGNED.SF")
 }
 
-System.out.println( "Checking for absence of " + mainJarFile.getName() + 
"!/META-INF/UNSIGNED.DSA" );
-if ( mainJar.getEntry( "META-INF/UNSIGNED.DSA" ) != null )
-{
-    throw new Exception( "present " + mainJarFile.getName() + 
"!/META-INF/UNSIGNED.DSA" );
+System.out.println("Checking for absence of " + mainJarFile.getName() + 
"!/META-INF/UNSIGNED.DSA")
+if (mainJar.getEntry("META-INF/UNSIGNED.DSA") != null) {
+    throw new Exception("present " + mainJarFile.getName() + 
"!/META-INF/UNSIGNED.DSA")
 }
 
-System.out.println( "Checking for absence of " + mainJarFile.getName() + 
"!/META-INF/UNSIGNED.RSA" );
-if ( mainJar.getEntry( "META-INF/UNSIGNED.RSA" ) != null )
-{
-    throw new Exception( "present " + mainJarFile.getName() + 
"!/META-INF/UNSIGNED.RSA" );
+System.out.println("Checking for absence of " + mainJarFile.getName() + 
"!/META-INF/UNSIGNED.RSA")
+if (mainJar.getEntry("META-INF/UNSIGNED.RSA") != null) {
+    throw new Exception("present " + mainJarFile.getName() + 
"!/META-INF/UNSIGNED.RSA")
 }
 
-mainJar.close();
+mainJar.close()
 
-return true;
+return true

Reply via email to