- if (spdxLicenseId == null)
- throw new IllegalStateException("An SPDX license id must have beend defined at this stage.");
+ if (spdxLicenseId == null) {
+ if (jarDir.getFileName().toString().startsWith("com.sun.jna"))
+ spdxLicenseId = "Apache-2.0 OR LGPL-2.1";
+ else
+ throw new IllegalStateException(
+ "An SPDX license id must have beend defined for " + jarDir + " at this stage.");
+ }