websight-io / starter

Sample project built on top of the Websight CMS
https://www.websight.io
Apache License 2.0
56 stars 7 forks source link

Currently bumping org.apache.sling.feature.launcher to `1.2.4` causes an error. #122

Open wildone opened 1 year ago

wildone commented 1 year ago

Description Currently bumping org.apache.sling.feature.launcher to 1.2.4 causes an error.

Apache Sling SLING-10956 has been closed in 2021.

I have generated a project from archetype and trying to update its org.apache.sling.feature.launcher to get the latest sling HTL features.

Steps to reproduce

If I update following pom files lines:

              <!-- 1.1.28 and newer versions don't work out-of-the-box due to SLING-10956 -->
              <artifact>org.apache.sling:org.apache.sling.feature.launcher:1.1.26</artifact>

I get the following error when I rebuild and run the new container.

local-cms-1    | [INFO] Selected cache/io/typerefinery/websight/typerefinery-distribution/1.0.0-SNAPSHOT/typerefinery-distribution-1.0.0-SNAPSHOT-typerefinery-websight.slingosgifeature for launching
local-cms-1    | [INFO] Automatically appended cache/io/typerefinery/websight/typerefinery-distribution/1.0.0-SNAPSHOT/typerefinery-distribution-1.0.0-SNAPSHOT-docker.slingosgifeature
local-cms-1    | Enabling Java debug options: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
local-cms-1    | Listening for transport dt_socket at address: 5005
local-cms-1    | Error: Unable to initialize main class org.apache.sling.feature.launcher.impl.Main
local-cms-1    | Caused by: java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException
local-cms-1 exited with code 1

Current result CMS container does not start.

Expected behavior Updating version of launcher should allow container to build and run with success.

WebSight CMS version Latest

Desktop (please complete the following information):

paweljozwicki commented 1 year ago

Looks like it requires more changes. Based on https://github.com/apache/sling-org-apache-sling-starter I prepared: https://github.com/websight-io/starter/compare/main...feature/GH-112-update-feature-launcher

Probably we will update it in archetype, but meanwhile, you can follow the above changes.

michalcukierman commented 1 year ago

Pawel, I also noticed that we don't need this prepare launcher plugin in tests: https://github.com/websight-io/starter/blob/main/tests/end-to-end/pom.xml#L126 As we are not using docker in e2e tests. It looks like a leftover.

wildone commented 1 year ago

Looks like it requires more changes. Based on https://github.com/apache/sling-org-apache-sling-starter I prepared: main...feature/GH-112-update-feature-launcher

Probably we will update it in archetype, but meanwhile, you can follow the above changes.

I've made a small update to your feature. https://github.com/websight-io/starter/pull/124