Skip to content

Map classpath-exception license names to non-deprecated SPDX expressions - #999

Draft
afalhambra-hivemq wants to merge 2 commits into
CycloneDX:masterfrom
afalhambra-hivemq:fix/classpath-exception-spdx-ids
Draft

afalhambra-hivemq wants to merge 2 commits into
CycloneDX:masterfrom
afalhambra-hivemq:fix/classpath-exception-spdx-ids

Conversation

@afalhambra-hivemq

@afalhambra-hivemq afalhambra-hivemq commented Nov 20, 2026 •

Copy link
Copy Markdown

Fixes #998.

license-mapping.json resolved nine license names to GPL-2.0-with-classpath-exception, an id SPDX deprecated in license list version 2.0rc2. They now map to the replacement SPDX names:

  • "GPL2 w/ CPE" and six similar names: GPL-2.0-with-classpath-exception becomes (GPL-2.0-only WITH Classpath-exception-2.0)
  • "CDDL + GPLv2 with classpath exception" and "CDDL/GPLv2+CE": (CDDL-1.0 OR GPL-2.0-with-classpath-exception) becomes (CDDL-1.0 OR GPL-2.0-only WITH Classpath-exception-2.0)

Two names that POMs in the wild use are missing from the table altogether and reach BOMs as bare names, with no SPDX id; they join the fix:

  • "GNU General Public License, Version 2 with the Classpath Exception" (org.jboss.resteasy:resteasy-tracing-api) joins the classpath-exception names above
  • "GNU General Public License, version 2" (org.rocksdb:rocksdbjni) maps to GPL-2.0-only

LicenseResolverTest covers all eleven names.

Behaviour change: the seven GPL names now resolve to an Expression instead of a License. cyclonedx-gradle-plugin and cyclonedx-maven-plugin replace a component's other licenses when they receive an expression (details in #998), so this should merge after CycloneDX/cyclonedx-gradle-plugin#980. It stays a draft until then.

Signed-off-by: Antonio Fernandez Alhambra <antonio.alhambra@hivemq.com>
@codacy-production

codacy-production Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 4 complexity

Metric Results
Complexity 4

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

…c License, version 2" and its Classpath Exception spelling

Signed-off-by: Antonio Fernandez Alhambra <antonio.alhambra@hivemq.com>

This branch has not been deployed

No deployments
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.

license-mapping.json maps classpath-exception license names to the deprecated SPDX id GPL-2.0-with-classpath-exception

1 participant