Skip to content
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

Java 21 support, cyclonedx-maven-plugin:2.7.5 #1144

Open
D068130 opened this issue Oct 16, 2024 · 7 comments
Open

Java 21 support, cyclonedx-maven-plugin:2.7.5 #1144

D068130 opened this issue Oct 16, 2024 · 7 comments

Comments

@D068130
Copy link

D068130 commented Oct 16, 2024

cmd = "mvn org.cyclonedx:cyclonedx-maven-plugin:2.7.5:makeAggregateBom " +

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

@yutaoj
Copy link
Collaborator

yutaoj commented Nov 4, 2024

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

@D068130
Copy link
Author

D068130 commented Nov 4, 2024

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

image

@yutaoj
Copy link
Collaborator

yutaoj commented Nov 5, 2024

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

@D068130
Copy link
Author

D068130 commented Nov 5, 2024

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

@yutaoj
Copy link
Collaborator

yutaoj commented Nov 6, 2024

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

@D068130
Copy link
Author

D068130 commented Nov 7, 2024

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?

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

No branches or pull requests

2 participants