Hi,
I've advanced in my tests of the feature model and now I have a problem
related to a fragment bundle. The most simplified feature that I have
is:
{
"id": "org.apache.sling.ide/org.apache.sling.ide.cli-dist/1.0.0",
"bundles": [
"org.apache.sling/org.apache.sling.fragment.xml/1.0.2"
]
}
Trying to start this via
$ java -cp ... org.apache.sling.feature.applicationbuilder.impl.Main -d
features/ -u file:///home/robert/.m2/repository -o sling.json
results in a resolution error:
[INFO] Apache Sling Feature Application Builder
[INFO]
[ERROR] Problem generating application
java.lang.RuntimeException: java.lang.RuntimeException:
org.osgi.service.resolver.ResolutionException: Unable to resolve
BundleResourceImpl [bsn=org.apache.sling.fragment.xml, version=1.0.2]: missing
requirement OSGiRequirement [resource=BundleResourceImpl
[bsn=org.apache.sling.fragment.xml, version=1.0.2], namespace=osgi.wiring.host,
attributes={bundle-version=0.0.0, osgi.wiring.host=system.bundle},
directives={filter=(&(osgi.wiring.host=system.bundle)(bundle-version>=0.0.0)),
extension=framework}]
at
org.apache.sling.feature.resolver.FrameworkResolver.orderResources(FrameworkResolver.java:140)
at
org.apache.sling.feature.support.FeatureUtil.sortFeatures(FeatureUtil.java:245)
at
org.apache.sling.feature.support.FeatureUtil.assembleApplication(FeatureUtil.java:285)
at
org.apache.sling.feature.support.FeatureUtil.assembleApplication(FeatureUtil.java:233)
at
org.apache.sling.feature.applicationbuilder.impl.Main.main(Main.java:166)
Caused by: java.lang.RuntimeException:
org.osgi.service.resolver.ResolutionException: Unable to resolve
BundleResourceImpl [bsn=org.apache.sling.fragment.xml, version=1.0.2]: missing
requirement OSGiRequirement [resource=BundleResourceImpl
[bsn=org.apache.sling.fragment.xml, version=1.0.2], namespace=osgi.wiring.host,
attributes={bundle-version=0.0.0, osgi.wiring.host=system.bundle},
directives={filter=(&(osgi.wiring.host=system.bundle)(bundle-version>=0.0.0)),
extension=framework}]
at
org.apache.sling.feature.resolver.FrameworkResolver.internalOrderResources(FrameworkResolver.java:223)
at
org.apache.sling.feature.resolver.FrameworkResolver.orderResources(FrameworkResolver.java:138)
... 4 more
Caused by: org.osgi.service.resolver.ResolutionException: Unable to resolve
BundleResourceImpl [bsn=org.apache.sling.fragment.xml, version=1.0.2]: missing
requirement OSGiRequirement [resource=BundleResourceImpl
[bsn=org.apache.sling.fragment.xml, version=1.0.2], namespace=osgi.wiring.host,
attributes={bundle-version=0.0.0, osgi.wiring.host=system.bundle},
directives={filter=(&(osgi.wiring.host=system.bundle)(bundle-version>=0.0.0)),
extension=framework}]
at
org.apache.felix.resolver.ResolutionError.toException(ResolutionError.java:42)
at
org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:391)
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:377)
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:370)
at
org.apache.sling.feature.resolver.FrameworkResolver.internalOrderResources(FrameworkResolver.java:176)
... 5 more
My understanding is that fragment bundles should be supported, or at
least they are mentioned in the code base . Is this a bug or am I
missing something?
Thanks,
Robert