diff --git a/changes.xml b/changes.xml
index a9d3c192..557baa85 100644
--- a/changes.xml
+++ b/changes.xml
@@ -23,6 +23,12 @@
xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 https://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd">
+
+
+ ContentPackageOsgiConfigPostProcessor: Write OSGi configurations as .cfg.json files instead of .config files.
+
+
+
Update to latest io.wcm.tooling.commons.content-package-builder to fix potential problem with element ordering content packages generated from JSON files.
diff --git a/conga-aem-plugin/pom.xml b/conga-aem-plugin/pom.xml
index 8b53ce13..c040edc6 100644
--- a/conga-aem-plugin/pom.xml
+++ b/conga-aem-plugin/pom.xml
@@ -25,13 +25,13 @@
io.wcm.devops.conga.plugins
io.wcm.devops.conga.plugins.aem.parent
- 2.19.11-SNAPSHOT
+ 2.20.0-SNAPSHOT
../parent/pom.xml
io.wcm.devops.conga.plugins
io.wcm.devops.conga.plugins.aem
- 2.19.11-SNAPSHOT
+ 2.20.0-SNAPSHOT
jar
CONGA AEM Plugin
diff --git a/conga-aem-plugin/src/main/java/io/wcm/devops/conga/plugins/aem/postprocessor/ContentPackageOsgiConfigPostProcessor.java b/conga-aem-plugin/src/main/java/io/wcm/devops/conga/plugins/aem/postprocessor/ContentPackageOsgiConfigPostProcessor.java
index 90869484..4f84efd8 100644
--- a/conga-aem-plugin/src/main/java/io/wcm/devops/conga/plugins/aem/postprocessor/ContentPackageOsgiConfigPostProcessor.java
+++ b/conga-aem-plugin/src/main/java/io/wcm/devops/conga/plugins/aem/postprocessor/ContentPackageOsgiConfigPostProcessor.java
@@ -151,7 +151,7 @@ public Void accept(String path, Dictionary properties) throws IO
context.getLogger().info(" Include " + contentPath);
// write configuration to temporary file
- File tempFile = File.createTempFile(NAME, ".config");
+ File tempFile = File.createTempFile(NAME, ".cfg.json");
try (OutputStream os = new FileOutputStream(tempFile)) {
OsgiConfigUtil.write(os, properties);
}
diff --git a/conga-aem-plugin/src/test/java/io/wcm/devops/conga/plugins/aem/postprocessor/ContentPackageOsgiConfigPostProcessorTest.java b/conga-aem-plugin/src/test/java/io/wcm/devops/conga/plugins/aem/postprocessor/ContentPackageOsgiConfigPostProcessorTest.java
index f9e4dd45..8c1d578c 100644
--- a/conga-aem-plugin/src/test/java/io/wcm/devops/conga/plugins/aem/postprocessor/ContentPackageOsgiConfigPostProcessorTest.java
+++ b/conga-aem-plugin/src/test/java/io/wcm/devops/conga/plugins/aem/postprocessor/ContentPackageOsgiConfigPostProcessorTest.java
@@ -34,14 +34,14 @@
import java.io.ByteArrayInputStream;
import java.io.File;
-import java.io.IOException;
import java.io.InputStream;
+import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.Dictionary;
import java.util.Map;
import org.apache.commons.io.FileUtils;
-import org.apache.felix.cm.file.ConfigurationHandler;
+import org.apache.felix.cm.json.io.Configurations;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.slf4j.LoggerFactory;
@@ -103,24 +103,9 @@ void testPostProcess() throws Exception {
File zipFile = new File(target, "test.zip");
assertTrue(zipFile.exists());
- try (InputStream is = new ByteArrayInputStream(getDataFromZip(zipFile, "jcr_root/apps/test/config/my.pid.config"))) {
-
- // check for initial comment line
- is.mark(256);
- final int firstChar = is.read();
- if (firstChar == '#') {
- int b;
- while ((b = is.read()) != '\n') {
- if (b == -1) {
- throw new IOException("Unable to read configuration.");
- }
- }
- }
- else {
- is.reset();
- }
-
- Dictionary, ?> config = ConfigurationHandler.read(is);
+ try (InputStream is = new ByteArrayInputStream(getDataFromZip(zipFile, "jcr_root/apps/test/config/my.pid.cfg.json"));
+ InputStreamReader reader = new InputStreamReader(is, StandardCharsets.UTF_8)) {
+ Dictionary, ?> config = Configurations.buildReader().build(reader).readConfiguration();
assertEquals("value1", config.get("stringProperty"));
assertArrayEquals(new String[] {
"v1", "v2", "v3"
@@ -129,9 +114,9 @@ void testPostProcess() throws Exception {
assertEquals(999999999999L, config.get("longProperty"));
}
- assertTrue(ZipUtil.containsEntry(zipFile, "jcr_root/apps/test/config/my.factory-my.pid.config"));
- assertTrue(ZipUtil.containsEntry(zipFile, "jcr_root/apps/test/config.mode1/my.factory-my.pid2.config"));
- assertTrue(ZipUtil.containsEntry(zipFile, "jcr_root/apps/test/config.mode2/my.pid2.config"));
+ assertTrue(ZipUtil.containsEntry(zipFile, "jcr_root/apps/test/config/my.factory-my.pid.cfg.json"));
+ assertTrue(ZipUtil.containsEntry(zipFile, "jcr_root/apps/test/config.mode1/my.factory-my.pid2.cfg.json"));
+ assertTrue(ZipUtil.containsEntry(zipFile, "jcr_root/apps/test/config.mode2/my.pid2.cfg.json"));
Document filterXml = getXmlFromZip(zipFile, "META-INF/vault/filter.xml");
assertXpathEvaluatesTo("/apps/test/config", "/workspaceFilter/filter[1]/@root", filterXml);
diff --git a/parent/pom.xml b/parent/pom.xml
index 0151a881..2838049f 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -31,7 +31,7 @@
io.wcm.devops.conga.plugins
io.wcm.devops.conga.plugins.aem.parent
- 2.19.11-SNAPSHOT
+ 2.20.0-SNAPSHOT
pom
CONGA AEM Plugin
@@ -57,18 +57,18 @@
io.wcm.devops.conga
io.wcm.devops.conga.generator
- 1.16.4
+ 1.16.5-SNAPSHOT
io.wcm.devops.conga
conga-maven-plugin
- 1.16.4
+ 1.16.5-SNAPSHOT
io.wcm.devops.conga.plugins
io.wcm.devops.conga.plugins.sling
- 1.3.4
+ 1.4.0-SNAPSHOT
diff --git a/pom.xml b/pom.xml
index e166d2ed..12f83fa2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,13 +23,13 @@
io.wcm.devops.conga.plugins
io.wcm.devops.conga.plugins.aem.parent
- 2.19.11-SNAPSHOT
+ 2.20.0-SNAPSHOT
parent/pom.xml
io.wcm.devops.conga.plugins
io.wcm.devops.conga.plugins.aem.root
- 2.19.11-SNAPSHOT
+ 2.20.0-SNAPSHOT
pom
CONGA AEM Plugin
diff --git a/tooling/conga-aem-crypto-cli/pom.xml b/tooling/conga-aem-crypto-cli/pom.xml
index d52d76a4..de5a507b 100644
--- a/tooling/conga-aem-crypto-cli/pom.xml
+++ b/tooling/conga-aem-crypto-cli/pom.xml
@@ -25,14 +25,14 @@
io.wcm.devops.conga.plugins
io.wcm.devops.conga.plugins.aem.parent
- 2.19.11-SNAPSHOT
+ 2.20.0-SNAPSHOT
../../parent/pom.xml
io.wcm.devops.conga.plugins
conga-aem-crypto-cli
jar
- 2.19.11-SNAPSHOT
+ 2.20.0-SNAPSHOT
CONGA AEM Crypto Command Line Interface
Command line tool to generate Crypto keys for AEM.
@@ -42,7 +42,7 @@
io.wcm.devops.conga.plugins
io.wcm.devops.conga.plugins.aem
- 2.19.11-SNAPSHOT
+ 2.20.0-SNAPSHOT
compile
diff --git a/tooling/conga-aem-maven-plugin/pom.xml b/tooling/conga-aem-maven-plugin/pom.xml
index 5d07628b..735509ba 100644
--- a/tooling/conga-aem-maven-plugin/pom.xml
+++ b/tooling/conga-aem-maven-plugin/pom.xml
@@ -25,14 +25,14 @@
io.wcm.devops.conga.plugins
io.wcm.devops.conga.plugins.aem.parent
- 2.19.11-SNAPSHOT
+ 2.20.0-SNAPSHOT
../../parent/pom.xml
io.wcm.devops.conga.plugins
conga-aem-maven-plugin
maven-plugin
- 2.19.11-SNAPSHOT
+ 2.20.0-SNAPSHOT
CONGA AEM Maven Plugin
wcm.io DevOps CONGA - CONfiguration GenerAtor Maven Plugin for AEM
@@ -62,7 +62,7 @@
io.wcm.devops.conga.plugins
io.wcm.devops.conga.plugins.aem
- 2.19.11-SNAPSHOT
+ 2.20.0-SNAPSHOT
compile
diff --git a/tooling/conga-aem-maven-plugin/src/it/example/pom.xml b/tooling/conga-aem-maven-plugin/src/it/example/pom.xml
index cee7d4a8..baacdc75 100644
--- a/tooling/conga-aem-maven-plugin/src/it/example/pom.xml
+++ b/tooling/conga-aem-maven-plugin/src/it/example/pom.xml
@@ -74,7 +74,7 @@
io.wcm.devops.conga
conga-maven-plugin
- 1.16.4
+ 1.16.5-SNAPSHOT
true
diff --git a/tooling/conga-aem-maven-plugin/src/it/mixed-no-package-type/pom.xml b/tooling/conga-aem-maven-plugin/src/it/mixed-no-package-type/pom.xml
index 68f6d954..e93014b9 100644
--- a/tooling/conga-aem-maven-plugin/src/it/mixed-no-package-type/pom.xml
+++ b/tooling/conga-aem-maven-plugin/src/it/mixed-no-package-type/pom.xml
@@ -67,7 +67,7 @@
io.wcm.devops.conga
conga-maven-plugin
- 1.16.4
+ 1.16.5-SNAPSHOT
true
diff --git a/tooling/conga-aem-maven-plugin/src/it/wcmio-archetype-aem65/parent/pom.xml b/tooling/conga-aem-maven-plugin/src/it/wcmio-archetype-aem65/parent/pom.xml
index 03e411cc..9ecdefda 100644
--- a/tooling/conga-aem-maven-plugin/src/it/wcmio-archetype-aem65/parent/pom.xml
+++ b/tooling/conga-aem-maven-plugin/src/it/wcmio-archetype-aem65/parent/pom.xml
@@ -5,7 +5,7 @@
io.wcm.maven
io.wcm.maven.aem-global-parent
- 2.1.12
+ 2.1.15-SNAPSHOT
diff --git a/tooling/conga-aem-maven-plugin/src/it/wcmio-archetype-cloud/parent/pom.xml b/tooling/conga-aem-maven-plugin/src/it/wcmio-archetype-cloud/parent/pom.xml
index ec443de4..0d4f18d9 100644
--- a/tooling/conga-aem-maven-plugin/src/it/wcmio-archetype-cloud/parent/pom.xml
+++ b/tooling/conga-aem-maven-plugin/src/it/wcmio-archetype-cloud/parent/pom.xml
@@ -5,7 +5,7 @@
io.wcm.maven
io.wcm.maven.aem-global-parent
- 2.1.12
+ 2.1.15-SNAPSHOT