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-reporting-exec.git

commit 409de98af19504b7557689e9bd5f9591fcd191e0
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Wed Nov 25 23:10:32 2026 +0000

    Modernize Groovy IT scripts
    
    See https://github.com/apache/maven-invoker-plugin/issues/811.
---
 src/it/different-doxia-versions/verify.groovy | 44 +++++----------------------
 1 file changed, 7 insertions(+), 37 deletions(-)

diff --git a/src/it/different-doxia-versions/verify.groovy 
b/src/it/different-doxia-versions/verify.groovy
index 738a3b8..176e130 100644
--- a/src/it/different-doxia-versions/verify.groovy
+++ b/src/it/different-doxia-versions/verify.groovy
@@ -18,42 +18,12 @@
  * under the License.
  */
 
-import java.io.*;
-import java.util.*;
-import java.util.jar.*;
-import org.codehaus.plexus.util.*;
+File report = new File( basedir, "target/site/changes.html" );
+assert report.exists() && !report.isDirectory() : "report file is missing or a 
directory."
+String reportContent = report.getText( 'UTF-8' );
 
-boolean result = true;
+int indexOf = reportContent.indexOf( "Changes" );
+assert indexOf >= 0 : "changes.html doesn't contains Changes Report title"
 
-try
-{
-    File report = new File( basedir, "target/site/changes.html" );
-    if ( !report.exists() || report.isDirectory() )
-    {
-        System.err.println( "report file is missing or a directory." );
-        return false;
-    }
-    String reportContent = FileUtils.fileRead( report );
-
-    int indexOf = reportContent.indexOf( "Changes" );
-    if ( indexOf < 0 )
-    {
-      System.err.println( "changes.html doesn't contains Changes Report title" 
);
-      return false;
-    }
-
-    indexOf = reportContent.indexOf( "href=\"http://localhost/MCHANGES-88\""; );
-    if ( indexOf < 0 )
-    {
-      System.err.println( "changes.html doesn't contains jira issue link" );
-      return false;
-    }
-
-}
-catch ( Throwable e )
-{
-    e.printStackTrace();
-    result = false;
-}
-
-return result;
+indexOf = reportContent.indexOf( "href=\"http://localhost/MCHANGES-88\""; );
+assert indexOf >= 0 : "changes.html doesn't contains jira issue link"

Reply via email to