Open arkajnag23 opened 2 weeks ago
are your trying to exclude a dependency? or a project from the multi-module build as this parameter is about: https://github.com/CycloneDX/cyclonedx-maven-plugin?tab=readme-ov-file#excluding-projects ?
said another way: are you really building a Maven multi-module project that combines multiple groupIds, including com.eventhub
= the modules you want to avoid?
Yes, it is a multi-module maven project. Say the core parent pom has the group id as event-hub and all the child modules follow the same parent group. But each module has its own dependencies which are external libraries. My aim is to exclude all the groups which are internal to the company and only include those which are external or open sourced.
The above example shared in my post was an example group-id, it can be several other dependencies (client libraries) which I want to exclude when running cyclonedx goal.
I don't want to exclude the whole project, then it will ignore or exclude all the dependencies. Only specific group-ids so that all the artifacts falling within that group will be automatically exclude when scanned
oh, I did not expect that one: you have a private multi-module project and want to ship a unique aggregate SBOM that does not list the different (private) modules but only the aggregation of their dependencies? that's it? it's an objective of hiding private internal details, but just share the global (external) dependencies? redacted aggregate SBOM?
we should probably write a sample with 1 parent and 3 modules, and a few dependencies (not many, because we need to keep it simple) we could probably describe actual output of https://github.com/CycloneDX/cyclonedx-maven-plugin/tree/master/src/it/makeAggregateBom and expected redacted output
one question on you use case: are you expecting to do this one day with configuration in pom.xml and run with mvn verify
, or always only on command line mvn -D.... cyclonedx-maven-plugin:makeAggregateBom
? is there a reason for staying with command line approach only?
@hboutemy i have a custom maven goal which internally calls the cyclonedx goals with maven executor plugin where I pass the different parameters. And this goal is invoked by our Jenkins builds and builds are triggered by 45 application teams with their own multi-module project
When I running maven command line with mvn clean org.cyclonedx:cyclonedx-maven-plugin:2.8.1:makeAggregateBom using -DexcludeGroupId or -DexcludeArtifactId doesn't seem to ignore the required artifacts from the final generated SBOMs.
-DexcludeGroupId=com.eventhub didn't ignore the artifact and still available in released SBOM.