You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Robert Munteanu <ro...@apache.org> on 2021/05/18 15:13:42 UTC

Re: Aw: Re: Kickstart: starting from feature archive without network / maven repo not possible

On Tue, 2021-04-20 at 14:50 +0200, Dr. Hans-Peter Störr wrote:
> Hi Robert and Ruben!
> 
> Thank you for the prompt answers!
> 
> Maybe it's not 100% clear what I'm trying to do. I'd like to create a
> very low bar of entry for our Composum application: there should be a
> single starter JAR that contains the whole of Sling and a basic
> version of our application, that can be run on any machine with a JDK
> - and should not even require an internet connection to download more
> artefacts, and of course should not require a maven installation as
> it is not only meant for developers. Basically similar to what a
> Sling Starter version <= 11 would do with added provisioning for our
> own application.
> 
> Currently I didn't find it easy to use the sling feature launcher or
> kickstart that way for two reasons.
> 
> 1. Even when I supply a feature archive, it seems that the feature
> launcher accesses the network (that is, the central maven
> repo.maven.apache.org!) for each of the hundreds of artifacts, even
> if they are contained in the feature archive. If I start this
>    java -jar org.apache.sling.feature.launcher.jar -f
> org.apache.sling.starter-12-SNAPSHOT-oak_tar_far.far -v
>    without network access, lots of java.net.UnknownHostException,
> though these seem to be ignored. Isn't that a bug of the feature
> launcher?

I am not a feature model expert, but I think it is a bug. If the
artifacts are present there should be no network access.

> 
> 2. The framework (felix-framework-6.0.3 or felix-framework-7.0.0 and
> dependencies) is not present in the FAR (and it probably shouldn't be
> there, right?), so the feature launcher tries to retrieve that from
> $HOME/.m2/repository or, failing that, from the central repository.
> (That applies to both to the separate call fo the feature launcher,
> and to the call of the feature launcher within kickstart-0.0.12.) If
> the framework cannot be retrieved, it aborts.

What I usually do it to copy over the framework jar in the right
location under the repository cache ( -c argument to the feature
launcher ) and that works. Have you tried that?

> 
> BTW:
> Since there is the content-packages extension for features, I'm
> trying to add our application to the FAR with a feature like
> {
> "content-packages:ARTIFACTS|required": [
> "com.composum.platform:composum-platform-
> package:zip:${composum.platform.version}",
> "com.composum.pages:composum-pages-
> package:zip:${composum.pages.version}", ...]
> }
> That leads to problems, though, since the packages aren't installed
> in the proper order and the included bundles are given a start level
> 1 instead of the usual 20. Is there something I can do to set the
> start level and to control the ordering of the packages? I tried
> converting them with the sling-feature-converter-maven-plugin, too,
> but didn't succeed so far and am hoping for a simpler solution. :-)


... that is too much out of my area of expertise, sorry :-)

Thanks,
Robert