Feature installer

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Feature installer

Matthias Leinweber-2
Hello Team,

I encountered a strange behaviour while installing/using Groovy inside karaf. Depending on the installation order of the bundles a osgi.wiring.package is missing.
groovy.xml and groovy.util are not "there" if i install groovy-xml after groovy.

To reproduce the problem:

karaf@root()> bundle:install -s mvn:org.codehaus.groovy/groovy-xml/3.0.0-rc-1
Bundle ID: 124
karaf@root()> bundle:install -s mvn:org.codehaus.groovy/groovy/3.0.0-rc-1                                 Bundle ID: 125
karaf@root()> capabilities 124
groovy-xml [124] provides:
--------------------------
osgi.wiring.bundle; groovy-xml 3.0.0.rc-1 [UNUSED]
osgi.wiring.host; groovy-xml 3.0.0.rc-1 [UNUSED]
osgi.identity; groovy-xml 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; groovy.util 3.0.0.rc-1 required by:
   groovy [125]
osgi.wiring.package; groovy.util.slurpersupport 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; groovy.xml 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; groovy.xml.dom 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; groovy.xml.slurpersupport 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; groovy.xml.streamingmarkupsupport 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; org.apache.groovy.xml.extensions 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; org.apache.groovy.xml.tools 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; org.codehaus.groovy.runtime 3.0.0.rc-1 required by:
   groovy [125]
osgi.wiring.package; org.codehaus.groovy.tools.xml 3.0.0.rc-1 [UNUSED]

[Clean Restart Karaf]

karaf@root()> bundle:install -s mvn:org.codehaus.groovy/groovy/3.0.0-rc-1
Bundle ID: 124
karaf@root()> bundle:install -s mvn:org.codehaus.groovy/groovy-xml/3.0.0-rc-1
Bundle ID: 125
karaf@root()> capabilities 125
groovy-xml [125] provides:
--------------------------
osgi.wiring.bundle; groovy-xml 3.0.0.rc-1 [UNUSED]
osgi.wiring.host; groovy-xml 3.0.0.rc-1 [UNUSED]
osgi.identity; groovy-xml 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; groovy.util.slurpersupport 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; groovy.xml.dom 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; groovy.xml.slurpersupport 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; groovy.xml.streamingmarkupsupport 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; org.apache.groovy.xml.extensions 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; org.apache.groovy.xml.tools 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; org.codehaus.groovy.tools.xml 3.0.0.rc-1 [UNUSED]


[clean restart with feature install]
<features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0" name="feature-1.0-SNAPSHOT">
    <feature name="myfeature" version="1.0.0.SNAPSHOT">
        <bundle start-level="70">mvn:org.codehaus.groovy/groovy-xml/3.0.0-rc-1</bundle>
        <bundle start-level="80">mvn:org.codehaus.groovy/groovy/3.0.0-rc-1</bundle>
    </feature>
</features>

karaf@root()> capabilities 20
groovy-xml [20] provides:
-------------------------
osgi.wiring.bundle; groovy-xml 3.0.0.rc-1 [UNUSED]
osgi.wiring.host; groovy-xml 3.0.0.rc-1 [UNUSED]
osgi.identity; groovy-xml 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; groovy.util.slurpersupport 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; groovy.xml.dom 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; groovy.xml.slurpersupport 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; groovy.xml.streamingmarkupsupport 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; org.apache.groovy.xml.extensions 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; org.apache.groovy.xml.tools 3.0.0.rc-1 [UNUSED]
osgi.wiring.package; org.codehaus.groovy.tools.xml 3.0.0.rc-1 [UNUSED]

So is this a groovy problem or a feature installer problem?
Reply | Threaded
Open this post in threaded view
|

Re: Feature installer

jbonofre
Hi,

It can happen depending of the optional import resolution.

If groovy-xml has some optional, the resolution can be differ.
Did you try a refresh to see if the optionals are resolved ?

Let me take a look in the groovy bundle to see the optional and cap defined.

Regards
JB


On 13/11/2019 22:22, Matthias Leinweber wrote:

> Hello Team,
>
> I encountered a strange behaviour while installing/using Groovy inside
> karaf. Depending on the installation order of the bundles a
> osgi.wiring.package is missing.
> groovy.xml and groovy.util are not "there" if i install groovy-xml after
> groovy.
>
> To reproduce the problem:
>
> karaf@root()> bundle:install -s
> mvn:org.codehaus.groovy/groovy-xml/3.0.0-rc-1
> Bundle ID: 124
> karaf@root()> bundle:install -s
> mvn:org.codehaus.groovy/groovy/3.0.0-rc-1                              
>   Bundle ID: 125
> karaf@root()> capabilities 124
> groovy-xml [124] provides:
> --------------------------
> osgi.wiring.bundle; groovy-xml 3.0.0.rc-1 [UNUSED]
> osgi.wiring.host; groovy-xml 3.0.0.rc-1 [UNUSED]
> osgi.identity; groovy-xml 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; groovy.util 3.0.0.rc-1 required by:
>    groovy [125]
> osgi.wiring.package; groovy.util.slurpersupport 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; groovy.xml 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; groovy.xml.dom 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; groovy.xml.slurpersupport 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; groovy.xml.streamingmarkupsupport 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; org.apache.groovy.xml.extensions 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; org.apache.groovy.xml.tools 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; org.codehaus.groovy.runtime 3.0.0.rc-1 required by:
>    groovy [125]
> osgi.wiring.package; org.codehaus.groovy.tools.xml 3.0.0.rc-1 [UNUSED]
>
> [Clean Restart Karaf]
>
> karaf@root()> bundle:install -s mvn:org.codehaus.groovy/groovy/3.0.0-rc-1
> Bundle ID: 124
> karaf@root()> bundle:install -s
> mvn:org.codehaus.groovy/groovy-xml/3.0.0-rc-1
> Bundle ID: 125
> karaf@root()> capabilities 125
> groovy-xml [125] provides:
> --------------------------
> osgi.wiring.bundle; groovy-xml 3.0.0.rc-1 [UNUSED]
> osgi.wiring.host; groovy-xml 3.0.0.rc-1 [UNUSED]
> osgi.identity; groovy-xml 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; groovy.util.slurpersupport 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; groovy.xml.dom 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; groovy.xml.slurpersupport 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; groovy.xml.streamingmarkupsupport 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; org.apache.groovy.xml.extensions 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; org.apache.groovy.xml.tools 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; org.codehaus.groovy.tools.xml 3.0.0.rc-1 [UNUSED]
>
>
> [clean restart with feature install]
> <features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0"
> name="feature-1.0-SNAPSHOT">
>     <feature name="myfeature" version="1.0.0.SNAPSHOT">
>         <bundle
> start-level="70">mvn:org.codehaus.groovy/groovy-xml/3.0.0-rc-1</bundle>
>         <bundle
> start-level="80">mvn:org.codehaus.groovy/groovy/3.0.0-rc-1</bundle>
>     </feature>
> </features>
>
> karaf@root()> capabilities 20
> groovy-xml [20] provides:
> -------------------------
> osgi.wiring.bundle; groovy-xml 3.0.0.rc-1 [UNUSED]
> osgi.wiring.host; groovy-xml 3.0.0.rc-1 [UNUSED]
> osgi.identity; groovy-xml 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; groovy.util.slurpersupport 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; groovy.xml.dom 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; groovy.xml.slurpersupport 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; groovy.xml.streamingmarkupsupport 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; org.apache.groovy.xml.extensions 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; org.apache.groovy.xml.tools 3.0.0.rc-1 [UNUSED]
> osgi.wiring.package; org.codehaus.groovy.tools.xml 3.0.0.rc-1 [UNUSED]
>
> So is this a groovy problem or a feature installer problem?

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com