X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=src%2Forg%2Fargeo%2Fbuild%2FRepackage.java;h=6f5fbf83e9083b250c793fea6adabaa023bc3401;hb=baf1b6abd17ae95937d744cdc903f047f5b3c076;hp=e0f3d1d163052bbaf5b89e745041cd467d48d04b;hpb=c89e00b9d7ebc0e5e447ef0baa53118d2781bdc9;p=cc0%2Fargeo-build.git diff --git a/src/org/argeo/build/Repackage.java b/src/org/argeo/build/Repackage.java index e0f3d1d..6f5fbf8 100644 --- a/src/org/argeo/build/Repackage.java +++ b/src/org/argeo/build/Repackage.java @@ -1045,14 +1045,8 @@ public class Repackage { nameVersion = new NameVersion(ourSymbolicName, ourVersion); } else { nameVersion = nameVersionFromManifest(manifest); - if (nameVersion == null) { - // hack for weird issue with JNA jar in Eclipse - String[] arr_ = file.getFileName().toString().split("_"); - String v = arr_[1].substring(0, arr_[1].length() - 4);// remove .jar - nameVersion = new NameVersion(arr_[0], v); - logger.log(WARNING, file + " has no symbolic name, trying " + nameVersion.getName() + "/" - + nameVersion.getVersion() + " based on its name"); - } + if (nameVersion == null) + throw new IllegalStateException("Could not compute name/version from Manifest"); if (ourVersion != null && !nameVersion.getVersion().equals(ourVersion)) { logger.log(WARNING, "Original version is " + nameVersion.getVersion() + " while new version is " + ourVersion); @@ -1485,13 +1479,8 @@ public class Repackage { // license String spdxLicenseId = SPDX_LICENSE_IDENTIFIER.get(mapping); - 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."); - } + if (spdxLicenseId == null) + throw new IllegalStateException("An SPDX license id must have beend defined at this stage."); writer.append("\nIt is redistributed under the following license:\n\n"); writer.append("SPDX-Identifier: " + spdxLicenseId + "\n\n");