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

Add support for SPDX Spec version 3 #170

Open
goneall opened this issue Nov 9, 2024 · 3 comments · May be fixed by #171
Open

Add support for SPDX Spec version 3 #170

goneall opened this issue Nov 9, 2024 · 3 comments · May be fixed by #171

Comments

@goneall
Copy link
Member

goneall commented Nov 9, 2024

SPDX Spec version 3.0 is a major upgrade with breaking changes.

The SPDX Java Library has been updated to support spec version 3.0 - also causing some breaking changes.

Since the object model is structurally different, there will have to be significant changes to this plugin if we want to support both 3.0 and previous versions of the spec.

I would propose making the following changes:

  • Add a new supported SPDX format "jsonld" which would result in building SPDX Spec version 3 documents
  • Remove all SPDX model class references from the CreateSpdxMojo class as well as all classes in the org.spdx.maven package. This would localize all the model references to the org.spdx.maven.util package.
  • Create abstract classes for the util builder classes (e.g. SpdxDocumentBuilder) and 2 concrete subclasses - one for the currently supported spec versions and a separate one for the SPDX spec version 3 support. This removes a lot of namespace conflicts and simplifies the logic (e.g. not having a lot of if/else in the individual methods) at the expense of some code duplication. Note: I experimented with modifying the same class and found the code to be way to messy.
  • Update the existing enums in the utils package to support both the SPDX Spec version 2 and SPDX Spec version 3 model enumerations.
@goneall
Copy link
Member Author

goneall commented Nov 9, 2024

@hboutemy @knrc @amCap1712 - As past contributors to this plugin, I would appreciate any feedback on the approach listed above.

I'll start working on a pull request and have something to review within the next few days - any review / feedback / help is much appreciated.

@hboutemy
Copy link
Contributor

@goneall it looks reasonable: I'll try to find this this WE to review what is available and help as much as possible

@goneall goneall linked a pull request Nov 13, 2024 that will close this issue
@goneall
Copy link
Member Author

goneall commented Nov 14, 2024

@goneall it looks reasonable: I'll try to find this this WE to review what is available and help as much as possible

Thanks @hboutemy - I just created a draft PR #171 with the changes. Note it depends on some changes in the SPDX Java Library to compile and some changes in the SPDX Java RDF store to pass the unit tests. Details are in the PR comments.

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 a pull request may close this issue.

2 participants