You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Oliver Lietz <ap...@oliverlietz.de> on 2015/10/15 21:29:36 UTC

karaf-assembly 4.0.2: resolve error

hi,

I'm facing a strange error when building a custom distribution with karaf-
assembly[0]:

[ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-
plugin:4.0.2:assembly (default-assembly) on project 
org.apache.sling.launchpad.karaf-distribution: Unable to build assembly: 
Unable to resolve root: missing requirement [root] osgi.identity; 
osgi.identity=sling-scripting; type=karaf.feature; version=0.1.1.SNAPSHOT; 
filter:="(&(osgi.identity=sling-scripting)(type=karaf.feature)
(version>=0.1.1.SNAPSHOT))" [caused by: Unable to resolve sling-
scripting/0.1.1.SNAPSHOT: missing requirement [sling-scripting/0.1.1.SNAPSHOT] 
osgi.identity; osgi.identity=sling; type=karaf.feature; 
version="[0.1.1.SNAPSHOT,0.1.1.SNAPSHOT]" [caused by: Unable to resolve 
sling/0.1.1.SNAPSHOT: missing requirement [sling/0.1.1.SNAPSHOT] 
osgi.identity; osgi.identity=org.apache.sling.serviceusermapper; 
type=osgi.bundle; version="[1.2.0,1.2.0]"; resolution:=mandatory [caused by: 
Unable to resolve org.apache.sling.serviceusermapper/1.2.0: missing 
requirement [org.apache.sling.serviceusermapper/1.2.0] osgi.wiring.package; 
filter:="(&(osgi.wiring.package=org.apache.sling.commons.osgi)(version>=2.1.0)
(!(version>=3.0.0)))" [caused by: Unable to resolve 
org.apache.sling.commons.osgi/2.3.0: missing requirement 
[org.apache.sling.commons.osgi/2.3.0] osgi.wiring.package; 
filter:="(&(osgi.wiring.package=org.osgi.service.event)(version>=1.1.0)(!
(version>=2.0.0)))"]]]] -> [Help 1]

The feature and the kar are just built fine[1].

Is this a problem in Karaf or Felix Resolver?

Regards,
O.

[0] 
https://github.com/apache/sling/tree/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-distribution
[1] 
https://github.com/apache/sling/tree/trunk/contrib/launchpad/karaf/org.apache.sling.launchpad.karaf-features


Re: karaf-assembly 4.0.2: resolve error

Posted by Oliver Lietz <ap...@oliverlietz.de>.
On Thursday 15 October 2015 21:29:36 Oliver Lietz wrote:
> hi,
> 
> I'm facing a strange error when building a custom distribution with karaf-
> assembly[0]:
> 
> [ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-
> plugin:4.0.2:assembly (default-assembly) on project
> org.apache.sling.launchpad.karaf-distribution: Unable to build assembly:
> Unable to resolve root: missing requirement [root] osgi.identity;
> osgi.identity=sling-scripting; type=karaf.feature; version=0.1.1.SNAPSHOT;
> filter:="(&(osgi.identity=sling-scripting)(type=karaf.feature)
> (version>=0.1.1.SNAPSHOT))" [caused by: Unable to resolve sling-
> scripting/0.1.1.SNAPSHOT: missing requirement
> [sling-scripting/0.1.1.SNAPSHOT] osgi.identity; osgi.identity=sling;
> type=karaf.feature;
> version="[0.1.1.SNAPSHOT,0.1.1.SNAPSHOT]" [caused by: Unable to resolve
> sling/0.1.1.SNAPSHOT: missing requirement [sling/0.1.1.SNAPSHOT]
> osgi.identity; osgi.identity=org.apache.sling.serviceusermapper;
> type=osgi.bundle; version="[1.2.0,1.2.0]"; resolution:=mandatory [caused by:
> Unable to resolve org.apache.sling.serviceusermapper/1.2.0: missing
> requirement [org.apache.sling.serviceusermapper/1.2.0] osgi.wiring.package;
> filter:="(&(osgi.wiring.package=org.apache.sling.commons.osgi)(version>=2.1
> .0) (!(version>=3.0.0)))" [caused by: Unable to resolve
> org.apache.sling.commons.osgi/2.3.0: missing requirement
> [org.apache.sling.commons.osgi/2.3.0] osgi.wiring.package;
> filter:="(&(osgi.wiring.package=org.osgi.service.event)(version>=1.1.0)(!
> (version>=2.0.0)))"]]]] -> [Help 1]
> 
> The feature and the kar are just built fine[1].
> 
> Is this a problem in Karaf or Felix Resolver?

Solved by removing scope runtime from Karaf’s standard features dependency.
I wonder if scope runtime is useful at all or if the documentation is wrong:

https://karaf.apache.org/manual/latest/developers-guide/custom-distribution.html

        <dependency>
        <!-- scope is runtime so the feature repo is listed in 
etc/org.apache.karaf.features.cfg file, and features will installed into the 
system directory -->
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>standard</artifactId>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>

O.

> Regards,
> O.
> 
> [0]
> https://github.com/apache/sling/tree/trunk/contrib/launchpad/karaf/org.apach
> e.sling.launchpad.karaf-distribution [1]
> https://github.com/apache/sling/tree/trunk/contrib/launchpad/karaf/org.apach
> e.sling.launchpad.karaf-features