You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Raman Gupta <ro...@gmail.com> on 2016/01/26 18:18:28 UTC

Features validation: cannot find wrap

I am trying to use karaf-maven-plugin version 4.0.4 to verify a
feature, but always get the following error:

Message: Unable to resolve root: missing requirement [root]
osgi.identity; osgi.identity=wrap; type=karaf.feature; version=0;
filter:="(&(osgi.identity=wrap)(type=karaf.feature)(version>=0.0.0))"
[caused by: Unable to resolve wrap/0.0.0: missing requirement
[wrap/0.0.0] osgi.identity; osgi.identity=org.ops4j.pax.url.wrap;
type=osgi.bundle; version="[2.4.5,2.4.5]"; resolution:=mandatory
[caused by: Unable to resolve org.ops4j.pax.url.wrap/2.4.5: missing
requirement [org.ops4j.pax.url.wrap/2.4.5] osgi.wiring.package;
filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"]]

It seems that the pax wrap feature is not being loaded by the verifier
(wrap is used in my features.xml).

I don't specify a custom config.properties, so the default is being
used, which should load the wrap feature.

Any ideas?

Regards,
Raman Gupta

Re: Features validation: cannot find wrap

Posted by Raman Gupta <ro...@gmail.com>.
That was already in place. Note that my features.xml works perfectly
fine inside a real Karaf environment. Its just the feature validation
at build time that I can't get working.

Regards,
Raman

On 01/26/2016 03:04 PM, Achim Nierbeck wrote:
> Hi, 
> 
> if one of your own features does use the wrap url-handler, 
> make sure you have a dependency on the wrap feature in your feature
> and mark it as prerequisite=true
> 
> regards, Achim 
> 
> 
> 2016-01-26 19:00 GMT+01:00 Raman Gupta <rocketraman@gmail.com
> <ma...@gmail.com>>:
> 
>     Here you go:
> 
>     http://pastebin.com/4F13xSp9
> 
>     Regards,
>     Raman
> 
>     On 01/26/2016 12:40 PM, Jean-Baptiste Onofré wrote:
>     > Can you share your pom.xml ?
>     >
>     > Thanks,
>     > Regards
>     > JB
>     >
>     > On 01/26/2016 06:39 PM, Raman Gupta wrote:
>     >> I didn't, but adding those does not help. I also tried adding
>     >> slf4j-api >= 1.6.0 as suggested by the error message. Still
>     fails with
>     >> the same error. I tried both the pom <dependencies> section as
>     well as
>     >> the plugin <dependencies>.
>     >>
>     >> Regards,
>     >> Raman
>     >>
>     >> On 01/26/2016 12:24 PM, Jean-Baptiste Onofré wrote:
>     >>> Hi Raman,
>     >>>
>     >>> Can you check if standard feature dependency is present in the
>     pom.xml
>     >>> and with compile as scope ?
>     >>>
>     >>> Basically, you should have:
>     >>>
>     >>>          <dependency>
>     >>>              <groupId>org.apache.karaf.features</groupId>
>     >>>              <artifactId>framework</artifactId>
>     >>>              <version>4.0.4</version>
>     >>>              <type>kar</type>
>     >>>          </dependency>
>     >>>          <dependency>
>     >>>              <groupId>org.apache.karaf.features</groupId>
>     >>>              <artifactId>standard</artifactId>
>     >>>              <version>4.0.4</version>
>     >>>              <classifier>features</classifier>
>     >>>              <type>xml</type>
>     >>>          </dependency>
>     >>>
>     >>> in your pom.xml.
>     >>>
>     >>> Is it the case ?
>     >>>
>     >>> Thanks,
>     >>> Regards
>     >>> JB
>     >>>
>     >>> On 01/26/2016 06:18 PM, Raman Gupta wrote:
>     >>>> I am trying to use karaf-maven-plugin version 4.0.4 to verify a
>     >>>> feature, but always get the following error:
>     >>>>
>     >>>> Message: Unable to resolve root: missing requirement [root]
>     >>>> osgi.identity; osgi.identity=wrap; type=karaf.feature; version=0;
>     >>>>
>     filter:="(&(osgi.identity=wrap)(type=karaf.feature)(version>=0.0.0))"
>     >>>> [caused by: Unable to resolve wrap/0.0.0: missing requirement
>     >>>> [wrap/0.0.0] osgi.identity; osgi.identity=org.ops4j.pax.url.wrap;
>     >>>> type=osgi.bundle; version="[2.4.5,2.4.5]"; resolution:=mandatory
>     >>>> [caused by: Unable to resolve org.ops4j.pax.url.wrap/2.4.5:
>     missing
>     >>>> requirement [org.ops4j.pax.url.wrap/2.4.5] osgi.wiring.package;
>     >>>>
>     filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"]]
>     >>>>
>     >>>>
>     >>>>
>     >>>> It seems that the pax wrap feature is not being loaded by the
>     >>>> verifier
>     >>>> (wrap is used in my features.xml).
>     >>>>
>     >>>> I don't specify a custom config.properties, so the default is
>     being
>     >>>> used, which should load the wrap feature.
>     >>>>
>     >>>> Any ideas?
>     >>>>
>     >>>> Regards,
>     >>>> Raman Gupta
>     >>>>
>     >>>
>     >
> 
> 
> 
> 
> -- 
> 
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> Committer & Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> 
> Software Architect / Project Manager / Scrum Master 
> 

Re: Features validation: cannot find wrap

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,

if one of your own features does use the wrap url-handler,
make sure you have a dependency on the wrap feature in your feature and
mark it as prerequisite=true

regards, Achim


2016-01-26 19:00 GMT+01:00 Raman Gupta <ro...@gmail.com>:

> Here you go:
>
> http://pastebin.com/4F13xSp9
>
> Regards,
> Raman
>
> On 01/26/2016 12:40 PM, Jean-Baptiste Onofré wrote:
> > Can you share your pom.xml ?
> >
> > Thanks,
> > Regards
> > JB
> >
> > On 01/26/2016 06:39 PM, Raman Gupta wrote:
> >> I didn't, but adding those does not help. I also tried adding
> >> slf4j-api >= 1.6.0 as suggested by the error message. Still fails with
> >> the same error. I tried both the pom <dependencies> section as well as
> >> the plugin <dependencies>.
> >>
> >> Regards,
> >> Raman
> >>
> >> On 01/26/2016 12:24 PM, Jean-Baptiste Onofré wrote:
> >>> Hi Raman,
> >>>
> >>> Can you check if standard feature dependency is present in the pom.xml
> >>> and with compile as scope ?
> >>>
> >>> Basically, you should have:
> >>>
> >>>          <dependency>
> >>>              <groupId>org.apache.karaf.features</groupId>
> >>>              <artifactId>framework</artifactId>
> >>>              <version>4.0.4</version>
> >>>              <type>kar</type>
> >>>          </dependency>
> >>>          <dependency>
> >>>              <groupId>org.apache.karaf.features</groupId>
> >>>              <artifactId>standard</artifactId>
> >>>              <version>4.0.4</version>
> >>>              <classifier>features</classifier>
> >>>              <type>xml</type>
> >>>          </dependency>
> >>>
> >>> in your pom.xml.
> >>>
> >>> Is it the case ?
> >>>
> >>> Thanks,
> >>> Regards
> >>> JB
> >>>
> >>> On 01/26/2016 06:18 PM, Raman Gupta wrote:
> >>>> I am trying to use karaf-maven-plugin version 4.0.4 to verify a
> >>>> feature, but always get the following error:
> >>>>
> >>>> Message: Unable to resolve root: missing requirement [root]
> >>>> osgi.identity; osgi.identity=wrap; type=karaf.feature; version=0;
> >>>> filter:="(&(osgi.identity=wrap)(type=karaf.feature)(version>=0.0.0))"
> >>>> [caused by: Unable to resolve wrap/0.0.0: missing requirement
> >>>> [wrap/0.0.0] osgi.identity; osgi.identity=org.ops4j.pax.url.wrap;
> >>>> type=osgi.bundle; version="[2.4.5,2.4.5]"; resolution:=mandatory
> >>>> [caused by: Unable to resolve org.ops4j.pax.url.wrap/2.4.5: missing
> >>>> requirement [org.ops4j.pax.url.wrap/2.4.5] osgi.wiring.package;
> >>>>
> filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"]]
> >>>>
> >>>>
> >>>>
> >>>> It seems that the pax wrap feature is not being loaded by the
> >>>> verifier
> >>>> (wrap is used in my features.xml).
> >>>>
> >>>> I don't specify a custom config.properties, so the default is being
> >>>> used, which should load the wrap feature.
> >>>>
> >>>> Any ideas?
> >>>>
> >>>> Regards,
> >>>> Raman Gupta
> >>>>
> >>>
> >
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: [SOLVED] Re: Features validation: cannot find wrap

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Thanks for the update Raman, it could help other users ;)

Regards
JB

On 02/03/2016 09:04 AM, Raman Gupta wrote:
> Got this figured out with some help on IRC from jbonofre. For future
> posterity, the solution was to
>
> 1) add the framework to the verify <configuration>:
>
> <distribution>org.apache.karaf.features:framework</distribution>
> <framework>
>    <feature>framework</feature>
> </framework>
>
> 2) add the framework feature as a descriptor
>
> 3) ensure the org.apache.karaf.features.framework kar artifact is in
> the dependencies with compile scope.
>
> A good working demo:
>
> https://github.com/rocketraman/test-karaf-verify/blob/master/test-verify/pom.xml
>
> Regards,
> Raman
>
>
> On 01/28/2016 11:33 AM, Raman Gupta wrote:
>> Thanks JB, here is a simple test case:
>>
>> https://github.com/rocketraman/test-karaf-verify
>>
>> Just run "mvn install" to see the issue.
>>
>> Then, at
>> https://github.com/rocketraman/test-karaf-verify/blob/master/dist/pom.xml#L41
>> comment out the feature-with-slf4j and uncomment feature-without-slf4j
>> to see that verification succeeds when slf4j is not a dependency.
>>
>> Regards,
>> Raman
>>
>>
>> On 01/28/2016 10:31 AM, Jean-Baptiste Onofré wrote:
>>> Hi Raman,
>>>
>>> Can you share both your pom.xml (as you already did) and your
>>> features.xml ?
>>> I gonna fix that for you.
>>>
>>> Thanks,
>>> Regards
>>> JB
>>>
>>> On 01/28/2016 04:27 PM, Raman Gupta wrote:
>>>> JB, no problem, thanks for your help. Nope that does not work. All my
>>>> features that use wrap already have wrap declared.
>>>>
>>>> I think I have this narrowed down a bit more. I eliminated any
>>>> features that use wrap, and created the simplest possible features to
>>>> test. I see that:
>>>>
>>>> - if a feature contains a bundle that declares an import of
>>>> org.slf4j;version="[1.7,2)" then the verification fails with the error:
>>>>
>>>> missing requirement [my-bundle/1.0.0.SNAPSHOT] osgi.wiring.package;
>>>> filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.7.0)(!(version>=2.0.0)))"]
>>>>
>>>>
>>>> - if a feature contains a bundle that does not declare an import on
>>>> org.slf4j, then the verification succeeds
>>>>
>>>> So, for some reason, perhaps the verification framework isn't loading
>>>> the logging bundle?
>>>>
>>>> Interestingly, I tried adding <feature
>>>> prerequisite="true">log</feature> to the feature under verification,
>>>> but it just pushed the problem back by one system bundle. Instead of
>>>> the error above, I got:
>>>>
>>>> missing requirement [org.apache.karaf.log.core/4.0.4]
>>>> osgi.wiring.package;
>>>> filter:="(&(osgi.wiring.package=org.ops4j.pax.logging.spi)(version>=1.8.0)(!(version>=2.0.0)))"]
>>>>
>>>>
>>>> Thoughts?
>>>>
>>>> Regards,
>>>> Raman
>>>>
>>>> On 01/28/2016 08:25 AM, Jean-Baptiste Onofré wrote:
>>>>> Hi Raman,
>>>>>
>>>>> sorry I missed your message.
>>>>>
>>>>> As your com.myorg* feature needs wrap, and you validate transitive,
>>>>> wrap feature should be part of the verify list/definition.
>>>>>
>>>>> Your features should define the wrap feature as dependency="true".
>>>>>
>>>>> Regards
>>>>> JB
>>>>>
>>>>> On 01/28/2016 02:18 PM, Raman Gupta wrote:
>>>>>> Was the pom below helpful in any way to understanding this issue?
>>>>>>
>>>>>> Thanks,
>>>>>> Raman
>>>>>>
>>>>>> On 01/26/2016 01:00 PM, Raman Gupta wrote:
>>>>>>> Here you go:
>>>>>>>
>>>>>>> http://pastebin.com/4F13xSp9
>>>>>>>
>>>>>>> Regards,
>>>>>>> Raman
>>>>>>>
>>>>>>> On 01/26/2016 12:40 PM, Jean-Baptiste Onofré wrote:
>>>>>>>> Can you share your pom.xml ?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Regards
>>>>>>>> JB
>>>>>>>>
>>>>>>>> On 01/26/2016 06:39 PM, Raman Gupta wrote:
>>>>>>>>> I didn't, but adding those does not help. I also tried adding
>>>>>>>>> slf4j-api >= 1.6.0 as suggested by the error message. Still fails
>>>>>>>>> with
>>>>>>>>> the same error. I tried both the pom <dependencies> section as
>>>>>>>>> well as
>>>>>>>>> the plugin <dependencies>.
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>> Raman
>>>>>>>>>
>>>>>>>>> On 01/26/2016 12:24 PM, Jean-Baptiste Onofré wrote:
>>>>>>>>>> Hi Raman,
>>>>>>>>>>
>>>>>>>>>> Can you check if standard feature dependency is present in the
>>>>>>>>>> pom.xml
>>>>>>>>>> and with compile as scope ?
>>>>>>>>>>
>>>>>>>>>> Basically, you should have:
>>>>>>>>>>
>>>>>>>>>>             <dependency>
>>>>>>>>>>                 <groupId>org.apache.karaf.features</groupId>
>>>>>>>>>>                 <artifactId>framework</artifactId>
>>>>>>>>>>                 <version>4.0.4</version>
>>>>>>>>>>                 <type>kar</type>
>>>>>>>>>>             </dependency>
>>>>>>>>>>             <dependency>
>>>>>>>>>>                 <groupId>org.apache.karaf.features</groupId>
>>>>>>>>>>                 <artifactId>standard</artifactId>
>>>>>>>>>>                 <version>4.0.4</version>
>>>>>>>>>>                 <classifier>features</classifier>
>>>>>>>>>>                 <type>xml</type>
>>>>>>>>>>             </dependency>
>>>>>>>>>>
>>>>>>>>>> in your pom.xml.
>>>>>>>>>>
>>>>>>>>>> Is it the case ?
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> Regards
>>>>>>>>>> JB
>>>>>>>>>>
>>>>>>>>>> On 01/26/2016 06:18 PM, Raman Gupta wrote:
>>>>>>>>>>> I am trying to use karaf-maven-plugin version 4.0.4 to verify a
>>>>>>>>>>> feature, but always get the following error:
>>>>>>>>>>>
>>>>>>>>>>> Message: Unable to resolve root: missing requirement [root]
>>>>>>>>>>> osgi.identity; osgi.identity=wrap; type=karaf.feature;
>>>>>>>>>>> version=0;
>>>>>>>>>>> filter:="(&(osgi.identity=wrap)(type=karaf.feature)(version>=0.0.0))"
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> [caused by: Unable to resolve wrap/0.0.0: missing requirement
>>>>>>>>>>> [wrap/0.0.0] osgi.identity;
>>>>>>>>>>> osgi.identity=org.ops4j.pax.url.wrap;
>>>>>>>>>>> type=osgi.bundle; version="[2.4.5,2.4.5]"; resolution:=mandatory
>>>>>>>>>>> [caused by: Unable to resolve org.ops4j.pax.url.wrap/2.4.5:
>>>>>>>>>>> missing
>>>>>>>>>>> requirement [org.ops4j.pax.url.wrap/2.4.5] osgi.wiring.package;
>>>>>>>>>>> filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"]]
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> It seems that the pax wrap feature is not being loaded by the
>>>>>>>>>>> verifier
>>>>>>>>>>> (wrap is used in my features.xml).
>>>>>>>>>>>
>>>>>>>>>>> I don't specify a custom config.properties, so the default is
>>>>>>>>>>> being
>>>>>>>>>>> used, which should load the wrap feature.
>>>>>>>>>>>
>>>>>>>>>>> Any ideas?
>>>>>>>>>>>
>>>>>>>>>>> Regards,
>>>>>>>>>>> Raman Gupta
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>
>>>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

[SOLVED] Re: Features validation: cannot find wrap

Posted by Raman Gupta <ro...@gmail.com>.
Got this figured out with some help on IRC from jbonofre. For future
posterity, the solution was to

1) add the framework to the verify <configuration>:

<distribution>org.apache.karaf.features:framework</distribution>
<framework>
  <feature>framework</feature>
</framework>

2) add the framework feature as a descriptor

3) ensure the org.apache.karaf.features.framework kar artifact is in
the dependencies with compile scope.

A good working demo:

https://github.com/rocketraman/test-karaf-verify/blob/master/test-verify/pom.xml

Regards,
Raman


On 01/28/2016 11:33 AM, Raman Gupta wrote:
> Thanks JB, here is a simple test case:
> 
> https://github.com/rocketraman/test-karaf-verify
> 
> Just run "mvn install" to see the issue.
> 
> Then, at
> https://github.com/rocketraman/test-karaf-verify/blob/master/dist/pom.xml#L41
> comment out the feature-with-slf4j and uncomment feature-without-slf4j
> to see that verification succeeds when slf4j is not a dependency.
> 
> Regards,
> Raman
> 
> 
> On 01/28/2016 10:31 AM, Jean-Baptiste Onofré wrote:
>> Hi Raman,
>>
>> Can you share both your pom.xml (as you already did) and your
>> features.xml ?
>> I gonna fix that for you.
>>
>> Thanks,
>> Regards
>> JB
>>
>> On 01/28/2016 04:27 PM, Raman Gupta wrote:
>>> JB, no problem, thanks for your help. Nope that does not work. All my
>>> features that use wrap already have wrap declared.
>>>
>>> I think I have this narrowed down a bit more. I eliminated any
>>> features that use wrap, and created the simplest possible features to
>>> test. I see that:
>>>
>>> - if a feature contains a bundle that declares an import of
>>> org.slf4j;version="[1.7,2)" then the verification fails with the error:
>>>
>>> missing requirement [my-bundle/1.0.0.SNAPSHOT] osgi.wiring.package;
>>> filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.7.0)(!(version>=2.0.0)))"]
>>>
>>>
>>> - if a feature contains a bundle that does not declare an import on
>>> org.slf4j, then the verification succeeds
>>>
>>> So, for some reason, perhaps the verification framework isn't loading
>>> the logging bundle?
>>>
>>> Interestingly, I tried adding <feature
>>> prerequisite="true">log</feature> to the feature under verification,
>>> but it just pushed the problem back by one system bundle. Instead of
>>> the error above, I got:
>>>
>>> missing requirement [org.apache.karaf.log.core/4.0.4]
>>> osgi.wiring.package;
>>> filter:="(&(osgi.wiring.package=org.ops4j.pax.logging.spi)(version>=1.8.0)(!(version>=2.0.0)))"]
>>>
>>>
>>> Thoughts?
>>>
>>> Regards,
>>> Raman
>>>
>>> On 01/28/2016 08:25 AM, Jean-Baptiste Onofré wrote:
>>>> Hi Raman,
>>>>
>>>> sorry I missed your message.
>>>>
>>>> As your com.myorg* feature needs wrap, and you validate transitive,
>>>> wrap feature should be part of the verify list/definition.
>>>>
>>>> Your features should define the wrap feature as dependency="true".
>>>>
>>>> Regards
>>>> JB
>>>>
>>>> On 01/28/2016 02:18 PM, Raman Gupta wrote:
>>>>> Was the pom below helpful in any way to understanding this issue?
>>>>>
>>>>> Thanks,
>>>>> Raman
>>>>>
>>>>> On 01/26/2016 01:00 PM, Raman Gupta wrote:
>>>>>> Here you go:
>>>>>>
>>>>>> http://pastebin.com/4F13xSp9
>>>>>>
>>>>>> Regards,
>>>>>> Raman
>>>>>>
>>>>>> On 01/26/2016 12:40 PM, Jean-Baptiste Onofré wrote:
>>>>>>> Can you share your pom.xml ?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Regards
>>>>>>> JB
>>>>>>>
>>>>>>> On 01/26/2016 06:39 PM, Raman Gupta wrote:
>>>>>>>> I didn't, but adding those does not help. I also tried adding
>>>>>>>> slf4j-api >= 1.6.0 as suggested by the error message. Still fails
>>>>>>>> with
>>>>>>>> the same error. I tried both the pom <dependencies> section as
>>>>>>>> well as
>>>>>>>> the plugin <dependencies>.
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Raman
>>>>>>>>
>>>>>>>> On 01/26/2016 12:24 PM, Jean-Baptiste Onofré wrote:
>>>>>>>>> Hi Raman,
>>>>>>>>>
>>>>>>>>> Can you check if standard feature dependency is present in the
>>>>>>>>> pom.xml
>>>>>>>>> and with compile as scope ?
>>>>>>>>>
>>>>>>>>> Basically, you should have:
>>>>>>>>>
>>>>>>>>>            <dependency>
>>>>>>>>>                <groupId>org.apache.karaf.features</groupId>
>>>>>>>>>                <artifactId>framework</artifactId>
>>>>>>>>>                <version>4.0.4</version>
>>>>>>>>>                <type>kar</type>
>>>>>>>>>            </dependency>
>>>>>>>>>            <dependency>
>>>>>>>>>                <groupId>org.apache.karaf.features</groupId>
>>>>>>>>>                <artifactId>standard</artifactId>
>>>>>>>>>                <version>4.0.4</version>
>>>>>>>>>                <classifier>features</classifier>
>>>>>>>>>                <type>xml</type>
>>>>>>>>>            </dependency>
>>>>>>>>>
>>>>>>>>> in your pom.xml.
>>>>>>>>>
>>>>>>>>> Is it the case ?
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Regards
>>>>>>>>> JB
>>>>>>>>>
>>>>>>>>> On 01/26/2016 06:18 PM, Raman Gupta wrote:
>>>>>>>>>> I am trying to use karaf-maven-plugin version 4.0.4 to verify a
>>>>>>>>>> feature, but always get the following error:
>>>>>>>>>>
>>>>>>>>>> Message: Unable to resolve root: missing requirement [root]
>>>>>>>>>> osgi.identity; osgi.identity=wrap; type=karaf.feature;
>>>>>>>>>> version=0;
>>>>>>>>>> filter:="(&(osgi.identity=wrap)(type=karaf.feature)(version>=0.0.0))"
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> [caused by: Unable to resolve wrap/0.0.0: missing requirement
>>>>>>>>>> [wrap/0.0.0] osgi.identity;
>>>>>>>>>> osgi.identity=org.ops4j.pax.url.wrap;
>>>>>>>>>> type=osgi.bundle; version="[2.4.5,2.4.5]"; resolution:=mandatory
>>>>>>>>>> [caused by: Unable to resolve org.ops4j.pax.url.wrap/2.4.5:
>>>>>>>>>> missing
>>>>>>>>>> requirement [org.ops4j.pax.url.wrap/2.4.5] osgi.wiring.package;
>>>>>>>>>> filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"]]
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> It seems that the pax wrap feature is not being loaded by the
>>>>>>>>>> verifier
>>>>>>>>>> (wrap is used in my features.xml).
>>>>>>>>>>
>>>>>>>>>> I don't specify a custom config.properties, so the default is
>>>>>>>>>> being
>>>>>>>>>> used, which should load the wrap feature.
>>>>>>>>>>
>>>>>>>>>> Any ideas?
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>> Raman Gupta
>>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>
>>>>
>>


Re: Features validation: cannot find wrap

Posted by Raman Gupta <ro...@gmail.com>.
Thanks JB, here is a simple test case:

https://github.com/rocketraman/test-karaf-verify

Just run "mvn install" to see the issue.

Then, at
https://github.com/rocketraman/test-karaf-verify/blob/master/dist/pom.xml#L41
comment out the feature-with-slf4j and uncomment feature-without-slf4j
to see that verification succeeds when slf4j is not a dependency.

Regards,
Raman


On 01/28/2016 10:31 AM, Jean-Baptiste Onofré wrote:
> Hi Raman,
> 
> Can you share both your pom.xml (as you already did) and your
> features.xml ?
> I gonna fix that for you.
> 
> Thanks,
> Regards
> JB
> 
> On 01/28/2016 04:27 PM, Raman Gupta wrote:
>> JB, no problem, thanks for your help. Nope that does not work. All my
>> features that use wrap already have wrap declared.
>>
>> I think I have this narrowed down a bit more. I eliminated any
>> features that use wrap, and created the simplest possible features to
>> test. I see that:
>>
>> - if a feature contains a bundle that declares an import of
>> org.slf4j;version="[1.7,2)" then the verification fails with the error:
>>
>> missing requirement [my-bundle/1.0.0.SNAPSHOT] osgi.wiring.package;
>> filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.7.0)(!(version>=2.0.0)))"]
>>
>>
>> - if a feature contains a bundle that does not declare an import on
>> org.slf4j, then the verification succeeds
>>
>> So, for some reason, perhaps the verification framework isn't loading
>> the logging bundle?
>>
>> Interestingly, I tried adding <feature
>> prerequisite="true">log</feature> to the feature under verification,
>> but it just pushed the problem back by one system bundle. Instead of
>> the error above, I got:
>>
>> missing requirement [org.apache.karaf.log.core/4.0.4]
>> osgi.wiring.package;
>> filter:="(&(osgi.wiring.package=org.ops4j.pax.logging.spi)(version>=1.8.0)(!(version>=2.0.0)))"]
>>
>>
>> Thoughts?
>>
>> Regards,
>> Raman
>>
>> On 01/28/2016 08:25 AM, Jean-Baptiste Onofré wrote:
>>> Hi Raman,
>>>
>>> sorry I missed your message.
>>>
>>> As your com.myorg* feature needs wrap, and you validate transitive,
>>> wrap feature should be part of the verify list/definition.
>>>
>>> Your features should define the wrap feature as dependency="true".
>>>
>>> Regards
>>> JB
>>>
>>> On 01/28/2016 02:18 PM, Raman Gupta wrote:
>>>> Was the pom below helpful in any way to understanding this issue?
>>>>
>>>> Thanks,
>>>> Raman
>>>>
>>>> On 01/26/2016 01:00 PM, Raman Gupta wrote:
>>>>> Here you go:
>>>>>
>>>>> http://pastebin.com/4F13xSp9
>>>>>
>>>>> Regards,
>>>>> Raman
>>>>>
>>>>> On 01/26/2016 12:40 PM, Jean-Baptiste Onofré wrote:
>>>>>> Can you share your pom.xml ?
>>>>>>
>>>>>> Thanks,
>>>>>> Regards
>>>>>> JB
>>>>>>
>>>>>> On 01/26/2016 06:39 PM, Raman Gupta wrote:
>>>>>>> I didn't, but adding those does not help. I also tried adding
>>>>>>> slf4j-api >= 1.6.0 as suggested by the error message. Still fails
>>>>>>> with
>>>>>>> the same error. I tried both the pom <dependencies> section as
>>>>>>> well as
>>>>>>> the plugin <dependencies>.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Raman
>>>>>>>
>>>>>>> On 01/26/2016 12:24 PM, Jean-Baptiste Onofré wrote:
>>>>>>>> Hi Raman,
>>>>>>>>
>>>>>>>> Can you check if standard feature dependency is present in the
>>>>>>>> pom.xml
>>>>>>>> and with compile as scope ?
>>>>>>>>
>>>>>>>> Basically, you should have:
>>>>>>>>
>>>>>>>>            <dependency>
>>>>>>>>                <groupId>org.apache.karaf.features</groupId>
>>>>>>>>                <artifactId>framework</artifactId>
>>>>>>>>                <version>4.0.4</version>
>>>>>>>>                <type>kar</type>
>>>>>>>>            </dependency>
>>>>>>>>            <dependency>
>>>>>>>>                <groupId>org.apache.karaf.features</groupId>
>>>>>>>>                <artifactId>standard</artifactId>
>>>>>>>>                <version>4.0.4</version>
>>>>>>>>                <classifier>features</classifier>
>>>>>>>>                <type>xml</type>
>>>>>>>>            </dependency>
>>>>>>>>
>>>>>>>> in your pom.xml.
>>>>>>>>
>>>>>>>> Is it the case ?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Regards
>>>>>>>> JB
>>>>>>>>
>>>>>>>> On 01/26/2016 06:18 PM, Raman Gupta wrote:
>>>>>>>>> I am trying to use karaf-maven-plugin version 4.0.4 to verify a
>>>>>>>>> feature, but always get the following error:
>>>>>>>>>
>>>>>>>>> Message: Unable to resolve root: missing requirement [root]
>>>>>>>>> osgi.identity; osgi.identity=wrap; type=karaf.feature;
>>>>>>>>> version=0;
>>>>>>>>> filter:="(&(osgi.identity=wrap)(type=karaf.feature)(version>=0.0.0))"
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> [caused by: Unable to resolve wrap/0.0.0: missing requirement
>>>>>>>>> [wrap/0.0.0] osgi.identity;
>>>>>>>>> osgi.identity=org.ops4j.pax.url.wrap;
>>>>>>>>> type=osgi.bundle; version="[2.4.5,2.4.5]"; resolution:=mandatory
>>>>>>>>> [caused by: Unable to resolve org.ops4j.pax.url.wrap/2.4.5:
>>>>>>>>> missing
>>>>>>>>> requirement [org.ops4j.pax.url.wrap/2.4.5] osgi.wiring.package;
>>>>>>>>> filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"]]
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> It seems that the pax wrap feature is not being loaded by the
>>>>>>>>> verifier
>>>>>>>>> (wrap is used in my features.xml).
>>>>>>>>>
>>>>>>>>> I don't specify a custom config.properties, so the default is
>>>>>>>>> being
>>>>>>>>> used, which should load the wrap feature.
>>>>>>>>>
>>>>>>>>> Any ideas?
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>> Raman Gupta
>>>>>>>>>
>>>>>>>>
>>>>>>
>>>>
>>>
> 

Re: Features validation: cannot find wrap

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Raman,

Can you share both your pom.xml (as you already did) and your features.xml ?
I gonna fix that for you.

Thanks,
Regards
JB

On 01/28/2016 04:27 PM, Raman Gupta wrote:
> JB, no problem, thanks for your help. Nope that does not work. All my
> features that use wrap already have wrap declared.
>
> I think I have this narrowed down a bit more. I eliminated any
> features that use wrap, and created the simplest possible features to
> test. I see that:
>
> - if a feature contains a bundle that declares an import of
> org.slf4j;version="[1.7,2)" then the verification fails with the error:
>
> missing requirement [my-bundle/1.0.0.SNAPSHOT] osgi.wiring.package;
> filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.7.0)(!(version>=2.0.0)))"]
>
> - if a feature contains a bundle that does not declare an import on
> org.slf4j, then the verification succeeds
>
> So, for some reason, perhaps the verification framework isn't loading
> the logging bundle?
>
> Interestingly, I tried adding <feature
> prerequisite="true">log</feature> to the feature under verification,
> but it just pushed the problem back by one system bundle. Instead of
> the error above, I got:
>
> missing requirement [org.apache.karaf.log.core/4.0.4]
> osgi.wiring.package;
> filter:="(&(osgi.wiring.package=org.ops4j.pax.logging.spi)(version>=1.8.0)(!(version>=2.0.0)))"]
>
> Thoughts?
>
> Regards,
> Raman
>
> On 01/28/2016 08:25 AM, Jean-Baptiste Onofré wrote:
>> Hi Raman,
>>
>> sorry I missed your message.
>>
>> As your com.myorg* feature needs wrap, and you validate transitive,
>> wrap feature should be part of the verify list/definition.
>>
>> Your features should define the wrap feature as dependency="true".
>>
>> Regards
>> JB
>>
>> On 01/28/2016 02:18 PM, Raman Gupta wrote:
>>> Was the pom below helpful in any way to understanding this issue?
>>>
>>> Thanks,
>>> Raman
>>>
>>> On 01/26/2016 01:00 PM, Raman Gupta wrote:
>>>> Here you go:
>>>>
>>>> http://pastebin.com/4F13xSp9
>>>>
>>>> Regards,
>>>> Raman
>>>>
>>>> On 01/26/2016 12:40 PM, Jean-Baptiste Onofré wrote:
>>>>> Can you share your pom.xml ?
>>>>>
>>>>> Thanks,
>>>>> Regards
>>>>> JB
>>>>>
>>>>> On 01/26/2016 06:39 PM, Raman Gupta wrote:
>>>>>> I didn't, but adding those does not help. I also tried adding
>>>>>> slf4j-api >= 1.6.0 as suggested by the error message. Still fails
>>>>>> with
>>>>>> the same error. I tried both the pom <dependencies> section as
>>>>>> well as
>>>>>> the plugin <dependencies>.
>>>>>>
>>>>>> Regards,
>>>>>> Raman
>>>>>>
>>>>>> On 01/26/2016 12:24 PM, Jean-Baptiste Onofré wrote:
>>>>>>> Hi Raman,
>>>>>>>
>>>>>>> Can you check if standard feature dependency is present in the
>>>>>>> pom.xml
>>>>>>> and with compile as scope ?
>>>>>>>
>>>>>>> Basically, you should have:
>>>>>>>
>>>>>>>            <dependency>
>>>>>>>                <groupId>org.apache.karaf.features</groupId>
>>>>>>>                <artifactId>framework</artifactId>
>>>>>>>                <version>4.0.4</version>
>>>>>>>                <type>kar</type>
>>>>>>>            </dependency>
>>>>>>>            <dependency>
>>>>>>>                <groupId>org.apache.karaf.features</groupId>
>>>>>>>                <artifactId>standard</artifactId>
>>>>>>>                <version>4.0.4</version>
>>>>>>>                <classifier>features</classifier>
>>>>>>>                <type>xml</type>
>>>>>>>            </dependency>
>>>>>>>
>>>>>>> in your pom.xml.
>>>>>>>
>>>>>>> Is it the case ?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Regards
>>>>>>> JB
>>>>>>>
>>>>>>> On 01/26/2016 06:18 PM, Raman Gupta wrote:
>>>>>>>> I am trying to use karaf-maven-plugin version 4.0.4 to verify a
>>>>>>>> feature, but always get the following error:
>>>>>>>>
>>>>>>>> Message: Unable to resolve root: missing requirement [root]
>>>>>>>> osgi.identity; osgi.identity=wrap; type=karaf.feature; version=0;
>>>>>>>> filter:="(&(osgi.identity=wrap)(type=karaf.feature)(version>=0.0.0))"
>>>>>>>>
>>>>>>>> [caused by: Unable to resolve wrap/0.0.0: missing requirement
>>>>>>>> [wrap/0.0.0] osgi.identity; osgi.identity=org.ops4j.pax.url.wrap;
>>>>>>>> type=osgi.bundle; version="[2.4.5,2.4.5]"; resolution:=mandatory
>>>>>>>> [caused by: Unable to resolve org.ops4j.pax.url.wrap/2.4.5:
>>>>>>>> missing
>>>>>>>> requirement [org.ops4j.pax.url.wrap/2.4.5] osgi.wiring.package;
>>>>>>>> filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"]]
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> It seems that the pax wrap feature is not being loaded by the
>>>>>>>> verifier
>>>>>>>> (wrap is used in my features.xml).
>>>>>>>>
>>>>>>>> I don't specify a custom config.properties, so the default is
>>>>>>>> being
>>>>>>>> used, which should load the wrap feature.
>>>>>>>>
>>>>>>>> Any ideas?
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Raman Gupta
>>>>>>>>
>>>>>>>
>>>>>
>>>
>>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Features validation: cannot find wrap

Posted by Raman Gupta <ro...@gmail.com>.
JB, no problem, thanks for your help. Nope that does not work. All my
features that use wrap already have wrap declared.

I think I have this narrowed down a bit more. I eliminated any
features that use wrap, and created the simplest possible features to
test. I see that:

- if a feature contains a bundle that declares an import of
org.slf4j;version="[1.7,2)" then the verification fails with the error:

missing requirement [my-bundle/1.0.0.SNAPSHOT] osgi.wiring.package;
filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.7.0)(!(version>=2.0.0)))"]

- if a feature contains a bundle that does not declare an import on
org.slf4j, then the verification succeeds

So, for some reason, perhaps the verification framework isn't loading
the logging bundle?

Interestingly, I tried adding <feature
prerequisite="true">log</feature> to the feature under verification,
but it just pushed the problem back by one system bundle. Instead of
the error above, I got:

missing requirement [org.apache.karaf.log.core/4.0.4]
osgi.wiring.package;
filter:="(&(osgi.wiring.package=org.ops4j.pax.logging.spi)(version>=1.8.0)(!(version>=2.0.0)))"]

Thoughts?

Regards,
Raman

On 01/28/2016 08:25 AM, Jean-Baptiste Onofré wrote:
> Hi Raman,
> 
> sorry I missed your message.
> 
> As your com.myorg* feature needs wrap, and you validate transitive,
> wrap feature should be part of the verify list/definition.
> 
> Your features should define the wrap feature as dependency="true".
> 
> Regards
> JB
> 
> On 01/28/2016 02:18 PM, Raman Gupta wrote:
>> Was the pom below helpful in any way to understanding this issue?
>>
>> Thanks,
>> Raman
>>
>> On 01/26/2016 01:00 PM, Raman Gupta wrote:
>>> Here you go:
>>>
>>> http://pastebin.com/4F13xSp9
>>>
>>> Regards,
>>> Raman
>>>
>>> On 01/26/2016 12:40 PM, Jean-Baptiste Onofré wrote:
>>>> Can you share your pom.xml ?
>>>>
>>>> Thanks,
>>>> Regards
>>>> JB
>>>>
>>>> On 01/26/2016 06:39 PM, Raman Gupta wrote:
>>>>> I didn't, but adding those does not help. I also tried adding
>>>>> slf4j-api >= 1.6.0 as suggested by the error message. Still fails
>>>>> with
>>>>> the same error. I tried both the pom <dependencies> section as
>>>>> well as
>>>>> the plugin <dependencies>.
>>>>>
>>>>> Regards,
>>>>> Raman
>>>>>
>>>>> On 01/26/2016 12:24 PM, Jean-Baptiste Onofré wrote:
>>>>>> Hi Raman,
>>>>>>
>>>>>> Can you check if standard feature dependency is present in the
>>>>>> pom.xml
>>>>>> and with compile as scope ?
>>>>>>
>>>>>> Basically, you should have:
>>>>>>
>>>>>>           <dependency>
>>>>>>               <groupId>org.apache.karaf.features</groupId>
>>>>>>               <artifactId>framework</artifactId>
>>>>>>               <version>4.0.4</version>
>>>>>>               <type>kar</type>
>>>>>>           </dependency>
>>>>>>           <dependency>
>>>>>>               <groupId>org.apache.karaf.features</groupId>
>>>>>>               <artifactId>standard</artifactId>
>>>>>>               <version>4.0.4</version>
>>>>>>               <classifier>features</classifier>
>>>>>>               <type>xml</type>
>>>>>>           </dependency>
>>>>>>
>>>>>> in your pom.xml.
>>>>>>
>>>>>> Is it the case ?
>>>>>>
>>>>>> Thanks,
>>>>>> Regards
>>>>>> JB
>>>>>>
>>>>>> On 01/26/2016 06:18 PM, Raman Gupta wrote:
>>>>>>> I am trying to use karaf-maven-plugin version 4.0.4 to verify a
>>>>>>> feature, but always get the following error:
>>>>>>>
>>>>>>> Message: Unable to resolve root: missing requirement [root]
>>>>>>> osgi.identity; osgi.identity=wrap; type=karaf.feature; version=0;
>>>>>>> filter:="(&(osgi.identity=wrap)(type=karaf.feature)(version>=0.0.0))"
>>>>>>>
>>>>>>> [caused by: Unable to resolve wrap/0.0.0: missing requirement
>>>>>>> [wrap/0.0.0] osgi.identity; osgi.identity=org.ops4j.pax.url.wrap;
>>>>>>> type=osgi.bundle; version="[2.4.5,2.4.5]"; resolution:=mandatory
>>>>>>> [caused by: Unable to resolve org.ops4j.pax.url.wrap/2.4.5:
>>>>>>> missing
>>>>>>> requirement [org.ops4j.pax.url.wrap/2.4.5] osgi.wiring.package;
>>>>>>> filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"]]
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> It seems that the pax wrap feature is not being loaded by the
>>>>>>> verifier
>>>>>>> (wrap is used in my features.xml).
>>>>>>>
>>>>>>> I don't specify a custom config.properties, so the default is
>>>>>>> being
>>>>>>> used, which should load the wrap feature.
>>>>>>>
>>>>>>> Any ideas?
>>>>>>>
>>>>>>> Regards,
>>>>>>> Raman Gupta
>>>>>>>
>>>>>>
>>>>
>>
> 

Re: Features validation: cannot find wrap

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Raman,

sorry I missed your message.

As your com.myorg* feature needs wrap, and you validate transitive, 
wrap feature should be part of the verify list/definition.

Your features should define the wrap feature as dependency="true".

Regards
JB

On 01/28/2016 02:18 PM, Raman Gupta wrote:
> Was the pom below helpful in any way to understanding this issue?
>
> Thanks,
> Raman
>
> On 01/26/2016 01:00 PM, Raman Gupta wrote:
>> Here you go:
>>
>> http://pastebin.com/4F13xSp9
>>
>> Regards,
>> Raman
>>
>> On 01/26/2016 12:40 PM, Jean-Baptiste Onofré wrote:
>>> Can you share your pom.xml ?
>>>
>>> Thanks,
>>> Regards
>>> JB
>>>
>>> On 01/26/2016 06:39 PM, Raman Gupta wrote:
>>>> I didn't, but adding those does not help. I also tried adding
>>>> slf4j-api >= 1.6.0 as suggested by the error message. Still fails with
>>>> the same error. I tried both the pom <dependencies> section as well as
>>>> the plugin <dependencies>.
>>>>
>>>> Regards,
>>>> Raman
>>>>
>>>> On 01/26/2016 12:24 PM, Jean-Baptiste Onofré wrote:
>>>>> Hi Raman,
>>>>>
>>>>> Can you check if standard feature dependency is present in the pom.xml
>>>>> and with compile as scope ?
>>>>>
>>>>> Basically, you should have:
>>>>>
>>>>>           <dependency>
>>>>>               <groupId>org.apache.karaf.features</groupId>
>>>>>               <artifactId>framework</artifactId>
>>>>>               <version>4.0.4</version>
>>>>>               <type>kar</type>
>>>>>           </dependency>
>>>>>           <dependency>
>>>>>               <groupId>org.apache.karaf.features</groupId>
>>>>>               <artifactId>standard</artifactId>
>>>>>               <version>4.0.4</version>
>>>>>               <classifier>features</classifier>
>>>>>               <type>xml</type>
>>>>>           </dependency>
>>>>>
>>>>> in your pom.xml.
>>>>>
>>>>> Is it the case ?
>>>>>
>>>>> Thanks,
>>>>> Regards
>>>>> JB
>>>>>
>>>>> On 01/26/2016 06:18 PM, Raman Gupta wrote:
>>>>>> I am trying to use karaf-maven-plugin version 4.0.4 to verify a
>>>>>> feature, but always get the following error:
>>>>>>
>>>>>> Message: Unable to resolve root: missing requirement [root]
>>>>>> osgi.identity; osgi.identity=wrap; type=karaf.feature; version=0;
>>>>>> filter:="(&(osgi.identity=wrap)(type=karaf.feature)(version>=0.0.0))"
>>>>>> [caused by: Unable to resolve wrap/0.0.0: missing requirement
>>>>>> [wrap/0.0.0] osgi.identity; osgi.identity=org.ops4j.pax.url.wrap;
>>>>>> type=osgi.bundle; version="[2.4.5,2.4.5]"; resolution:=mandatory
>>>>>> [caused by: Unable to resolve org.ops4j.pax.url.wrap/2.4.5: missing
>>>>>> requirement [org.ops4j.pax.url.wrap/2.4.5] osgi.wiring.package;
>>>>>> filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"]]
>>>>>>
>>>>>>
>>>>>>
>>>>>> It seems that the pax wrap feature is not being loaded by the
>>>>>> verifier
>>>>>> (wrap is used in my features.xml).
>>>>>>
>>>>>> I don't specify a custom config.properties, so the default is being
>>>>>> used, which should load the wrap feature.
>>>>>>
>>>>>> Any ideas?
>>>>>>
>>>>>> Regards,
>>>>>> Raman Gupta
>>>>>>
>>>>>
>>>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Features validation: cannot find wrap

Posted by Raman Gupta <ro...@gmail.com>.
Was the pom below helpful in any way to understanding this issue?

Thanks,
Raman

On 01/26/2016 01:00 PM, Raman Gupta wrote:
> Here you go:
> 
> http://pastebin.com/4F13xSp9
> 
> Regards,
> Raman
> 
> On 01/26/2016 12:40 PM, Jean-Baptiste Onofré wrote:
>> Can you share your pom.xml ?
>>
>> Thanks,
>> Regards
>> JB
>>
>> On 01/26/2016 06:39 PM, Raman Gupta wrote:
>>> I didn't, but adding those does not help. I also tried adding
>>> slf4j-api >= 1.6.0 as suggested by the error message. Still fails with
>>> the same error. I tried both the pom <dependencies> section as well as
>>> the plugin <dependencies>.
>>>
>>> Regards,
>>> Raman
>>>
>>> On 01/26/2016 12:24 PM, Jean-Baptiste Onofré wrote:
>>>> Hi Raman,
>>>>
>>>> Can you check if standard feature dependency is present in the pom.xml
>>>> and with compile as scope ?
>>>>
>>>> Basically, you should have:
>>>>
>>>>          <dependency>
>>>>              <groupId>org.apache.karaf.features</groupId>
>>>>              <artifactId>framework</artifactId>
>>>>              <version>4.0.4</version>
>>>>              <type>kar</type>
>>>>          </dependency>
>>>>          <dependency>
>>>>              <groupId>org.apache.karaf.features</groupId>
>>>>              <artifactId>standard</artifactId>
>>>>              <version>4.0.4</version>
>>>>              <classifier>features</classifier>
>>>>              <type>xml</type>
>>>>          </dependency>
>>>>
>>>> in your pom.xml.
>>>>
>>>> Is it the case ?
>>>>
>>>> Thanks,
>>>> Regards
>>>> JB
>>>>
>>>> On 01/26/2016 06:18 PM, Raman Gupta wrote:
>>>>> I am trying to use karaf-maven-plugin version 4.0.4 to verify a
>>>>> feature, but always get the following error:
>>>>>
>>>>> Message: Unable to resolve root: missing requirement [root]
>>>>> osgi.identity; osgi.identity=wrap; type=karaf.feature; version=0;
>>>>> filter:="(&(osgi.identity=wrap)(type=karaf.feature)(version>=0.0.0))"
>>>>> [caused by: Unable to resolve wrap/0.0.0: missing requirement
>>>>> [wrap/0.0.0] osgi.identity; osgi.identity=org.ops4j.pax.url.wrap;
>>>>> type=osgi.bundle; version="[2.4.5,2.4.5]"; resolution:=mandatory
>>>>> [caused by: Unable to resolve org.ops4j.pax.url.wrap/2.4.5: missing
>>>>> requirement [org.ops4j.pax.url.wrap/2.4.5] osgi.wiring.package;
>>>>> filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"]]
>>>>>
>>>>>
>>>>>
>>>>> It seems that the pax wrap feature is not being loaded by the
>>>>> verifier
>>>>> (wrap is used in my features.xml).
>>>>>
>>>>> I don't specify a custom config.properties, so the default is being
>>>>> used, which should load the wrap feature.
>>>>>
>>>>> Any ideas?
>>>>>
>>>>> Regards,
>>>>> Raman Gupta
>>>>>
>>>>
>>


Re: Features validation: cannot find wrap

Posted by Raman Gupta <ro...@gmail.com>.
Here you go:

http://pastebin.com/4F13xSp9

Regards,
Raman

On 01/26/2016 12:40 PM, Jean-Baptiste Onofré wrote:
> Can you share your pom.xml ?
> 
> Thanks,
> Regards
> JB
> 
> On 01/26/2016 06:39 PM, Raman Gupta wrote:
>> I didn't, but adding those does not help. I also tried adding
>> slf4j-api >= 1.6.0 as suggested by the error message. Still fails with
>> the same error. I tried both the pom <dependencies> section as well as
>> the plugin <dependencies>.
>>
>> Regards,
>> Raman
>>
>> On 01/26/2016 12:24 PM, Jean-Baptiste Onofré wrote:
>>> Hi Raman,
>>>
>>> Can you check if standard feature dependency is present in the pom.xml
>>> and with compile as scope ?
>>>
>>> Basically, you should have:
>>>
>>>          <dependency>
>>>              <groupId>org.apache.karaf.features</groupId>
>>>              <artifactId>framework</artifactId>
>>>              <version>4.0.4</version>
>>>              <type>kar</type>
>>>          </dependency>
>>>          <dependency>
>>>              <groupId>org.apache.karaf.features</groupId>
>>>              <artifactId>standard</artifactId>
>>>              <version>4.0.4</version>
>>>              <classifier>features</classifier>
>>>              <type>xml</type>
>>>          </dependency>
>>>
>>> in your pom.xml.
>>>
>>> Is it the case ?
>>>
>>> Thanks,
>>> Regards
>>> JB
>>>
>>> On 01/26/2016 06:18 PM, Raman Gupta wrote:
>>>> I am trying to use karaf-maven-plugin version 4.0.4 to verify a
>>>> feature, but always get the following error:
>>>>
>>>> Message: Unable to resolve root: missing requirement [root]
>>>> osgi.identity; osgi.identity=wrap; type=karaf.feature; version=0;
>>>> filter:="(&(osgi.identity=wrap)(type=karaf.feature)(version>=0.0.0))"
>>>> [caused by: Unable to resolve wrap/0.0.0: missing requirement
>>>> [wrap/0.0.0] osgi.identity; osgi.identity=org.ops4j.pax.url.wrap;
>>>> type=osgi.bundle; version="[2.4.5,2.4.5]"; resolution:=mandatory
>>>> [caused by: Unable to resolve org.ops4j.pax.url.wrap/2.4.5: missing
>>>> requirement [org.ops4j.pax.url.wrap/2.4.5] osgi.wiring.package;
>>>> filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"]]
>>>>
>>>>
>>>>
>>>> It seems that the pax wrap feature is not being loaded by the
>>>> verifier
>>>> (wrap is used in my features.xml).
>>>>
>>>> I don't specify a custom config.properties, so the default is being
>>>> used, which should load the wrap feature.
>>>>
>>>> Any ideas?
>>>>
>>>> Regards,
>>>> Raman Gupta
>>>>
>>>
> 

Re: Features validation: cannot find wrap

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Can you share your pom.xml ?

Thanks,
Regards
JB

On 01/26/2016 06:39 PM, Raman Gupta wrote:
> I didn't, but adding those does not help. I also tried adding
> slf4j-api >= 1.6.0 as suggested by the error message. Still fails with
> the same error. I tried both the pom <dependencies> section as well as
> the plugin <dependencies>.
>
> Regards,
> Raman
>
> On 01/26/2016 12:24 PM, Jean-Baptiste Onofré wrote:
>> Hi Raman,
>>
>> Can you check if standard feature dependency is present in the pom.xml
>> and with compile as scope ?
>>
>> Basically, you should have:
>>
>>          <dependency>
>>              <groupId>org.apache.karaf.features</groupId>
>>              <artifactId>framework</artifactId>
>>              <version>4.0.4</version>
>>              <type>kar</type>
>>          </dependency>
>>          <dependency>
>>              <groupId>org.apache.karaf.features</groupId>
>>              <artifactId>standard</artifactId>
>>              <version>4.0.4</version>
>>              <classifier>features</classifier>
>>              <type>xml</type>
>>          </dependency>
>>
>> in your pom.xml.
>>
>> Is it the case ?
>>
>> Thanks,
>> Regards
>> JB
>>
>> On 01/26/2016 06:18 PM, Raman Gupta wrote:
>>> I am trying to use karaf-maven-plugin version 4.0.4 to verify a
>>> feature, but always get the following error:
>>>
>>> Message: Unable to resolve root: missing requirement [root]
>>> osgi.identity; osgi.identity=wrap; type=karaf.feature; version=0;
>>> filter:="(&(osgi.identity=wrap)(type=karaf.feature)(version>=0.0.0))"
>>> [caused by: Unable to resolve wrap/0.0.0: missing requirement
>>> [wrap/0.0.0] osgi.identity; osgi.identity=org.ops4j.pax.url.wrap;
>>> type=osgi.bundle; version="[2.4.5,2.4.5]"; resolution:=mandatory
>>> [caused by: Unable to resolve org.ops4j.pax.url.wrap/2.4.5: missing
>>> requirement [org.ops4j.pax.url.wrap/2.4.5] osgi.wiring.package;
>>> filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"]]
>>>
>>>
>>> It seems that the pax wrap feature is not being loaded by the verifier
>>> (wrap is used in my features.xml).
>>>
>>> I don't specify a custom config.properties, so the default is being
>>> used, which should load the wrap feature.
>>>
>>> Any ideas?
>>>
>>> Regards,
>>> Raman Gupta
>>>
>>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Features validation: cannot find wrap

Posted by Raman Gupta <ro...@gmail.com>.
Some more info:

Originally in my <descriptors> I add included the Karaf features:

<descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor>
<descriptor>mvn:org.apache.karaf.features/spring/${karaf.version}/xml/features</descriptor>
<descriptor>mvn:org.apache.karaf.features/enterprise/${karaf.version}/xml/features</descriptor>

Removing those and keeping only my own feature descriptors results in
a different error:

[WARNING] Feature resolution failed for [myfeature/myversion]
Message: Unable to resolve root: missing requirement [root]
osgi.identity; osgi.identity=wrap; type=karaf.feature; version=0;
filter:="(&(osgi.identity=wrap)(type=karaf.feature)(version>=0.0.0))"

Regards,
Raman


On 01/26/2016 12:39 PM, Raman Gupta wrote:
> I didn't, but adding those does not help. I also tried adding
> slf4j-api >= 1.6.0 as suggested by the error message. Still fails with
> the same error. I tried both the pom <dependencies> section as well as
> the plugin <dependencies>.
> 
> Regards,
> Raman
> 
> On 01/26/2016 12:24 PM, Jean-Baptiste Onofré wrote:
>> Hi Raman,
>>
>> Can you check if standard feature dependency is present in the pom.xml
>> and with compile as scope ?
>>
>> Basically, you should have:
>>
>>         <dependency>
>>             <groupId>org.apache.karaf.features</groupId>
>>             <artifactId>framework</artifactId>
>>             <version>4.0.4</version>
>>             <type>kar</type>
>>         </dependency>
>>         <dependency>
>>             <groupId>org.apache.karaf.features</groupId>
>>             <artifactId>standard</artifactId>
>>             <version>4.0.4</version>
>>             <classifier>features</classifier>
>>             <type>xml</type>
>>         </dependency>
>>
>> in your pom.xml.
>>
>> Is it the case ?
>>
>> Thanks,
>> Regards
>> JB
>>
>> On 01/26/2016 06:18 PM, Raman Gupta wrote:
>>> I am trying to use karaf-maven-plugin version 4.0.4 to verify a
>>> feature, but always get the following error:
>>>
>>> Message: Unable to resolve root: missing requirement [root]
>>> osgi.identity; osgi.identity=wrap; type=karaf.feature; version=0;
>>> filter:="(&(osgi.identity=wrap)(type=karaf.feature)(version>=0.0.0))"
>>> [caused by: Unable to resolve wrap/0.0.0: missing requirement
>>> [wrap/0.0.0] osgi.identity; osgi.identity=org.ops4j.pax.url.wrap;
>>> type=osgi.bundle; version="[2.4.5,2.4.5]"; resolution:=mandatory
>>> [caused by: Unable to resolve org.ops4j.pax.url.wrap/2.4.5: missing
>>> requirement [org.ops4j.pax.url.wrap/2.4.5] osgi.wiring.package;
>>> filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"]]
>>>
>>>
>>> It seems that the pax wrap feature is not being loaded by the verifier
>>> (wrap is used in my features.xml).
>>>
>>> I don't specify a custom config.properties, so the default is being
>>> used, which should load the wrap feature.
>>>
>>> Any ideas?
>>>
>>> Regards,
>>> Raman Gupta
>>>
>>


Re: Features validation: cannot find wrap

Posted by Raman Gupta <ro...@gmail.com>.
I didn't, but adding those does not help. I also tried adding
slf4j-api >= 1.6.0 as suggested by the error message. Still fails with
the same error. I tried both the pom <dependencies> section as well as
the plugin <dependencies>.

Regards,
Raman

On 01/26/2016 12:24 PM, Jean-Baptiste Onofré wrote:
> Hi Raman,
> 
> Can you check if standard feature dependency is present in the pom.xml
> and with compile as scope ?
> 
> Basically, you should have:
> 
>         <dependency>
>             <groupId>org.apache.karaf.features</groupId>
>             <artifactId>framework</artifactId>
>             <version>4.0.4</version>
>             <type>kar</type>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.karaf.features</groupId>
>             <artifactId>standard</artifactId>
>             <version>4.0.4</version>
>             <classifier>features</classifier>
>             <type>xml</type>
>         </dependency>
> 
> in your pom.xml.
> 
> Is it the case ?
> 
> Thanks,
> Regards
> JB
> 
> On 01/26/2016 06:18 PM, Raman Gupta wrote:
>> I am trying to use karaf-maven-plugin version 4.0.4 to verify a
>> feature, but always get the following error:
>>
>> Message: Unable to resolve root: missing requirement [root]
>> osgi.identity; osgi.identity=wrap; type=karaf.feature; version=0;
>> filter:="(&(osgi.identity=wrap)(type=karaf.feature)(version>=0.0.0))"
>> [caused by: Unable to resolve wrap/0.0.0: missing requirement
>> [wrap/0.0.0] osgi.identity; osgi.identity=org.ops4j.pax.url.wrap;
>> type=osgi.bundle; version="[2.4.5,2.4.5]"; resolution:=mandatory
>> [caused by: Unable to resolve org.ops4j.pax.url.wrap/2.4.5: missing
>> requirement [org.ops4j.pax.url.wrap/2.4.5] osgi.wiring.package;
>> filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"]]
>>
>>
>> It seems that the pax wrap feature is not being loaded by the verifier
>> (wrap is used in my features.xml).
>>
>> I don't specify a custom config.properties, so the default is being
>> used, which should load the wrap feature.
>>
>> Any ideas?
>>
>> Regards,
>> Raman Gupta
>>
> 

Re: Features validation: cannot find wrap

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Raman,

Can you check if standard feature dependency is present in the pom.xml 
and with compile as scope ?

Basically, you should have:

         <dependency>
             <groupId>org.apache.karaf.features</groupId>
             <artifactId>framework</artifactId>
             <version>4.0.4</version>
             <type>kar</type>
         </dependency>
         <dependency>
             <groupId>org.apache.karaf.features</groupId>
             <artifactId>standard</artifactId>
             <version>4.0.4</version>
             <classifier>features</classifier>
             <type>xml</type>
         </dependency>

in your pom.xml.

Is it the case ?

Thanks,
Regards
JB

On 01/26/2016 06:18 PM, Raman Gupta wrote:
> I am trying to use karaf-maven-plugin version 4.0.4 to verify a
> feature, but always get the following error:
>
> Message: Unable to resolve root: missing requirement [root]
> osgi.identity; osgi.identity=wrap; type=karaf.feature; version=0;
> filter:="(&(osgi.identity=wrap)(type=karaf.feature)(version>=0.0.0))"
> [caused by: Unable to resolve wrap/0.0.0: missing requirement
> [wrap/0.0.0] osgi.identity; osgi.identity=org.ops4j.pax.url.wrap;
> type=osgi.bundle; version="[2.4.5,2.4.5]"; resolution:=mandatory
> [caused by: Unable to resolve org.ops4j.pax.url.wrap/2.4.5: missing
> requirement [org.ops4j.pax.url.wrap/2.4.5] osgi.wiring.package;
> filter:="(&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"]]
>
> It seems that the pax wrap feature is not being loaded by the verifier
> (wrap is used in my features.xml).
>
> I don't specify a custom config.properties, so the default is being
> used, which should load the wrap feature.
>
> Any ideas?
>
> Regards,
> Raman Gupta
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com