Deal with jars without symbolic name
[cc0/argeo-build.git] / src / org / argeo / build / Repackage.java
index f0d048c988702cac6b67aa5874813b5af1215096..442e7e0d40952d979e5432a0499fc2ec86eb2e4c 100644 (file)
@@ -934,6 +934,8 @@ public class Repackage {
                                                                        map.put(key.toString(), commonProps.getProperty(key.toString()));
                                                                A2Origin origin = new A2Origin();
                                                                Path bundleDir = processBundleJar(file, targetCategoryBase, map, origin);
+                                                               if (bundleDir == null)
+                                                                       return FileVisitResult.CONTINUE;
                                                                origins.put(bundleDir, origin);
                                                                logger.log(DEBUG, () -> "Processed " + file);
                                                        }
@@ -1039,6 +1041,10 @@ public class Repackage {
                                nameVersion = new NameVersion(ourSymbolicName, ourVersion);
                        } else {
                                nameVersion = nameVersionFromManifest(manifest);
+                               if (nameVersion == null) {
+                                       logger.log(WARNING, file + " has no symbolic name, skipping...");
+                                       return null;
+                               }
                                if (ourVersion != null && !nameVersion.getVersion().equals(ourVersion)) {
                                        logger.log(WARNING,
                                                        "Original version is " + nameVersion.getVersion() + " while new version is " + ourVersion);