Skip to content

change *-cyclonedx.xml/json to *.cdx.xml/json #658

Open

Description

@slawekjaranowski

According to specifications generated files should end with *.cdx.json, *.cdx.xml

https://cyclonedx.org/specification/overview/#recognized-file-patterns

Activity

  1. slawekjaranowski commented on Jun 21, 2026

    @slawekjaranowski
    Author

    Maybe easier will be add next pattern to specification, such some of tool can follow specification and don't recognize *-cyclonedx.json as BOMs, like:

  2. hboutemy commented on Jun 21, 2026

    @hboutemy
    Contributor

    to me, it's a matter of taste, no taste matches everybody...
    this -cyclonedx.xml choice was done very early in the project, before this .cdx.json idea existed: as usual, early adopters are hit by new conventions

    but we can discuss that for next major release, if you wish: I don't know how @stevespringett feels about changing that after so many years

  3. ppkarwasz commented on Aug 25, 2026

    @ppkarwasz
    Contributor

    I would rather set the default type to cdx.json and cdx.xml to:

    • Align this plugin with what the SPDX plugin does,
    • Have SBOMs use the same classifier as the artifact they describe.

    If a module produces both a normal artifact and one with the shaded classifier, their SBOM should slightly differ.

  4. hboutemy commented on Aug 28, 2026

    @hboutemy
    Contributor

    I would rather set the default type

    type?
    I fear you're mixing Maven concepts: type is for dependency type, when an artifact has to be declared as a dependency
    FTR: one doc that shows correspondence from dependency type to default classifier and extension https://maven.apache.org/ref/3.9.16/maven-core/artifact-handlers.html

    but now I get that current *-cyclonedx.xml and *-cyclonedx.json file names, which means classifier=cyclonedx + extension=xml or json

    would be replaced by *.cdx.xml and *.cdx.json file names, which means no classifier, but extension= cdx.xml or cdx.json

    = the Maven description of what Slawek proposed
    by default, no classifier, just extension
    and if someone wants another SBOM to be attached in addition, yes, they can define a classifier and keep the same extensions

    In the plugin https://cyclonedx.github.io/cyclonedx-maven-plugin/makeBom-mojo.html
    this would change the default classifier value from cyclonedx to empty
    and the outputFormat values would change the extensions: xml format would trigger cdx.xml extensions, etc...

    feasible: just need to choose to change
    @stevespringett WDYT? is it time for CycloneDX Maven Plugin to change to newer conventions?

  5. hboutemy commented on Aug 28, 2026

    @hboutemy
    Contributor

    now I get that title is wrong: doing *.cdx.xml is not changing classifier, but changing extension...
    I'll update the issue description

  6. changed the title [-]Set default classifier as `cdx`[/-] [+]change `*-cyclonedx.xml`/`json` to `*.cdx.xml`/`json`[/+] on Aug 28, 2026
  7. hboutemy commented on Aug 28, 2026

    @hboutemy
    Contributor

    and to be more complete:
    this does not change the fact that default file generated locally are named target/bom.xml/json, as still recommended in https://cyclonedx.org/specification/overview/#recognized-file-patterns

    what we are talking here is the file names when stored in a remote Maven repository, where these notions of classifier, extension and dependency type are meaningful

  8. slawekjaranowski commented on Aug 28, 2026

    @slawekjaranowski
    Author
  9. hboutemy commented on Aug 28, 2026

    @hboutemy
    Contributor

    My proposition was to change default classifier from cyclonedx to cdx

    produced artifacts will match pattern: *.cdx.json/xml

    no: if you change classifier only, you'll get *-cdx.json|xml

  10. slawekjaranowski commented on Aug 28, 2026

    @slawekjaranowski
    Author

    My proposition was to change default classifier from cyclonedx to cdx

    produced artifacts will match pattern: *.cdx.json/xml

    no: if you change classifier only, you'll get *-cdx.json|xml

    You are right, my mistake

  11. ppkarwasz commented on Aug 29, 2026

    @ppkarwasz
    Contributor

    type?

    Sorry, I meant extension. Thank you for the correction.

  12. slawekjaranowski commented on Sep 5, 2026

    @slawekjaranowski
    Author

    With more testing .... changing classifier to empty will produce more complication, as we need classifier to produce additional checksum
    checkusm plugin requires classifier ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions