Skip to content

Maven 4 rc6 test - #2086

Merged
venmanyarun merged 6 commits into
OpenLiberty:maven_4_rc_6from
venmanyarun:maven_4_rc6_test
Aug 14, 2026
Merged

venmanyarun merged 6 commits into
OpenLiberty:maven_4_rc_6from
venmanyarun:maven_4_rc6_test

Conversation

@venmanyarun

@venmanyarun venmanyarun commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

PR for testing Maven 4 RC

Changes

  1. Maven core upgrade
  • maven.version → 4.0.0-rc-6
  • maven-plugin-plugin/annotations → 3.15.2
  • maven-compiler-plugin → 4.0.0-beta-4
  • maven-invoker-plugin → 3.9.1
  • maven-resources-plugin → 3.5.0
  • added maven-compat as provided dependency so org.apache.maven.toolchain.* (moved out of maven-core in Maven 4) compiles correctly
  1. Maven wrapper
  • .mvn/wrapper/maven-wrapper.properties updated to apache-maven-4.0.0-rc-6 + maven-wrapper-3.3.4
  • ./mvnw now bootstraps Maven 4 RC-6
  1. IT compiler settings
  • 85 IT pom.xml files: replaced 1.8 + 1.8 with <maven.compiler.release>8</maven.compiler.release>
  • 14 springboot/compile-jsp-source-17 files updated to release 17
  1. CI workflow
  • removed Java 8 & 11 from the test matrix (kept their JDK install steps for toolchain tests)
  • merged the two separate test steps into one
  • replaced stCarolas/setup-maven@v4.5 / Maven 3.9.9 with stCarolas/setup-maven@v5.1 / Maven 4.0.0-rc-6

@venmanyarun
venmanyarun marked this pull request as draft August 13, 2026 08:31
Three changes required to run the integration tests under Maven 4 RC-6:

1. Mark invoker profile activations as optional (? prefix)
   Maven 4 made requesting a missing profile a hard error
   (MissingProfilesException). The invoker plugin passes
   -Ponline-its/-Poffline-its to every IT subprocess, but most IT
   poms don't declare those profiles. Adding the '?' prefix makes
   them optional: activated if present, silently skipped if absent.

2. Pin plugin versions in IT setup parent pom
   Under Maven 4, default plugin bindings resolve the latest release
   from Central if no version is locked. This caused maven-resources-
   plugin:4.0.0-beta-1 to be pulled in, which fails with
   NoSuchMethodError against Maven 4 RC-6's maven-api-services.
   Pinning maven-resources-plugin:3.5.0, maven-compiler-plugin:3.15.0,
   maven-install-plugin:3.1.3, and maven-surefire-plugin:3.5.2 in the
   setup parent propagates stable versions to all 85 IT children.

3. Null-guard MavenProject.getPluginManagement() in DeployMojo
   Maven 4 returns null from getPluginManagement() when a pom has no
   <pluginManagement> block (Maven 3 returned an empty object). The
   mavenWarPluginExists() method called .getPlugins() unconditionally,
   causing a NullPointerException during the deploy goal.
@venmanyarun
venmanyarun changed the base branch from main to maven_4_rc_6 August 14, 2026 07:55
@venmanyarun
venmanyarun marked this pull request as ready for review August 14, 2026 07:55
@venmanyarun
venmanyarun merged commit 9dec3d5 into OpenLiberty:maven_4_rc_6 Aug 14, 2026
0 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant