ist-dresden / composum-nodes

Set of Apache Sling / AEM development tools: JCR browser, user and package management and more
https://www.composum.com/home/nodes.html
MIT License
55 stars 21 forks source link

Unable to install a package with a SNAPSHOT version #181

Closed rombert closed 4 years ago

rombert commented 5 years ago

I am trying to install a package via the provisioning model on top of Sling Starter 12-SNAPSHOT. I modified the sling starter in the following manner:

diff --git a/src/main/provisioning/composum.txt b/src/main/provisioning/composum.txt
index b7d6175..56e6a43 100644
--- a/src/main/provisioning/composum.txt
+++ b/src/main/provisioning/composum.txt
@@ -26,7 +26,8 @@
   com.composum.sling.core/composum-sling-core-jslibs/${composum.nodes.version}
   com.composum.sling.core/composum-sling-user-management/${composum.nodes.version}
   com.composum.sling.core/composum-sling-package-manager/${composum.nodes.version}
-  org.apache.jackrabbit.vault/org.apache.jackrabbit.vault/3.2.4
+  com.composum.sling.core.osgi/composum-sling-osgi-package-installer/${composum.nodes.version}
+  org.apache.jackrabbit.vault/org.apache.jackrabbit.vault/3.2.8

 [configurations]

diff --git a/src/main/provisioning/sling.txt b/src/main/provisioning/sling.txt
index ac89592..3387c8e 100644
--- a/src/main/provisioning/sling.txt
+++ b/src/main/provisioning/sling.txt
@@ -83,6 +83,7 @@
 [artifacts]
     # Add the Slingshot Sample provisioning model
     org.apache.sling/org.apache.sling.sample.slingshot/0.9.0/slingfeature/slingfeature
+    org.apache.sling/sling-cp-demo-5/1.0-SNAPSHOT/zip
     # Default Starter content
     org.apache.sling/org.apache.sling.starter.content/1.0.6
     commons-collections/commons-collections/3.2.2

The project is attached to this issue: sling-cp-demo-5.zip.

When starting up sling the package remains untransformed and I see the following entries in the log:

30.08.2019 17:28:45.477 *INFO* [OsgiInstallerImpl] com.composum.sling.core.pckginstall.PackageTransformer transforming of package 'sling-cp-demo-5' with installation.hint '0'
30.08.2019 17:28:45.477 *WARN* [OsgiInstallerImpl] com.composum.sling.core.pckginstall.PackageTransformer Exception transforming RegisteredResource: java.lang.IllegalArgumentException: invalid version "1.0.SNAPSHOT": non-numeric "SNAPSHOT"

If I change the version 1.0, then the package is installed.

stoerr commented 4 years ago

Hi! Is this still relevant? I suppose not, since Starter 12 switched to the feature model, right? If it is: how do I reproduce this problem with the feature model? Thanks!

rombert commented 4 years ago

Thanks for coming back to this. It's not relevant since with https://github.com/apache/sling-org-apache-sling-starter/commit/ded7e486c7868cc0508a82e333605aed5749afb1 / https://issues.apache.org/jira/browse/SLING-6196 we moved to our own content package installer. Feel free to close.

stoerr commented 4 years ago

OK, thank you for the update!