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

Generate XML SBOM #4075

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Generate XML SBOM #4075

wants to merge 2 commits into from

Conversation

Haroon-Khel
Copy link
Contributor

Changing the hardcoded --jsonFile flag to --xmlFile in sbom.sh should command TemurinGenSBOM.java to generate an XML file instead of a json. And then I just changed any json variable name to xml to clear any confusion

@Haroon-Khel
Copy link
Contributor Author

This pr depends on the discussion in #4061 (comment)

@Haroon-Khel
Copy link
Contributor Author

The errors in the workflow checks suggest we are missing a dependency when using the XML generator

BUILD SUCCESSFUL
Total time: 2 seconds
OpenJDK SBOM will be /home/jenkins/workspace/target/OpenJDK-sbom.json.
Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/stax2/ri/Stax2WriterAdapter
	at com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.<init>(ToXmlGenerator.java:276)
	at com.fasterxml.jackson.dataformat.xml.XmlFactory.createGenerator(XmlFactory.java:527)
	at com.fasterxml.jackson.dataformat.xml.XmlFactory.createGenerator(XmlFactory.java:30)

@andrew-m-leonard
Copy link
Contributor

The errors in the workflow checks suggest we are missing a dependency when using the XML generator

BUILD SUCCESSFUL
Total time: 2 seconds
OpenJDK SBOM will be /home/jenkins/workspace/target/OpenJDK-sbom.json.
Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/stax2/ri/Stax2WriterAdapter
	at com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.<init>(ToXmlGenerator.java:276)
	at com.fasterxml.jackson.dataformat.xml.XmlFactory.createGenerator(XmlFactory.java:527)
	at com.fasterxml.jackson.dataformat.xml.XmlFactory.createGenerator(XmlFactory.java:30)

This is fixed by this PR: #4077

@andrew-m-leonard
Copy link
Contributor

Thanks for trying this @Haroon-Khel
as you say this work is dependent on discussion #4061 (comment)
also fix: CycloneDX/cyclonedx-core-java#562

Copy link
Contributor

@andrew-m-leonard andrew-m-leonard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs resolution of: CycloneDX/cyclonedx-core-java#562
and discussion on moving to XML: #4061 (comment)

karianna
karianna previously approved these changes Dec 7, 2024
@karianna karianna dismissed their stale review December 7, 2024 23:59

Missed comments on upstream fix

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

Successfully merging this pull request may close these issues.

3 participants