-
-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I generate SBOM in sub-module and get an aggregated SBOM? Regression with makeAggregateBom since 2.7.4 - outputReactorProjects has no effect #403
Comments
sorry, too many commands at the end without clarity between actual vs expected result => I don't get what is working as expected and what is NOT working as expected in a multi-module build, if you don't get expected result, please show what you're getting in a simple to read way (focus only on 2.7.9, eventually show some output of the |
Hi @hboutemy , thx for your answer. Here an example with the same command-line in 2.7.2 and 2.7.9. log_cyclonedx_2.7.2.txt In both cases aggregated BOM is fine but in the 2.7.9, there is no BOM inside target folder of the module "core" and "web". Just like if the " -DoutputReactorProjects " parameter is set to false. This break our process. |
thank you @bed1984 for these output: now I see what was confusing me a lot = you're calling the goal from CLI, not configured in your pom.xml now I can summarise the different behaviour:
with 2.7.2, the aggregator goal invoked by CLI write both aggregated and every project (at the end, not during each module build) with 2.7.9, only the aggregated generation happens:
it rings a bell to me: I'll dig into source updates I did: I remember having changed something (probably thinking build lifecycle bound usage, but not CLI) further analysis coming, please wait... |
I suppose this behaviour change has been introduced in cb36817 for your case, you'd have expected result with:
(and of course, I'd propose even to have the plugin configured in your pom.xml) |
Of course we could configured the plugin inside the pom.xml but in our case the pom.xml are not under our responsibilities and we run the command line inside our CI process to ensure that we have a bom for all released maven module. I will try with the workaround 😉 ( calling the plugin twice ) Thx for your help. Have a nice day. |
I have a multi module maven project which I'd like to create an SBOM on each module and get an Aggregated BOM on the root-folder with cyclonedx-maven-plugin.
When I execute the following command :
I have an Aggregated BOM on the root target folder and also BOM inside each module. That's the expected behavior. In some case, if it's needed, I put the property "outputReactorProjects" to false to only get the aggregated bom on the root target folder.
Since 2.7.4, the property "outputReactorProjects" has no effect and I never get the BOM inside the module if I use the "makeAggregateBom" goal. Just like if the property is set to false ( https://cyclonedx.github.io/cyclonedx-maven-plugin/makeAggregateBom-mojo.html#outputReactorProjects )
Following documenation we can still produced an Aggregated BOM and a BOM inside the sub-module : "makeAggregateBom: creates an aggregate BOM at build root (with dependencies from the whole multi-modules build), and eventually a BOM for each module"
Case reproduced with Maven 3.8.5 and Maven 3.9.0, Plugin version 2.7.4, 2.7.5 and 2.7.9.
I have tried these commands :
---> Root SBOM and Sub-Modules
---> Root SBOM only
---> Root SBOM only
---> Root SBOM only
---> Root SBOM only
The text was updated successfully, but these errors were encountered: