SLING-3850 : Add comments to the OSGi configuration files stored in the repository generated by configuration writeback
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1619762 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index ad648a3..0585b10 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,9 +56,13 @@
<configuration>
<instructions>
<!-- As we're using JCR 2.0 for testing we explicitly have to
- import version 1.0 here -->
+ import version 1.0 here
+ We need at least 3.1.2 as this allows reading comments from a config
+ -->
<Import-Package>
- javax.jcr.*;version=1.0,*
+ javax.jcr.*;version=1.0,
+ org.apache.sling.installer.api;version="[3.1.2,4)",
+ *
</Import-Package>
<Private-Package>org.apache.sling.installer.provider.jcr.impl.*</Private-Package>
<Sling-Nodetypes>SLING-INF/nodetypes/osgiconfig.cnd</Sling-Nodetypes>
@@ -86,8 +90,8 @@
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
- <artifactId>org.apache.sling.installer.api</artifactId>
- <version>1.0.0</version>
+ <artifactId>org.apache.sling.installer.core</artifactId>
+ <version>3.5.3-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java b/src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java
index 3077258..01b1def 100644
--- a/src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java
+++ b/src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java
@@ -874,6 +874,7 @@
// write to a byte array stream
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ baos.write("# Configuration created by Apache Sling JCR Installer\n".getBytes("UTF-8"));
ConfigurationHandler.write(baos, dict);
baos.close();