Change JNA license
[cc0/argeo-build.git] / src / org / argeo / build / Repackage.java
index 2732167646dd830ed8be3036dbe776e4bee713df..e0f3d1d163052bbaf5b89e745041cd467d48d04b 100644 (file)
@@ -1485,8 +1485,13 @@ public class Repackage {
 
                        // license
                        String spdxLicenseId = SPDX_LICENSE_IDENTIFIER.get(mapping);
-                       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 = "LGPL-2.1 OR Apache-2.0";
+                               else
+                                       throw new IllegalStateException(
+                                                       "An SPDX license id must have beend defined for " + jarDir + " at this stage.");
+                       }
                        writer.append("\nIt is redistributed under the following license:\n\n");
                        writer.append("SPDX-Identifier: " + spdxLicenseId + "\n\n");