Expand my Community achievements bar.

Upgrading to Java 21 for AEM : Baseline MAJOR Error due to META-INF/maven resource change after upgrading bnd from 5.1.2 to 6.4.0

Avatar

Level 1

Problem Summary

 

We recently upgraded the bnd-baseline-maven-plugin version in our project from 5.1.2 to 6.4.0. Following this upgrade, simply changing the project version number (e.g., from 2026.04.20.49 to 2026.04.20.50), without any changes to the Java API code, causes the Baseline check to fail with a MAJOR error.

 

Error Report Snippet

 

The key lines from the build failure report are as follows:

Failed to execute goal biz.aQute.bnd:bnd-baseline-maven-plugin:6.4.0:baseline ...
[ERROR] ===============================================================
[ERROR] * myproject.core BUNDLE MAJOR 2026.4.20.50 2026.4.20.49 2026.4.21
[ERROR] MAJOR RESOURCES <resources>
[ERROR] MAJOR RESOURCE META-INF/maven/package/myproject.core/pom.properties
[ERROR] ADDED SHA 08C7BB605EB92CA8E2352DD9727497F11EEAB35E
[ERROR] REMOVED SHA 2597151AAA3FC16F823D4C6990BCCB111B80624E
[ERROR] MAJOR RESOURCE META-INF/maven/package/myproject.core/pom.xml
...
[ERROR]   com.adobe.aem.cub.aemcs.core.filters               PACKAGE     UNCHANGED   1.0.0       1.0.0       ok
... (All Exported Packages are UNCHANGED)

 

Current Analysis and Workaround

 

  1. Root Cause: The error originates from RESOURCES. The changes in the SHA hashes of the Maven-generated pom.properties and pom.xml files (due to the version number update) are being misinterpreted by bnd 6.4.0 as a Major change.

  2. Current Workaround: We resolved the immediate issue by adding the following configuration to the pom.xml to explicitly ignore these files:

<configuration>
    <diffignores>
        <diffignore>META-INF/maven/package/myproject.core/pom.properties</diffignore>
        <diffignore>META-INF/maven/package/myproject.core/pom.xml</diffignore>
    </diffignores>
</configuration>

 

Our Questions for the Community

 

  1. bnd 6.x Behavior Change:

    • Are there any official documents or change logs detailing that the Baseline check's default scope was expanded during the transition from bnd 5.1.2 to 6.4.0 to now include all resource files (specifically META-INF/maven), and that changes in these resources are flagged as Major changes?

  2. Standard Ignore Pattern:

    • Given that these resource changes are a natural part of the Maven build, is the pattern we used (explicitly ignoring the full path of these two files) the standard or recommended approach for handling this issue in bnd 6.x environments?

  3. Alternative Solution:

    • Apart from manually ignoring these two specific files, is there a simpler or more global configuration option (e.g., a flag similar to diffignore-maven-metadata) that could prevent us from having to duplicate this configuration across multiple projects?

1 Reply

Avatar

Level 5

Hi @YanTingCh ,

 

After upgrading to bnd 6.x, the plugin became stricter and started checking all bundle resources, including Maven-generated files under:

 

META-INF/maven/**/pom.xml
META-INF/maven/**/pom.properties

 

Because these files always change when the project version changes, bnd treats the SHA difference as a MAJOR change, even though your Java API is unchanged.
This behaviour is new in bnd 6.x but not clearly documented.

The fix you added is correct and standard. Most projects simply ignore Maven metadata:

<diffignore>META-INF/maven/.*</diffignore>

This is the recommended approach.
To avoid repeating it everywhere, put this config once in your parent pom.xml so all modules inherit it automatically.

 

Thanks,

Vishal