Open D068130 opened 1 month ago
Hello @D068130 , Could you please provide more detailed information? This will help me identify the specific error you're encountering. I've noticed that my simple Java application, which is running on openjdk version "21.0.4" 2024-07-16 LTS, is not throwing any error messages. thanks Yutao
Hi yutaoj,
did you make sure that you configured in your setup that the sbom will be built?
The actual error we get is:
error mtaBuild - [ERROR] Failed to execute goal org.cyclonedx:cyclonedx-maven-plugin:2.7.5:makeAggregateBom (default-cli) on project ts-reader: Execution default-cli of goal org.cyclonedx:cyclonedx-maven-plugin:2.7.5:makeAggregateBom failed: Unsupported class file major version 65 -> [Help 1]
Which for me means the version of the plugin does not support Java21
Hi Hendrik,
Thank you for your input , I got the info "Unsupported class file major version 65", which indicate the jdk Compatibility. Could you please provide additional details, such as the operating system, Maven version, and whether you are using Oracle JDK? This information will be crucial for me to reproduce and address this issue effectively.
Thanks Yutao
Hi yutaoj, we are using azure pipelines and piper with the parameters for the mta build as follows:
mtaBuild:
mtaBuildTool: cloudMbt
mtarGroup: 'com.sap.hyperspace'
dockerImage: 'devxci/mbtci-java21-node20'
createBOM: true
https://github.wdf.sap.corp/pages/ContinuousDelivery/piper-doc/steps/mtaBuild/#overview-step
Hi Hendrik,
I can't reproduce this error with my java/maven case in docker image "devxci/mbtci-java21-node20" , I will continue look into this issue .
thanks Yutao
I think I just found the issue. When trying it for another repository, which is actually a multi module project, it works just fine.
But then I tried it for the repository ts-reader for which I also get the error in the pipeline. It is not a multi module project, but it still tries to call: cyclonedx-maven-plugin:2.7.5:makeAggregateBom
but for a single module project it is supposed to call cyclonedx-maven-plugin:2.7.5:makeBom
Can it be that you always use the makeAggregateBom command? And do not differ between aggregate and non aggregate maven projects?
https://github.com/SAP/cloud-mta-build-tool/blob/c06513ea64d7bda42219103b5e8b7f2c67372360/internal/commands/commands.go#L356
In the line linked above you use the command: mvn org.cyclonedx:cyclonedx-maven-plugin:2.7.5:makeAggregateBo ....
The version 2.7.5 does not support Java 21 as far as I could see. Could you please update that to the newest version of the plugin?
Kind regards Hendrik