Skip to content

Commit

Permalink
Change logging for license list I/O error
Browse files Browse the repository at this point in the history
Changes the logging level from error to warn if the license list can not
be accessed over the network.  The logic being that the impact is not
substantial since you may only be referencing a stale version of the
license list rather than the most recent.

The warning message was also enhanced to point to the
useJARLicenseInfoOnly property.

Reference related issue
spdx/spdx-maven-plugin#172
  • Loading branch information
goneall committed Dec 12, 2024
1 parent f321b13 commit 657a4e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/spdx/library/ListedLicenses.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ private void initializeLicenseModelStore() {
try {
baseModelStore = new SpdxListedLicenseWebStore();
} catch(InvalidSPDXAnalysisException ex) {
logger.error("Unable to access the most current listed licenses from https://spdx.org/licenses - using locally cached licenses: "+ex.getMessage());
logger.warn("Unable to access the most current listed licenses from https://spdx.org/licenses - using locally cached licenses: "+ex.getMessage()+
" Note: you can set the org.spdx.useJARLicenseInfoOnly property to true to avoid this warning.");
baseModelStore = null;
}
}
Expand Down

0 comments on commit 657a4e6

Please sign in to comment.