Skip to content

Commit 66980cb

Browse files
committed
Read Felix ConfigAdmin configuration files with latest version (1.9.14), but write it using the old file format form ConfigAdmin 1.8.4 to support AEM 6.1 and below.
1 parent fd32bd1 commit 66980cb

3 files changed

Lines changed: 8 additions & 14 deletions

File tree

changes.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
aem-contentpackage-properties plugin: Also support "jar" file extension for AEM content packages (but only when explicitly defined as post processor).
2929
</action>
3030
<action type="update" dev="sseifert">
31-
Update dependencies.
31+
Read Felix ConfigAdmin configuration files with latest version (1.9.14), but write it using the old file format form ConfigAdmin 1.8.4 to support AEM 6.1 and below.
3232
</action>
3333
</release>
3434

conga-aem-plugin/pom.xml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<dependency>
6161
<groupId>io.wcm.devops.conga.plugins</groupId>
6262
<artifactId>io.wcm.devops.conga.plugins.sling</artifactId>
63-
<version>1.2.4</version>
63+
<version>1.2.5-SNAPSHOT</version>
6464
<scope>compile</scope>
6565
</dependency>
6666

@@ -77,12 +77,6 @@
7777
<scope>compile</scope>
7878
</dependency>
7979

80-
<dependency>
81-
<groupId>org.apache.commons</groupId>
82-
<artifactId>commons-lang3</artifactId>
83-
<version>3.7</version>
84-
<scope>compile</scope>
85-
</dependency>
8680
<dependency>
8781
<groupId>com.day.commons</groupId>
8882
<artifactId>day-commons-any</artifactId>
@@ -106,7 +100,7 @@
106100
<dependency>
107101
<groupId>org.apache.sling</groupId>
108102
<artifactId>org.apache.sling.jcr.contentparser</artifactId>
109-
<version>1.2.4</version>
103+
<version>1.2.6</version>
110104
<scope>compile</scope>
111105
<exclusions>
112106
<exclusion>
@@ -149,19 +143,19 @@
149143
<dependency>
150144
<groupId>org.xmlunit</groupId>
151145
<artifactId>xmlunit-core</artifactId>
152-
<version>2.6.0</version>
146+
<version>2.6.2</version>
153147
<scope>test</scope>
154148
</dependency>
155149
<dependency>
156150
<groupId>org.xmlunit</groupId>
157151
<artifactId>xmlunit-legacy</artifactId>
158-
<version>2.6.0</version>
152+
<version>2.6.2</version>
159153
<scope>test</scope>
160154
</dependency>
161155
<dependency>
162156
<groupId>org.zeroturnaround</groupId>
163157
<artifactId>zt-zip</artifactId>
164-
<version>1.12</version>
158+
<version>1.13</version>
165159
<scope>test</scope>
166160
</dependency>
167161

conga-aem-plugin/src/main/java/io/wcm/devops/conga/plugins/aem/postprocessor/ContentPackageOsgiConfigPostProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636

3737
import org.apache.commons.io.FilenameUtils;
3838
import org.apache.commons.lang3.StringUtils;
39-
import org.apache.felix.cm.file.ConfigurationHandler;
4039
import org.apache.sling.provisioning.model.Model;
4140
import org.slf4j.Logger;
4241

@@ -50,6 +49,7 @@
5049
import io.wcm.devops.conga.generator.spi.context.PostProcessorContext;
5150
import io.wcm.devops.conga.plugins.aem.util.ContentPackageUtil;
5251
import io.wcm.devops.conga.plugins.sling.util.ConfigConsumer;
52+
import io.wcm.devops.conga.plugins.sling.util.OsgiConfigUtil;
5353
import io.wcm.devops.conga.plugins.sling.util.ProvisioningUtil;
5454
import io.wcm.tooling.commons.contentpackagebuilder.ContentPackage;
5555
import io.wcm.tooling.commons.contentpackagebuilder.ContentPackageBuilder;
@@ -139,7 +139,7 @@ public Void accept(String path, Dictionary<String, Object> properties) throws IO
139139
// write configuration to temporary file
140140
File tempFile = File.createTempFile(NAME, ".config");
141141
try (OutputStream os = new FileOutputStream(tempFile)) {
142-
ConfigurationHandler.write(os, properties);
142+
OsgiConfigUtil.write(os, properties);
143143
}
144144
try {
145145
FileContext tempFileContext = new FileContext().file(tempFile).charset(StandardCharsets.UTF_8);

0 commit comments

Comments
 (0)