Synchronize Maven surefire plugin with Quarkus

Closes #41488

Co-authored-by: Peter Zaoral <pepo48@gmail.com>
Signed-off-by: Martin Bartoš <mabartos@redhat.com>
This commit is contained in:
Martin Bartoš
2025-07-29 11:33:28 +02:00
parent 75ade9acef
commit 3243e95c5a
4 changed files with 21 additions and 5 deletions

View File

@@ -27,7 +27,6 @@
<version.compiler.plugin>3.6.1</version.compiler.plugin>
<version.jar.plugin>3.0.2</version.jar.plugin>
<version.install.plugin>2.5.2</version.install.plugin>
<version.surefire.plugin>2.22.2</version.surefire.plugin>
<version.plexus.utils>4.0.0</version.plexus.utils>
</properties>

View File

@@ -176,8 +176,8 @@
<jmeter.version>2.10</jmeter.version>
<junit.version>4.13.2</junit.version>
<picketlink.version>2.7.0.Final</picketlink.version>
<!-- Needs to be aligned with Quarkus, see e.g. https://github.com/quarkusio/quarkus-quickstarts/blob/2.13.5.Final/getting-started-async/pom.xml#L14 -->
<surefire-plugin.version>3.0.0-M7</surefire-plugin.version>
<!-- Needs to be aligned with Quarkus, handled in quarkus/set-quarkus-version.sh script -->
<version.surefire.plugin>3.5.3</version.surefire.plugin>
<xml-apis.version>1.4.01</xml-apis.version>
<subethasmtp.version>3.1.7</subethasmtp.version>
<assertj-core.version>3.22.0</assertj-core.version>
@@ -1343,7 +1343,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<version>${version.surefire.plugin}</version>
<configuration>
<argLine>-Djava.awt.headless=true ${surefire.memory.settings} ${surefire.system.args} -Duser.language=en -Duser.region=US -XX:+ExitOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError</argLine>
<runOrder>alphabetical</runOrder>

View File

@@ -51,7 +51,7 @@
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<version>${version.surefire.plugin}</version>
<configuration>
<systemProperties>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>

View File

@@ -47,19 +47,36 @@ if [ "$QUARKUS_BRANCH" == "$DEFAULT_QUARKUS_VERSION" ]; then
fi
QUARKUS_BOM_URL="https://raw.githubusercontent.com/quarkusio/quarkus/$QUARKUS_BRANCH/bom/application/pom.xml"
QUARKUS_PARENT_POM_URL="https://raw.githubusercontent.com/quarkusio/quarkus/$QUARKUS_BRANCH/independent-projects/parent/pom.xml"
VERSIONS_FROM_QUARKUS_PARENT=(
"version.surefire.plugin"
)
if ! $(curl --output /dev/null --silent --head --fail "$QUARKUS_BOM_URL"); then
echo "Failed to resolve version from Quarkus BOM at '$QUARKUS_BOM_URL'"
exit 1
fi
if ! $(curl --output /dev/null --silent --head --fail "$QUARKUS_PARENT_POM_URL"); then
echo "Failed to resolve version from Quarkus Parent pom.xml at '$QUARKUS_PARENT_POM_URL'"
exit 1
fi
QUARKUS_BOM=$(curl -f -s "$QUARKUS_BOM_URL")
QUARKUS_PARENT_POM=$(curl -f -s "$QUARKUS_PARENT_POM_URL")
echo "Setting Quarkus version: $QUARKUS_VERSION"
$SCRIPT_DIR/../mvnw -B versions:set-property -f $SCRIPT_DIR/../pom.xml -Dproperty=quarkus.version -DnewVersion="$QUARKUS_VERSION" 1> /dev/null
$SCRIPT_DIR/../mvnw -B versions:set-property -f $SCRIPT_DIR/../pom.xml -Dproperty=quarkus.build.version -DnewVersion="$QUARKUS_VERSION" 1> /dev/null
for dependency in "${VERSIONS_FROM_QUARKUS_PARENT[@]}"; do
VERSION=$(grep -oP "(?<=<$dependency>)[^<]*(?=</$dependency>)" <<< "$QUARKUS_PARENT_POM")
echo "Setting $dependency to $VERSION based on the Quarkus Parent pom.xml"
$SCRIPT_DIR/../mvnw versions:set-property -f $SCRIPT_DIR/../pom.xml -Dproperty="$dependency" -DnewVersion="$VERSION" 1> /dev/null
done
DEPENDENCIES_LIST=$(grep -oP '(?<=\</).*(?=\.version\>)' "$SCRIPT_DIR/../pom.xml")
echo "Changing dependencies: $DEPENDENCIES_LIST"