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

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

commit ccb265ed6157a04f68657b130bf7f1a727fd1e49
Author: Sylwester Lachiewicz <slachiew...@apache.org>
AuthorDate: Fri May 3 18:54:22 2024 +0200

    [MEJB-138] Update parent pom to 42 and dependencies
---
 pom.xml                                            | 23 +++++++++++-----------
 src/it/mejb-93/verify.groovy                       | 11 ++++++-----
 .../java/org/apache/maven/plugins/ejb/EjbMojo.java | 21 +++++++++-----------
 3 files changed, 26 insertions(+), 29 deletions(-)

diff --git a/pom.xml b/pom.xml
index 755bf4e..c1fe8b9 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>39</version>
+    <version>42</version>
     <relativePath />
   </parent>
 
@@ -50,7 +50,7 @@ under the License.
   </issueManagement>
   <ciManagement>
     <system>Jenkins</system>
-    
<url>https://ci-builds.apache.org/job/Maven/job/maven-box/job/maven-ejb-plugin/</url>
+    
<url>https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-ejb-plugin/</url>
   </ciManagement>
   <distributionManagement>
     <site>
@@ -61,10 +61,6 @@ under the License.
 
   <properties>
     <mavenVersion>3.2.5</mavenVersion>
-    <javaVersion>8</javaVersion>
-    <mavenPluginToolsVersion>3.6.4</mavenPluginToolsVersion>
-    <mavenFilteringVersion>3.2.0</mavenFilteringVersion>
-    <mavenArchiverVersion>3.5.2</mavenArchiverVersion>
     
<project.build.outputTimestamp>2022-04-18T18:55:30Z</project.build.outputTimestamp>
   </properties>
 
@@ -102,7 +98,7 @@ under the License.
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-archiver</artifactId>
-      <version>${mavenArchiverVersion}</version>
+      <version>3.6.2</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
@@ -112,27 +108,30 @@ under the License.
     <dependency>
       <groupId>org.apache.maven.shared</groupId>
       <artifactId>maven-filtering</artifactId>
-      <version>${mavenFilteringVersion}</version>
+      <version>3.3.2</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.shared</groupId>
       <artifactId>maven-shared-utils</artifactId>
-      <version>3.3.4</version>
+      <version>3.4.2</version>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
-      <version>3.5.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-xml</artifactId>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-archiver</artifactId>
-      <version>4.8.0</version>
+      <version>4.9.2</version>
     </dependency>
     <dependency>
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
-      <version>2.7</version>
+      <version>2.16.1</version>
     </dependency>
     <dependency>
       <groupId>junit</groupId>
diff --git a/src/it/mejb-93/verify.groovy b/src/it/mejb-93/verify.groovy
index 087b563..25cb297 100644
--- a/src/it/mejb-93/verify.groovy
+++ b/src/it/mejb-93/verify.groovy
@@ -19,6 +19,7 @@
 
 import java.io.*
 import java.util.*
+import groovy.xml.XmlSlurper
 
 /**
  * This will filter out the version of the
@@ -52,17 +53,17 @@ if ( !jarFile.isFile() )
 
 def buildLog = new File( basedir, "build.log" ).getText('UTF-8')
 
-if (!buildLog.contains ('[INFO] --- maven-ejb-plugin:' + projectVersion + 
':ejb (default-ejb) @ maven-it-mejb93 ---')) {
+if (!buildLog.contains ('' + projectVersion + ':ejb (default-ejb) @ 
maven-it-mejb93 ---')) {
   println ( "default executions did not happen.")
   return false
 }
-if (!buildLog.contains ('[INFO] --- maven-ejb-plugin:' + projectVersion + 
':ejb (second-execution) @ maven-it-mejb93 ---')) {
+if (!buildLog.contains ('' + projectVersion + ':ejb (second-execution) @ 
maven-it-mejb93 ---')) {
   println ( "second executions did not happen.")
   return false
 }
-if (!buildLog.contains ('[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-ejb-plugin:' + projectVersion 
-    + ':ejb (second-execution) on project maven-it-mejb93: ' 
-    + 'You have to use a classifier to attach supplemental artifacts to the ' 
+if (!buildLog.contains ('[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-ejb-plugin:' + projectVersion
+    + ':ejb (second-execution) on project maven-it-mejb93: '
+    + 'You have to use a classifier to attach supplemental artifacts to the '
     + 'project instead of replacing them. -> [Help 1]')) {
   println ( "exception message does not exists or the expected content does 
not exist.")
   return false
diff --git a/src/main/java/org/apache/maven/plugins/ejb/EjbMojo.java 
b/src/main/java/org/apache/maven/plugins/ejb/EjbMojo.java
index 4c5bb4e..99dbd90 100644
--- a/src/main/java/org/apache/maven/plugins/ejb/EjbMojo.java
+++ b/src/main/java/org/apache/maven/plugins/ejb/EjbMojo.java
@@ -38,10 +38,10 @@ import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.plugins.annotations.ResolutionScope;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.MavenProjectHelper;
+import org.apache.maven.shared.filtering.FilterWrapper;
 import org.apache.maven.shared.filtering.MavenFileFilter;
 import org.apache.maven.shared.filtering.MavenFilteringException;
 import org.apache.maven.shared.filtering.MavenResourcesExecution;
-import org.apache.maven.shared.utils.io.FileUtils.FilterWrapper;
 import org.codehaus.plexus.archiver.Archiver;
 import org.codehaus.plexus.archiver.ArchiverException;
 import org.codehaus.plexus.archiver.jar.JarArchiver;
@@ -349,7 +349,7 @@ public class EjbMojo extends AbstractMojo {
         archiver.setOutputFile(jarFile);
 
         // configure for Reproducible Builds based on outputTimestamp value
-        archiver.configureReproducible(outputTimestamp);
+        archiver.configureReproducibleBuild(outputTimestamp);
 
         File deploymentDescriptor = new File(sourceDirectory, ejbJar);
 
@@ -357,10 +357,9 @@ public class EjbMojo extends AbstractMojo {
 
         try {
             List<String> defaultExcludes = Arrays.asList(ejbJar, 
"**/package.html");
-            List<String> defaultIncludes = DEFAULT_INCLUDES_LIST;
 
             IncludesExcludes ie =
-                    new IncludesExcludes(Collections.<String>emptyList(), 
excludes, defaultIncludes, defaultExcludes);
+                    new IncludesExcludes(Collections.emptyList(), excludes, 
DEFAULT_INCLUDES_LIST, defaultExcludes);
 
             archiver.getArchiver().addDirectory(sourceDirectory, 
ie.resultingIncludes(), ie.resultingExcludes());
 
@@ -399,14 +398,12 @@ public class EjbMojo extends AbstractMojo {
         clientArchiver.setOutputFile(clientJarFile);
 
         // configure for Reproducible Builds based on outputTimestamp value
-        clientArchiver.configureReproducible(outputTimestamp);
+        clientArchiver.configureReproducibleBuild(outputTimestamp);
 
         try {
-            List<String> defaultExcludes = DEFAULT_CLIENT_EXCLUDES_LIST;
-            List<String> defaultIncludes = DEFAULT_INCLUDES_LIST;
 
-            IncludesExcludes ie =
-                    new IncludesExcludes(clientIncludes, clientExcludes, 
defaultIncludes, defaultExcludes);
+            IncludesExcludes ie = new IncludesExcludes(
+                    clientIncludes, clientExcludes, DEFAULT_INCLUDES_LIST, 
DEFAULT_CLIENT_EXCLUDES_LIST);
 
             clientArchiver.getArchiver().addDirectory(sourceDirectory, 
ie.resultingIncludes(), ie.resultingExcludes());
 
@@ -486,9 +483,9 @@ public class EjbMojo extends AbstractMojo {
      * @throws IOException if an error occurred while reading the file
      */
     private String getEncoding(File xmlFile) throws IOException {
-        try (XmlStreamReader xmlReader = new XmlStreamReader(xmlFile)) {
-            final String encoding = xmlReader.getEncoding();
-            return encoding;
+        try (XmlStreamReader xmlReader =
+                XmlStreamReader.builder().setFile(xmlFile).get()) {
+            return xmlReader.getEncoding();
         }
     }
 

Reply via email to