Skip to content

Commit 51212ee

Browse files
committed
Fix POM file errors and update the upgrade README
Signed-off-by: Gary O'Neall <gary@sourceauditor.com>
1 parent f43397b commit 51212ee

2 files changed

Lines changed: 38 additions & 1 deletion

File tree

README-V3-UPGRADE.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,30 @@ With the support of SPDX 3.0, several changes have been made to the library code
44
Although we tried to keep breaking changes to a minimum, some of the changes were necessary due to breaking changes in the spec. itself.
55
We also took advantage of the changes to fix some annoying design flaws in the previous implementation of the library.
66

7+
## Classes and Methods moved to SPDX Java Core library
8+
9+
The SPDX Java Core Library is in a separate repository and jar file.
10+
11+
The following classes and methods are moved from `org.spdx.library` to `org.spdx.core`:
12+
13+
- `DefaultModelStore`
14+
- Most exception classes including `InvalidSPDXAnalysisException`
15+
- `ModelCollection`
16+
- `ModelSet`
17+
- `SimpleUriValue`
18+
- `TypedValue`
19+
20+
The packages in `org.spdx.licenseTemplates` are now in the `java-spdx-core` repository.
21+
22+
A new class `LicenseTextHelper` was added and the method `isLicenseTextEquivalent(String, String)` along with many supporting methods were moved to `LicenseTextHelper` from `org.spdx.utility.compare.LicenseCompareHelper`.
23+
24+
## Changes to SPDX version 2 package, class, and method names
25+
To support accessing SPDX 2.X model object while updating the library for SPDX 3.0 support, the package names for the SPDX 2.X model objects are now named `org.spdx.library.model.v2.[package]`.
26+
27+
Many of the class and property names have been changed to append `CompatV2` to clearly designate a compatible object is being referenced.
28+
29+
Also note that the model classes are now stored in a separate repository `spdx-java-model-2_X`.
30+
731
## Changes to ExternalElement and ExternalExtractedLicenseInfo (SPDX Version 2.X classes)
832

933
- Constructors changed to take the document URI for the document containing the external element or license. This is different from the previous constructor which took the document URI of the document containing the reference and an ID of the form `DocumentRef-XX:[ID]` To accomodate compatibility, the constructors
@@ -12,6 +36,19 @@ will check for the old DocumentRef format and attempt a conversion.
1236

1337
Note that this incompatibility was introduced due to using a common mode store API which in some cases will not have the documentUri as a required parameter
1438

39+
## Changes to deserialize interface
40+
Since SPDX documents are not generally required in SPDX spec version 3.0, the SPDX namespace was removed from the return value for deserialized and also removed as a parameter for the serialize method. Serialize will now serialize all objects - which may be multiple SPDX documents.
41+
42+
To find all the SPDX documents in a serialization, you can execute:
43+
44+
```
45+
List<SpdxDocument> docs = (List<SpdxDocument>)SpdxModelFactory.getSpdxObjects(store, null, SpdxConstantsCompatV2.CLASS_SPDX_DOCUMENT, null, null)
46+
.collect(Collectors.toList());
47+
```
48+
after deserialization to get a list of all SPDX documents.
49+
50+
For the RDF store, to keep compatible with the SPDX 2.X requirements, it now only supports a single document namespace.
51+
1552
## Changes to the SPI for the Model Store
1653

1754
### Change propertyName to propertyDescriptor

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@
256256
<configuration>
257257
<quiet>true</quiet>
258258
<notimestamp>true</notimestamp>
259-
<additionalparam>-Xdoclint:none</additionalparam>
259+
<additionalOptions>-Xdoclint:none</additionalOptions>
260260
</configuration>
261261
<executions>
262262
<execution>

0 commit comments

Comments
 (0)