From: Mathieu Baudier Date: Wed, 22 Mar 2023 05:19:14 +0000 (+0100) Subject: Load common properties when merging X-Git-Tag: v2.3.5~26 X-Git-Url: https://git.argeo.org/?a=commitdiff_plain;h=6c0e011bdddc156221a8dfc3bba979446e08deea;p=cc0%2Fargeo-build.git Load common properties when merging --- diff --git a/src/org/argeo/build/Repackage.java b/src/org/argeo/build/Repackage.java index 1ed01ad..6cfd3d4 100644 --- a/src/org/argeo/build/Repackage.java +++ b/src/org/argeo/build/Repackage.java @@ -453,13 +453,20 @@ public class Repackage { Path targetCategoryBase = a2Base.resolve(category); Properties mergeProps = new Properties(); + // first, load common properties + Path commonBnd = duDir.resolve(COMMON_BND); + if (Files.exists(commonBnd)) + try (InputStream in = Files.newInputStream(commonBnd)) { + mergeProps.load(in); + } + // then, the merge properties themselves try (InputStream in = Files.newInputStream(mergeBnd)) { mergeProps.load(in); } String m2Version = mergeProps.getProperty(ARGEO_ORIGIN_M2.toString()); if (m2Version == null) { - logger.log(WARNING, "Ignoring " + duDir + " as it is not an M2-based distribution unit"); + logger.log(WARNING, "Ignoring merging in " + duDir + " as it is not an M2-based distribution unit"); return;// ignore, this is probably an Eclipse archive } if (!m2Version.startsWith(":")) {