Skip to content

Conversation

@mr-zepol
Copy link
Contributor

@mr-zepol mr-zepol commented Jul 6, 2023

This PR has changed for the deprecation of tools, I had to introduce different Deserializers to make it work correctly since I had to deserialize the Metadata to make sure only the right info was loaded based on the schema definition.

Tools still have precedence over components/services if it's present.

@mr-zepol mr-zepol force-pushed the 1.5_deprecate_tools branch from 09a627d to 728f900 Compare July 6, 2023 17:16
@mr-zepol mr-zepol force-pushed the 1.5_deprecate_tools branch 2 times, most recently from 0e15639 to 5df8407 Compare July 14, 2023 23:14
@sonatype-lift
Copy link

sonatype-lift bot commented Jul 15, 2023

🛠 Lift Auto-fix

Some of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.1

# Download the patch
curl https://lift.sonatype.com/api/patch/github.com/CycloneDX/cyclonedx-core-java/316.diff -o lift-autofixes.diff

# Apply the patch with git
git apply lift-autofixes.diff

# Review the changes
git diff

Want it all in a single command? Open a terminal in your project's directory and copy and paste the following command:

curl https://lift.sonatype.com/api/patch/github.com/CycloneDX/cyclonedx-core-java/316.diff | git apply

Once you're satisfied, commit and push your changes in your project.

Footnotes

  1. You can preview the patch by opening the patch URL in the browser.

@mr-zepol mr-zepol force-pushed the 1.5_deprecate_tools branch 3 times, most recently from 336a9e7 to 2dcef05 Compare July 15, 2023 16:02
@mr-zepol mr-zepol force-pushed the 1.5_support branch 2 times, most recently from 1cbce5c to a08c5a4 Compare July 15, 2023 16:05
@mr-zepol mr-zepol force-pushed the 1.5_deprecate_tools branch 3 times, most recently from 00f64c4 to f402906 Compare July 15, 2023 18:02
mr-zepol added 11 commits July 15, 2023 20:04
Signed-off-by: Alex Alzate <[email protected]>
Signed-off-by: Alex Alzate <[email protected]>
Signed-off-by: Alex Alzate <[email protected]>
Signed-off-by: Alex Alzate <[email protected]>
Signed-off-by: Alex Alzate <[email protected]>
Signed-off-by: Alex Alzate <[email protected]>
Signed-off-by: Alex Alzate <[email protected]>
Signed-off-by: Alex Alzate <[email protected]>
Signed-off-by: Alex Alzate <[email protected]>
mr-zepol added 6 commits July 15, 2023 20:04
Signed-off-by: Alex Alzate <[email protected]>
Signed-off-by: Alex Alzate <[email protected]>
Signed-off-by: Alex Alzate <[email protected]>
Signed-off-by: Alex Alzate <[email protected]>
@mr-zepol mr-zepol force-pushed the 1.5_deprecate_tools branch from f402906 to ab72ef0 Compare July 16, 2023 01:04
@mr-zepol mr-zepol merged commit bb6b3cb into 1.5_support Jul 19, 2023
mr-zepol added a commit that referenced this pull request Sep 4, 2023
sschuberth pushed a commit to oss-review-toolkit/ort that referenced this pull request Oct 4, 2023
This deprecates the `Tool` class in favor of `ToolInformation`, see [1].

[1]: CycloneDX/cyclonedx-core-java#316
@sschuberth
Copy link
Contributor

For the record, the deprecation of the Tool class is a bit of a problem for code that wants / needs to write out spec 1.4 compliant SBOMs without using any non-deprecated code (e.g. due to project policies). Is there a way around that?

@stevespringett
Copy link
Member

@sschuberth Java doesn't distinguish between specification vs implementation deprecation. A field/method is either deprecated or its not. In the case of the specification, the use of tools is deprecated and will be removed in CycloneDX v2.0, therefore we've deprecated the implementation supporting it.

You may want to experiment, but it may be possible to write out 1.4 BOMs via reflection, rather than calling the methods directly. This may work around the deprecation warnings, but I'm not entirely sure.

sschuberth pushed a commit to oss-review-toolkit/ort that referenced this pull request Oct 17, 2023
This deprecates the `Tool` class in favor of `ToolInformation`, see [1].

[1]: CycloneDX/cyclonedx-core-java#316
sschuberth pushed a commit to oss-review-toolkit/ort that referenced this pull request Oct 17, 2023
This deprecates the `Tool` class in favor of `ToolInformation`, see [1].

[1]: CycloneDX/cyclonedx-core-java#316
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.

4 participants