Also after I fix the issues with the variables and started the FM I get many
OSGi missing dependencies issues mostly around:
- javax.xml.namespace
- javax.imageio
- javax.xml.bind.annotation
- javax.net <http://javax.net/>
etc
This looks like ‘org.osgi.framework.bootdelegation’ is not set but I tried
several ways including this one:
rm -rf launcher && \
java -jar org.apache.sling.feature.launcher-1.0.0.jar \
-f target/slingfeature-tmp/feature-example-runtime.json \
-D "org.osgi.framework.bootdelegation=javax.*”
Any idea on how to get passed that?
Cheers - Andy Schaefer
BTW this is what I did so far:
1. Took Sling 11 provisioning files
2. Used Sling FeatureModel Converter to make them FM files
3. Adjusted the ID
4. Replaced all OSGi version variables with actual values
5. Removed all “provisioning.model.name” variables are they are multiples
5. Made REPOINIT a TEXT (Sling FeatureModel Converter makes it a type JSON)
6. Ran it with the launcher mentioned above
> On Apr 12, 2019, at 2:17 PM, Andreas Schaefer <[email protected]>
> wrote:
>
> Hi all
>
> I use the featuremodelconverter tool to migrate Sling provisioning files to
> feature models.
> Then I used the slingfeature-maven-plugin to aggregate them but I ran into an
> issue with variables.
> This is the FM json file:
>
> {
> "id":
> "${project.groupId}:${project.artifactId}:slingosgifeature:composum_composum-console:${project.version}",
> "variables":{
> "provisioning.model.name":"composum-console",
> "composum.version":"1.9.2"
> },
> "bundles":[
> {
>
> "id":"com.composum.sling.core:composum-sling-core-commons:${composum.version}",
> "start-level":"20"
> },
> …
>
> My POM file looks like this:
>
> <plugin>
> <groupId>org.apache.sling</groupId>
> <artifactId>slingfeature-maven-plugin</artifactId>
> <version>1.0.0</version>
> <extensions>true</extensions>
> <executions>
> <execution>
> <id>aggregate-base-feature</id>
> <phase>generate-resources</phase>
> <goals>
> <goal>aggregate-features</goal>
> </goals>
> <configuration>
> <aggregates>
> <aggregate>
> <classifier>example-runtime</classifier>
> <filesInclude>*.json</filesInclude>
> <markAsComplete>true</markAsComplete>
> </aggregate>
> </aggregates>
> </configuration>
> </execution>
> </executions>
> </plugin>
>
> I get this errors:
>
> [WARNING] The POM for
> com.composum.sling.core:composum-sling-core-commons:jar:${composum.version}
> is missing, no dependency information available
> …
> [ERROR] Failed to execute goal on project
> org.apache.sling.featuremodel.starter: Could not resolve dependencies for
> project
> org.apache.sling:org.apache.sling.featuremodel.starter:slingosgifeature:0.0.1:
> The following artifacts could not be resolved:
> com.composum.sling.core:composum-sling-core-commons:jar:${composum.version},
> com.composum.sling.core:com
>
> Is that not supported?
> Any way to fix it?
>
> Cheers - Andreas Schaefer