Skip to content

Maven 3.9.12 compatibility: Missing prerequisitesCheckers dependency causes NullPointerException #3285

@TrueBurn

Description

@TrueBurn

Describe the bug

JFrog CLI's Maven integration (jf mvn command) fails with a NullPointerException when used with Maven 3.9.12. This is caused by a missing dependency declaration in the build-info-extractor component configuration.

The build-info-extractor-maven3 replaces Maven's DefaultMavenPluginManager with ArtifactoryEclipsePluginManager but doesn't declare the new prerequisitesCheckers field (added in Maven 3.9.12) as a required dependency in its Plexus components.xml file.

Root cause tracked at: jfrog/build-info#841
Maven discussion: apache/maven#11574

Filing this issue for visibility and to track when JFrog CLI should update its build-info-extractor dependency to a version that includes the fix.

Current behavior

When running jf mvn commands with Maven 3.9.12, builds fail immediately with:

[main] ERROR org.apache.maven.cli.MavenCli - Cannot invoke "java.util.List.forEach(java.util.function.Consumer)" because "this.prerequisitesCheckers" is null
java.lang.NullPointerException: Cannot invoke "java.util.List.forEach(java.util.function.Consumer)" because "this.prerequisitesCheckers" is null
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.checkPrerequisites (DefaultMavenPluginManager.java:290)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:187)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)

Build-info-extractor download shows version 2.42.2 being used:
07:37:35 [Info] Downloading JFrog's Dependency from https://releases.jfrog.io/artifactory/oss-release-local/org/jfrog/buildinfo/build-info-extractor-maven3/2.42.2/build-info-extractor-maven3-2.42.2-uber.jar

Workaround: Pinning to Maven 3.9.11 works correctly.

Reproduction steps

  1. Use Maven 3.9.12 (e.g., Docker image maven:3.9.12-amazoncorretto-25-al2023)
  2. Install JFrog CLI (latest version via setup-jfrog-cli@v4)
  3. Configure Maven integration:
    jf mvn-config --repo-resolve-releases my-repo --repo-resolve-snapshots my-repo --repo-deploy-releases my-repo --repo-deploy-snapshots my-repo
  4. Run any Maven build:
    jf mvn clean install --build-name MyBuild --build-number 1
  5. Observe NullPointerException failure

GitHub Actions example:

jobs:
  build:
    runs-on: ubuntu-22.04
    container:
      image: maven:3.9.12-amazoncorretto-25-al2023
    steps:
      - uses: jfrog/setup-jfrog-cli@v4
        env:
          JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }}
      - uses: actions/checkout@v4
      - run: jf mvn-config --repo-resolve-releases my-repo --repo-deploy-releases my-repo
      - run: jf mvn clean install --build-name app --build-number ${{ github.run_number }}

Same failure occurs with Java 21 and Java 25.

Expected behavior

The Maven build should complete successfully with Maven 3.9.12, just as it does with Maven 3.9.11. JFrog CLI should be compatible with the latest stable Maven releases without requiring users to pin to older Maven versions.

JFrog CLI version

2.87.0

Operating system type and version

Linux Ubuntu 22.04 (GitHub Actions runners) Amazon Linux 2023 (Maven Docker containers) Also reproduced on Windows and macOS environments with Maven 3.9.12

JFrog Artifactory version

No response

JFrog Xray version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions