This is an automated email from the ASF dual-hosted git repository.
sjaranowski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-help-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 2be3211 Update Parent to 45 and invoker plugin 3.9.1 (Java 25) (#344)
2be3211 is described below
commit 2be321113d1dfedc174234c8bafd23ee7e6230fd
Author: Matthias Bünger <[email protected]>
AuthorDate: Fri Oct 31 11:34:23 2025 +0100
Update Parent to 45 and invoker plugin 3.9.1 (Java 25) (#344)
* Update Parent to 45 and invoker plugin 3.9.1 (Java 25)
* Spotless
* Try to fix ITs
---------
Co-authored-by: Slawomir Jaranowski <[email protected]>
---
pom.xml | 4 ++-
.../active-profiles_multimodule/verify.groovy | 16 +++++++---
src/it/projects/describe-cmd/invoker.properties | 4 +--
src/it/projects/describe-cmd/verify.groovy | 8 +++--
.../effective-pom_properties/verify.groovy | 30 +++++++++++++-----
.../pom.xml | 2 +-
.../invoker.properties | 4 ++-
.../evaluate-forceStdout-raw-streems/pom.xml | 37 ++++++++++++++++++++++
.../test.properties} | 3 +-
.../verify.groovy | 7 +++-
.../evaluate-forceStdout/invoker.properties | 2 ++
src/it/projects/evaluate-forceStdout/verify.groovy | 7 +++-
.../evaluate-settings-servers/invoker.properties | 12 +++++++
.../maven/plugins/help/AllProfilesMojoTest.java | 2 +-
.../maven/plugins/help/DescribeMojoTest.java | 12 +++++--
.../maven/plugins/help/EvaluateMojoTest.java | 2 +-
16 files changed, 126 insertions(+), 26 deletions(-)
diff --git a/pom.xml b/pom.xml
index ea26574..b5dd97c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugins</artifactId>
- <version>43</version>
+ <version>45</version>
<relativePath />
</parent>
@@ -166,6 +166,7 @@
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
+ <version>${version.maven-plugin-tools}</version>
<scope>provided</scope>
</dependency>
@@ -276,6 +277,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
+ <version>3.9.1</version>
<configuration>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
<projectsDirectory>src/it/projects</projectsDirectory>
diff --git a/src/it/projects/active-profiles_multimodule/verify.groovy
b/src/it/projects/active-profiles_multimodule/verify.groovy
index c207267..c49b7ad 100644
--- a/src/it/projects/active-profiles_multimodule/verify.groovy
+++ b/src/it/projects/active-profiles_multimodule/verify.groovy
@@ -20,7 +20,15 @@
def buildLog = new File( basedir, 'build.log' );
assert buildLog.exists()
-assert 2 == buildLog.text.count( ' - mph79 (source:
org.apache.maven.its.help:active-profiles_multimodule:1.0-SNAPSHOT)' )
-assert 1 == buildLog.text.count( ' - mph79-child (source:
org.apache.maven.its.help:active-profiles_multimodule-module:1.0-SNAPSHOT)' )
-assert 0 == buildLog.text.count( ' - mph79-child-inactive' )
-assert 2 == buildLog.text.count( ' - it-repo (source: external)' )
+if (mavenVersion.startsWith( '4.' )) {
+ assert 1 == buildLog.text.count(' - mph79 (source:
org.apache.maven.its.help:active-profiles_multimodule:pom:1.0-SNAPSHOT)')
+ assert 1 == buildLog.text.count(' - mph79 (source:
org.apache.maven.its.help:active-profiles_multimodule-module:jar:1.0-SNAPSHOT)')
+ assert 1 == buildLog.text.count('- mph79-child (source:
org.apache.maven.its.help:active-profiles_multimodule-module:jar:1.0-SNAPSHOT)')
+
+} else {
+ assert 2 == buildLog.text.count(' - mph79 (source:
org.apache.maven.its.help:active-profiles_multimodule:1.0-SNAPSHOT)')
+ assert 1 == buildLog.text.count(' - mph79-child (source:
org.apache.maven.its.help:active-profiles_multimodule-module:1.0-SNAPSHOT)')
+}
+
+assert 0 == buildLog.text.count(' - mph79-child-inactive')
+assert 2 == buildLog.text.count(' - it-repo (source: external)')
diff --git a/src/it/projects/describe-cmd/invoker.properties
b/src/it/projects/describe-cmd/invoker.properties
index ecf6e30..2769786 100644
--- a/src/it/projects/describe-cmd/invoker.properties
+++ b/src/it/projects/describe-cmd/invoker.properties
@@ -18,5 +18,5 @@
invoker.goals.1 =
${project.groupId}:${project.artifactId}:${project.version}:describe
invoker.goals.2 =
${project.groupId}:${project.artifactId}:${project.version}:describe
-invoker.systemPropertiesFile.1 = test-deploy.properties
-invoker.systemPropertiesFile.2 = test-site.properties
+invoker.userPropertiesFile.1 = test-deploy.properties
+invoker.userPropertiesFile.2 = test-site.properties
diff --git a/src/it/projects/describe-cmd/verify.groovy
b/src/it/projects/describe-cmd/verify.groovy
index 5a044f1..6cecaea 100644
--- a/src/it/projects/describe-cmd/verify.groovy
+++ b/src/it/projects/describe-cmd/verify.groovy
@@ -21,8 +21,12 @@ def result = new File(basedir, 'result-deploy.txt').text;
def ls = System.getProperty( "line.separator" );
-assert result.contains("'deploy' is a phase corresponding to this plugin:" +
ls +
- "org.apache.maven.plugins:maven-deploy-plugin")
+if (mavenVersion.startsWith('4.')) {
+ assert result.contains("'deploy' is a phase within the 'default'
lifecycle, which has the following phases:")
+} else {
+ assert result.contains("'deploy' is a phase corresponding to this plugin:"
+ ls +
+ "org.apache.maven.plugins:maven-deploy-plugin")
+}
result = new File(basedir, 'result-site.txt').text;
diff --git a/src/it/projects/effective-pom_properties/verify.groovy
b/src/it/projects/effective-pom_properties/verify.groovy
index 09f91a8..dd2be3d 100644
--- a/src/it/projects/effective-pom_properties/verify.groovy
+++ b/src/it/projects/effective-pom_properties/verify.groovy
@@ -19,11 +19,25 @@
def buildLog = new File(basedir, 'build.log');
assert buildLog.exists()
-def LS = System.getProperty("line.separator")
-assert buildLog.text.find(
-'(?s)' +
-' <properties>' + LS +
-' <maven\\.compiler\\.source>1\\.6</maven\\.compiler\\.source>' + LS +
-' <maven\\.compiler\\.target>1\\.6</maven\\.compiler\\.target>' + LS +
-'.*' +
-' </properties>') != null
+def LS = System.getProperty("line.separator")
+if (mavenVersion.startsWith('4.')) {
+ // we have defined properties maven.compiler.source/target to 8 as user
properties for execution
+ // Maven 4 take precedence over the pom properties
+ // also order of properties is changed in Maven 4
+ assert buildLog.text.find(
+ '(?s)' +
+ ' <properties>' + LS +
+ '
<maven\\.compiler\\.target>8</maven\\.compiler\\.target>' + LS +
+ '
<maven\\.compiler\\.source>8</maven\\.compiler\\.source>' + LS +
+ '.*' +
+ ' </properties>') != null
+
+} else {
+ assert buildLog.text.find(
+ '(?s)' +
+ ' <properties>' + LS +
+ '
<maven\\.compiler\\.source>1\\.6</maven\\.compiler\\.source>' + LS +
+ '
<maven\\.compiler\\.target>1\\.6</maven\\.compiler\\.target>' + LS +
+ '.*' +
+ ' </properties>') != null
+}
diff --git
a/src/it/projects/evaluate-artifact-with-expression-with-output/pom.xml
b/src/it/projects/evaluate-artifact-with-expression-with-output/pom.xml
index 7176ee4..9ee377e 100644
--- a/src/it/projects/evaluate-artifact-with-expression-with-output/pom.xml
+++ b/src/it/projects/evaluate-artifact-with-expression-with-output/pom.xml
@@ -47,7 +47,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
- <version>1.4.1</version>
+ <version>@version.maven-enforcer-plugin@</version>
<executions>
<execution>
<id>enforce-currentproject</id>
diff --git a/src/it/projects/evaluate-forceStdout/invoker.properties
b/src/it/projects/evaluate-forceStdout-raw-streems/invoker.properties
similarity index 88%
copy from src/it/projects/evaluate-forceStdout/invoker.properties
copy to src/it/projects/evaluate-forceStdout-raw-streems/invoker.properties
index 13d149d..1bc38eb 100644
--- a/src/it/projects/evaluate-forceStdout/invoker.properties
+++ b/src/it/projects/evaluate-forceStdout-raw-streems/invoker.properties
@@ -15,5 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-invoker.goals =
${project.groupId}:${project.artifactId}:${project.version}:evaluate -q
+invoker.goals =
${project.groupId}:${project.artifactId}:${project.version}:evaluate -q
--raw-streams
invoker.debug = false
+# --raw-streams available since Maven 3.9.11
+invoker.maven.version = 3.9.11+
diff --git a/src/it/projects/evaluate-forceStdout-raw-streems/pom.xml
b/src/it/projects/evaluate-forceStdout-raw-streems/pom.xml
new file mode 100644
index 0000000..aabc9fd
--- /dev/null
+++ b/src/it/projects/evaluate-forceStdout-raw-streems/pom.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.help</groupId>
+ <artifactId>test</artifactId>
+ <version>1.0</version>
+
+ <description>
+ The description.
+ </description>
+
+ <build>
+ <plugins>
+ </plugins>
+ </build>
+</project>
diff --git a/src/it/projects/evaluate-settings-servers/invoker.properties
b/src/it/projects/evaluate-forceStdout-raw-streems/test.properties
similarity index 90%
copy from src/it/projects/evaluate-settings-servers/invoker.properties
copy to src/it/projects/evaluate-forceStdout-raw-streems/test.properties
index e9c555f..a14aca6 100644
--- a/src/it/projects/evaluate-settings-servers/invoker.properties
+++ b/src/it/projects/evaluate-forceStdout-raw-streems/test.properties
@@ -15,4 +15,5 @@
# specific language governing permissions and limitations
# under the License.
-invoker.goals =
${project.groupId}:${project.artifactId}:${project.version}:evaluate
+expression = project.version
+forceStdout = true
diff --git a/src/it/projects/evaluate-forceStdout/verify.groovy
b/src/it/projects/evaluate-forceStdout-raw-streems/verify.groovy
similarity index 79%
copy from src/it/projects/evaluate-forceStdout/verify.groovy
copy to src/it/projects/evaluate-forceStdout-raw-streems/verify.groovy
index 09ff343..cf79223 100644
--- a/src/it/projects/evaluate-forceStdout/verify.groovy
+++ b/src/it/projects/evaluate-forceStdout-raw-streems/verify.groovy
@@ -17,4 +17,9 @@
* under the License.
*/
-assert '1.0' == new File(basedir, 'build.log').readLines().findAll{
!it.startsWith('Picked up JAVA_TOOL_OPTIONS: ') }.first()
+// for JDK25 and later, ignore lines starting with "WARNING: "
+// https://github.com/apache/maven/issues/10312
+
+assert '1.0' == new File(basedir, 'build.log').readLines().findAll {
+ !it.startsWith('Picked up JAVA_TOOL_OPTIONS: ') &&
!it.startsWith('WARNING: ') && it != ''
+}.first()
diff --git a/src/it/projects/evaluate-forceStdout/invoker.properties
b/src/it/projects/evaluate-forceStdout/invoker.properties
index 13d149d..de210ae 100644
--- a/src/it/projects/evaluate-forceStdout/invoker.properties
+++ b/src/it/projects/evaluate-forceStdout/invoker.properties
@@ -17,3 +17,5 @@
invoker.goals =
${project.groupId}:${project.artifactId}:${project.version}:evaluate -q
invoker.debug = false
+# for Maven 4 we need --raw-streams
+invoker.maven.version = 4-
diff --git a/src/it/projects/evaluate-forceStdout/verify.groovy
b/src/it/projects/evaluate-forceStdout/verify.groovy
index 09ff343..cf79223 100644
--- a/src/it/projects/evaluate-forceStdout/verify.groovy
+++ b/src/it/projects/evaluate-forceStdout/verify.groovy
@@ -17,4 +17,9 @@
* under the License.
*/
-assert '1.0' == new File(basedir, 'build.log').readLines().findAll{
!it.startsWith('Picked up JAVA_TOOL_OPTIONS: ') }.first()
+// for JDK25 and later, ignore lines starting with "WARNING: "
+// https://github.com/apache/maven/issues/10312
+
+assert '1.0' == new File(basedir, 'build.log').readLines().findAll {
+ !it.startsWith('Picked up JAVA_TOOL_OPTIONS: ') &&
!it.startsWith('WARNING: ') && it != ''
+}.first()
diff --git a/src/it/projects/evaluate-settings-servers/invoker.properties
b/src/it/projects/evaluate-settings-servers/invoker.properties
index e9c555f..a50d2e9 100644
--- a/src/it/projects/evaluate-settings-servers/invoker.properties
+++ b/src/it/projects/evaluate-settings-servers/invoker.properties
@@ -16,3 +16,15 @@
# under the License.
invoker.goals =
${project.groupId}:${project.artifactId}:${project.version}:evaluate
+
+invoker.maven.version = 4-
+
+# Error on Maven 4
+# Caused by: com.thoughtworks.xstream.converters.ConversionException: No
converter available
+# ---- Debugging information ----
+# message : No converter available
+# type : java.util.ImmutableCollections$MapN
+# converter :
com.thoughtworks.xstream.converters.reflection.SerializableConverter
+# message[1] : Unable to make private void
java.util.ImmutableCollections$MapN.readObject(java.io.ObjectInputStream)
throws java.io.IOException,java.lang.ClassNotFoundException accessible: module
java.base does not "opens java.util" to unnamed module @50bf795f
+# converter[1] :
com.thoughtworks.xstream.converters.reflection.ReflectionConverter
+# message[2] : Unable to make field transient java.util.Set
java.util.AbstractMap.keySet accessible: module java.base does not "opens
java.util" to unnamed module @50bf795f
diff --git
a/src/test/java/org/apache/maven/plugins/help/AllProfilesMojoTest.java
b/src/test/java/org/apache/maven/plugins/help/AllProfilesMojoTest.java
index 2df3eba..01c1aa8 100644
--- a/src/test/java/org/apache/maven/plugins/help/AllProfilesMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/help/AllProfilesMojoTest.java
@@ -189,7 +189,7 @@ public class AllProfilesMojoTest extends
AbstractMojoTestCase {
private static final class InterceptingLog extends DefaultLog {
final List<String> warnLogs = new ArrayList<>();
- public InterceptingLog(Logger logger) {
+ InterceptingLog(Logger logger) {
super(logger);
}
diff --git a/src/test/java/org/apache/maven/plugins/help/DescribeMojoTest.java
b/src/test/java/org/apache/maven/plugins/help/DescribeMojoTest.java
index fe22060..1701328 100644
--- a/src/test/java/org/apache/maven/plugins/help/DescribeMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/help/DescribeMojoTest.java
@@ -39,8 +39,16 @@ import org.eclipse.aether.RepositorySystemSession;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyList;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
/**
* @author <a href="mailto:[email protected]">Vincent Siveton</a>
diff --git a/src/test/java/org/apache/maven/plugins/help/EvaluateMojoTest.java
b/src/test/java/org/apache/maven/plugins/help/EvaluateMojoTest.java
index f65fee0..2dbeea3 100644
--- a/src/test/java/org/apache/maven/plugins/help/EvaluateMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/help/EvaluateMojoTest.java
@@ -161,7 +161,7 @@ public class EvaluateMojoTest extends AbstractMojoTestCase {
final List<String> warnLogs = new ArrayList<>();
- public InterceptingLog(Logger logger) {
+ InterceptingLog(Logger logger) {
super(logger);
this.isInfoEnabled = true;
}