Hi Robert,

This is using the OSGi Framework launch API to get the framework and obtain
its resolver service. You should be able to get past it by adding the Felix
Framework to the launch path.

PS there are quite a number of unit tests at this stage, they might help
getting started as well...

Best regards,

David

On 17 April 2018 at 16:12, Robert Munteanu <[email protected]> wrote:

> Hi,
>
> I tried to use the feature model for a simple CLI app. I created a
> simple feature.json file (see end of mail ) and tried to run the
> application builder.
>
> I had to patch the applicationbuilder pom to get rid of the CNFEs:
>
> diff --git a/featuremodel/feature-applicationbuilder/pom.xml
> b/featuremodel/feature-applicationbuilder/pom.xml
> index 9f470e2..885c31f 100644
> --- a/featuremodel/feature-applicationbuilder/pom.xml
> +++ b/featuremodel/feature-applicationbuilder/pom.xml
> @@ -56,7 +56,7 @@
>                          <outputDirectory>${project.
> build.directory}/classes</outputDirectory>
>                          <overWriteReleases>false</overWriteReleases>
>                          <overWriteSnapshots>true</overWriteSnapshots>
> -                        <includeArtifactIds>commons-
> cli,org.apache.sling.feature,org.apache.sling.feature.
> support,org.apache.sling.commons.johnzon,slf4j-api,
> slf4j-simple,osgi.core,org.apache.felix.converter</includeArtifactIds>
> +                        <includeArtifactIds>commons-
> cli,org.apache.sling.feature,org.apache.sling.feature.
> support,org.apache.sling.commons.johnzon,slf4j-api,
> slf4j-simple,osgi.core,org.apache.felix.converter,org.
> osgi.service.resolver,org.apache.sling.feature.resolver,
> org.apache.sling.feature.analyser</includeArtifactIds>
>                      </configuration>
>                  </execution>
>              </executions>
>
> Afterwards running the app fails with a NSEE:
>
> $ java -jar ../../../whiteboard/featuremodel/feature-
> applicationbuilder/target/org.apache.sling.feature.
> applicationbuilder-0.0.1-SNAPSHOT.jar -d features -u ~/.m2/repository -o
> clisync.json
> [INFO] Apache Sling Feature Application Builder
> [INFO]
> [ERROR] Problem generating application
> java.util.NoSuchElementException
>         at java.util.ServiceLoader$LazyIterator.nextService(
> ServiceLoader.java:365)
>         at java.util.ServiceLoader$LazyIterator.next(
> ServiceLoader.java:404)
>         at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
>         at org.apache.sling.feature.resolver.FrameworkResolver.<
> init>(FrameworkResolver.java:90)
>         at org.apache.sling.feature.applicationbuilder.impl.Main.
> getFeatureResolver(Main.java:125)
>         at org.apache.sling.feature.applicationbuilder.impl.Main.
> main(Main.java:165)
>
> At this point I have no idea how to continue. Ideas?
>
> Thanks,
>
> Robert
>
> {
>         "id": "clisync/1.0.0",
>         "bundles": [
>                 "org.apache.felix/org.apache.felix.eventadmin/1.4.10",
>         "org.slf4j/jcl-over-slf4j/1.7.25",
>         "org.slf4j/log4j-over-slf4j/1.7.25",
>                 "org.slf4j/slf4j-api/1.7.25",
>                 "org.apache.felix/org.apache.felix.scr/2.0.12",
>                 "org.apache.sling.ide/org.apache.sling.ide.api/1.2.3-
> SNAPSHOT",
>                 "org.apache.sling/org.apache.sling.jcr.api/2.4.0",
>                 "org.apache.jackrabbit.vault/org.apache.jackrabbit.vaul
> t/3.1.44",
>                 "org.apache.jackrabbit/jackrabbit-api/2.16.1",
>                 "org.apache.jackrabbit/jackrabbit-data/2.16.1",
>                 "org.apache.jackrabbit/jackrabbit-data/2.16.1",
>                 "org.apache.jackrabbit/jackrabbit-data/2.16.1",
>                 "org.apache.jackrabbit/jackrabbit-data/2.16.1",
>                 "org.apache.jackrabbit/jackrabbit-webdav/2.16.1"
>
>         ]
> }
>

Reply via email to