-
Notifications
You must be signed in to change notification settings - Fork 70
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
Dependency Tree Exclusions for RDF/Tag parsing #145
Comments
opencsv, mustache, and jgit (which adds the dependencies on jsch and javaEWAH) are used by the LicenseRDFaGenerator which is a tool that generates the license metadata for the website spdx.org/licenses. There is also a tool that converts SPDX files to an HTML format which uses Mustache. I tried removing the XML API's and the only compile time issue was with the LicenseXmlDocument which is only used by the LicenseRDFaGenerator. Some of your exclusions relate to Jena which is used to manage the RDF representation. My guess is that the exclusions you are using would only affect certain formats which are not currently used by any of the SPDX tools (e.g. JSON-LD). The one exclusion I'm not sure about is libthrift. That is used by Jena - for which purpose I am not sure. I have been thinking about refactoring the SPDX tools into 2 separate repositories - one containing the library and one with separate tools. Based on the information collected above on the dependencies, it may be worthwhile splitting the LicenseRDFaGenerator into a separate repo. As far as I know, this tool is only used by the SPDX legal team. |
Update - I'm working on de-tangling the LicenseRDFaGenerator from the rest of the library and I was able to remove jgit and xml-apis. It turns out opencsv is used by some HTML tools (which should not impact the license conversion) and openCSV is used by the spreadsheet tools (again, should not impact the license conversion). |
…DFa (#158) * Read standard licenses in JSON-LD format and remove dependencies on RDFa. Fixes issue #90, issue #146 and issue #145 Signed-off-by: Gary O'Neall <gary@sourceauditor.com> * Update URL for listed licenses to the released license list Signed-off-by: Gary O'Neall <gary@sourceauditor.com> * Fix unit test failures - cached listed license was being modified. Resolved by cloning the returned license from get license by ID Signed-off-by: Gary O'Neall <gary@sourceauditor.com> * Update the path the license list to the released license list files Signed-off-by: Gary O'Neall <gary@sourceauditor.com>
@stevespringett - I just removed the dependency on the RDFa library in version 2.1.12. Does this resolve this issue or is there more we could do? |
Big thanks @goneall. The removal of the unnecessary dependencies and generation code is greatly appreciated. As of 2.1.12, the dependency tree now looks like:
BTW, OWASP Dependency-Track incorporates this library (2.1.7 in the current release and 2.1.12 in the current development branch) for its SPDX support. Closing issue. |
…DFa (#158) * Read standard licenses in JSON-LD format and remove dependencies on RDFa. Fixes issue #90, issue #146 and issue #145 Signed-off-by: Gary O'Neall <gary@sourceauditor.com> * Update URL for listed licenses to the released license list Signed-off-by: Gary O'Neall <gary@sourceauditor.com> * Fix unit test failures - cached listed license was being modified. Resolved by cloning the returned license from get license by ID Signed-off-by: Gary O'Neall <gary@sourceauditor.com> * Update the path the license list to the released license list files Signed-off-by: Gary O'Neall <gary@sourceauditor.com>
As an observation, the dependency tree for v2.1.7 looks like:
When attempting to use SPDX tools simply as a way to parse SPDX Tag and RDF documents, there are many dependencies included in the parent project that are never used.
I've been attempting to omit them from my project, as many of them are old or conflict with other dependencies in my project. The POM excerpt reads:
With this configuration, I'm able to properly parse RDF and Tag 2.0 and 2.1 examples in this repo.
I don't know if this config will cause issues if other (potentially more complex) RDF or Tag documents are parsed. Thoughts?
Also, it would really be nice to have the exact exclusions documented somewhere.
The text was updated successfully, but these errors were encountered: