From de9198b477bdaa48f733798fc825dee74981777b Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Sun, 20 Sep 2026 12:23:12 +0200 Subject: [PATCH 1/2] Rename the BeanShell IT scripts ahead of porting them --- src/it/multi-module/{verify.bsh => verify.groovy} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/it/multi-module/{verify.bsh => verify.groovy} (100%) diff --git a/src/it/multi-module/verify.bsh b/src/it/multi-module/verify.groovy similarity index 100% rename from src/it/multi-module/verify.bsh rename to src/it/multi-module/verify.groovy From e7d2c8c9080cc425c49800ad813f1066e8007b37 Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Sun, 20 Sep 2026 12:30:26 +0200 Subject: [PATCH 2/2] Port the IT scripts from BeanShell to Groovy BeanShell is being retired across Maven (apache/maven#13207); the scripts keep the same checks. --- src/it/multi-module/verify.groovy | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/it/multi-module/verify.groovy b/src/it/multi-module/verify.groovy index 16e644d5..6bce67da 100644 --- a/src/it/multi-module/verify.groovy +++ b/src/it/multi-module/verify.groovy @@ -17,19 +17,20 @@ * under the License. */ +import groovy.transform.Field + import org.codehaus.plexus.util.FileUtils; import java.io.*; import java.util.*; -String[] modules = { "mod-1", "mod-2", "mod-3" }; -String[] paths = -{ +String[] modules = [ "mod-1", "mod-2", "mod-3" ] as String[]; +@Field String[] paths = [ "target/site/pmd.html", "target/site/cpd.html", "target/pmd.xml", "target/cpd.xml", -}; +] as String[]; // files must exist in every module for ( String module : modules ) @@ -83,7 +84,7 @@ void checkEncoding( String module, String encoding ) continue; } File file = new File( basedir, module + '/' + path ); - content = FileUtils.fileRead( file, encoding ); + String content = FileUtils.fileRead( file, encoding ); if ( !content.startsWith( "" ) ) { throw new IOException( "wrong XML encoding declaration for " + file );