Use new versioning feature
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1221657 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index 3f5709f..b2a10b7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -76,7 +76,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.installer.core</artifactId>
- <version>3.1.2</version>
+ <version>3.2.3-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
diff --git a/src/main/java/org/apache/sling/installer/factories/deploypck/impl/DeploymentPackageInstaller.java b/src/main/java/org/apache/sling/installer/factories/deploypck/impl/DeploymentPackageInstaller.java
index 934b18f..fee1b96 100644
--- a/src/main/java/org/apache/sling/installer/factories/deploypck/impl/DeploymentPackageInstaller.java
+++ b/src/main/java/org/apache/sling/installer/factories/deploypck/impl/DeploymentPackageInstaller.java
@@ -32,6 +32,7 @@
import org.apache.sling.installer.api.tasks.ResourceTransformer;
import org.apache.sling.installer.api.tasks.TaskResourceGroup;
import org.apache.sling.installer.api.tasks.TransformationResult;
+import org.osgi.framework.Version;
import org.osgi.service.deploymentadmin.DeploymentAdmin;
/**
@@ -67,10 +68,10 @@
if (v != null) {
final Map<String, Object> attr = new HashMap<String, Object>();
attr.put(DEPLOYMENTPACKAGE_SYMBOLICMAME, sn);
- attr.put(DEPLOYMENTPACKAGE_VERSION, v.toString());
final TransformationResult tr = new TransformationResult();
tr.setId(sn);
+ tr.setVersion(new Version(v));
tr.setResourceType(TYPE_DP);
tr.setAttributes(attr);
@@ -105,12 +106,12 @@
if (jis != null) {
try {
jis.close();
- } catch (IOException ignore) {
+ } catch (final IOException ignore) {
}
} else {
try {
ins.close();
- } catch (IOException ignore) {
+ } catch (final IOException ignore) {
}
}
}