You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Alexey Romanov <al...@gmail.com> on 2012/04/09 13:12:39 UTC

iPOJO BND Plugin

How can I use iPOJO BND plugin? What instructions does it provide? Or
is it enough to include

-plugin: path_to_plugin/bnd-ipojo-plugin-1.8.2.jar

in my .bnd file?

Yours, Alexey Romanov

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: iPOJO BND Plugin

Posted by "Guillaume Sauthier (Objectweb)" <gu...@objectweb.org>.
As you can see in the example POM, you also need to place an additional
plugin dependency (containing the ipojo-bnd-plugin artifact's coordinates)
for the maven-bundle-plugin:

        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <extensions>true</extensions>
          <dependencies>
            <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>bnd-ipojo-plugin</artifactId>
            <version>1.8.4</version>
            </dependency>
          </dependencies>
        </plugin>

--G

2012/4/10 Guillaume Sauthier (Objectweb) <gu...@objectweb.org>

> Nop, the Bnd "-plugin" instruction must contains the plugin classname.
> Ex:
> -plugin
> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/src/main/resources/META-INF/metadata.xml;use-local-schemas=true
>
> The (optional) 'metadata' option instructs the plugin where to fin the
> metadata.xml file
> By default, it looks in the archive for a META-INF/metadata.xml file
>
> The (optional) 'use-local-schemas' property simply tells iPOJO to not
> verify XML validity against external resources but with the latest XML
> schemas included in the current version of the iPOJO manipulator
>
> Hope that helps
> --G
>
> PS here is an example:
> http://gitorious.ow2.org/ow2-shelbie/parent/blobs/master/pom.xml#line303
>
>
> 2012/4/9 Alexey Romanov <al...@gmail.com>
>
>> How can I use iPOJO BND plugin? What instructions does it provide? Or
>> is it enough to include
>>
>> -plugin: path_to_plugin/bnd-ipojo-plugin-1.8.2.jar
>>
>> in my .bnd file?
>>
>> Yours, Alexey Romanov
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>

Re: iPOJO BND Plugin

Posted by Alexey Romanov <al...@gmail.com>.
Now I have to do some actual work with it :)

Yours, Alexey Romanov



On Thu, Apr 12, 2012 at 12:21, Guillaume Sauthier (Objectweb)
<gu...@objectweb.org> wrote:
> This is nice to hear that you find a solution :)
> --G
>
> 2012/4/12 Alexey Romanov <al...@gmail.com>
>
>> Got things working. Seems like old version had been cached and picked
>> up from somewhere. Thanks again!
>>
>> Yours, Alexey Romanov
>>
>>
>>
>> On Wed, Apr 11, 2012 at 12:09, Guillaume Sauthier (Objectweb)
>> <gu...@objectweb.org> wrote:
>> > I've constructed a similar example exclusievely based on maven.
>> > After a "mvn clean install", I get the correct header (merging
>> annotations
>> > AND metadata.xml)
>> >
>> > Can you try it on your side ?
>> > --G
>> >
>> >
>> > 2012/4/11 Alexey Romanov <al...@gmail.com>
>> >>
>> >> This gave me a suspicion, which turned out to be correct: after adding
>> >> <component className="org.example.ExampleComponent"/> to metadata.xml
>> >> I get "I'm constructed" in output and
>> >>
>> >> IPOJO-Components = instance {
>> >> $component="org.example.ExampleComponent" }component {
>> >> $classname="org.example.ExampleComponent" manipulation { method {
>> >> $name="$init" }method { $arguments="{java.lang.String}"
>> >> $name="sayHello" $return="java.lang.String" }method { $name="start"
>> >> }method { $name="stop" }interface { $name="org.example.api.Greeting"
>> >> }}}
>> >>
>> >> in header. But still no result from @Validate @Invalidate annotations,
>> >> and I _really_ don't want to have to do everything in XML :(
>> >>
>> >> Yours, Alexey Romanov
>> >>
>> >>
>> >>
>> >> On Tue, Apr 10, 2012 at 18:34, Guillaume Sauthier (Objectweb)
>> >> <gu...@objectweb.org> wrote:
>> >> > Looks like the IPOJO-Components manifest's heasder is missing the
>> >> > component
>> >> > type description (something like component {class="some java class
>> >> > name",
>> >> > ....})
>> >> >
>> >> > Are you using annotations or XML file for declaring your components ?
>> >> > Can you show me your metadata.xml ?
>> >> >
>> >> > --G
>> >> >
>> >> > 2012/4/10 Alexey Romanov <al...@gmail.com>
>> >> >
>> >> >> Yes, just built it. Still no success:
>> >> >>
>> >> >> -> ps
>> >> >> START LEVEL 1
>> >> >>   ID   State         Level  Name
>> >> >> [   0] [Active     ] [    0] System Bundle (4.0.1)
>> >> >> [   1] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
>> >> >> [   2] [Active     ] [    1] BndToolsTest (0)
>> >> >> [   3] [Active     ] [    1] Apache Felix iPOJO Arch Command (1.6.0)
>> >> >> [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler (1.6.0)
>> >> >> [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
>> >> >> [   6] [Active     ] [    1] Apache Felix iPOJO (1.8.2)
>> >> >> [   7] [Active     ] [    1] Apache Felix Declarative Services
>> (1.6.0)
>> >> >> [   8] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
>> >> >> [   9] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
>> >> >> -> headers 9
>> >> >>
>> >> >> BndToolsTestIPojo (9)
>> >> >> ---------------------
>> >> >> Bnd-LastModified = 1334063371339
>> >> >> Bundle-ManifestVersion = 2
>> >> >> Bundle-Name = BndToolsTestIPojo
>> >> >> Bundle-SymbolicName = BndToolsTestIPojo
>> >> >> Bundle-Version = 0.0.1
>> >> >> Created-By = 1.6.0_31 (Sun Microsystems Inc.)
>> >> >> Import-Package =
>> >> >>
>> >> >>
>> >> >>
>> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
>> >> >> org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
>> >> >> Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
>> >> >> IPOJO-Components = instance {
>> $component="org.example.ExampleComponent"
>> >> >> }
>> >> >> Manifest-Version = 1.0
>> >> >> Private-Package = org.example
>> >> >> Tool = Bnd-1.51.0
>> >> >>
>> >> >> This is with bnd plugin version 1.8.2, manipulator 1.8.4 and core
>> >> >> built by Maven from source (changed version number to 1.8.2 to avoid
>> a
>> >> >> problem with Bndtools). Tried 1.9.0-SNAPSHOT of bnd-plugin and
>> >> >> manipulator as well. (Don't know why BND is still calculating
>> >> >> Import-Package versions to be 1.8.0.)
>> >> >>
>> >> >>
>> >> >> Yours, Alexey Romanov
>> >> >>
>> >> >>
>> >> >>
>> >> >> On Tue, Apr 10, 2012 at 17:50, Guillaume Sauthier (Objectweb)
>> >> >> <gu...@objectweb.org> wrote:
>> >> >> > Uh, looks like 1.8.2 is still not released
>> >> >> >
>> >> >> > Can you try with the iPOJO core ? (Should be 1.9.0-SNAPSHOT)
>> >> >> >
>> >> >> > --G
>> >> >> >
>> >> >> > 2012/4/10 Guillaume Sauthier (Objectweb) <
>> >> >> guillaume.sauthier@objectweb.org>
>> >> >> >
>> >> >> >> Another thing, Bnd requires the Manifest headers to start with an
>> >> >> >> uppercase character.
>> >> >> >> https://issues.apache.org/jira/browse/FELIX-3036
>> >> >> >>
>> >> >> >> Looks like it's is iPOJO 1.8.2
>> >> >> >>
>> >> >> >> --G
>> >> >> >>
>> >> >> >> 2012/4/10 Alexey Romanov <al...@gmail.com>
>> >> >> >>
>> >> >> >>> Found this bug on JIRA:
>> >> >> >>> https://issues.apache.org/jira/browse/FELIX-3389 However, after
>> >> >> >>> updating to org.apache.felix.ipojo.manipulator-1.8.4.jar, there
>> is
>> >> >> >>> no
>> >> >> >>> change.
>> >> >> >>>
>> >> >> >>> Yours, Alexey Romanov
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>> On Tue, Apr 10, 2012 at 14:29, Alexey Romanov
>> >> >> >>> <al...@gmail.com> wrote:
>> >> >> >>> > So, after adding the plugin,
>> >> >> >>> >
>> >> >> >>> > -plugin:
>> >> >> >>>
>> >> >>
>> >> >>
>> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/META-INF/metadata.xml;use-local-schemas=true
>> >> >> >>> >
>> >> >> >>> > it builds fine. I checked that META-INF/metadata.xml is
>> included
>> >> >> >>> > in
>> >> >> >>> > the JAR, and the plugin adds header "IPOJO-Components:
>> instance {
>> >> >> >>> > $component="org.example.ExampleComponent" }". But when it's
>> >> >> >>> > installed
>> >> >> >>> > and started, the component isn't created. Using online
>> >> >> >>> > manipulator
>> >> >> >>> > works fine. Any idea what could be a reason? E.g. am I missing
>> >> >> >>> > some
>> >> >> >>> > necessary bundle? Here is a log:
>> >> >> >>> >
>> >> >> >>> > -> ps
>> >> >> >>> > START LEVEL 1
>> >> >> >>> >   ID   State         Level  Name
>> >> >> >>> > [   0] [Active     ] [    0] System Bundle (4.0.1)
>> >> >> >>> > [   1] [Active     ] [    1] Apache Felix iPOJO (1.8.0)
>> >> >> >>> > [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
>> >> >> >>> > [   3] [Active     ] [    1] BndToolsTest (0)
>> >> >> >>> > [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler
>> >> >> >>> > (1.6.0)
>> >> >> >>> > [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
>> >> >> >>> > [   6] [Active     ] [    1] Apache Felix Declarative Services
>> >> >> (1.6.0)
>> >> >> >>> > [   7] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
>> >> >> >>> > [   8] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
>> >> >> >>> > -> uninstall 8
>> >> >> >>> > -> install
>> >> >> >>>
>> >> >>
>> >> >>
>> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >> >> >>> > Bundle ID: 9
>> >> >> >>> > -> start 9
>> >> >> >>> > -> headers 9
>> >> >> >>> >
>> >> >> >>> > BndToolsTestIPojo (9)
>> >> >> >>> > ----------------------
>> >> >> >>> > Bnd-LastModified = 1334052977766
>> >> >> >>> > Bundle-ManifestVersion = 2
>> >> >> >>> > Bundle-Name = BndToolsTestIPojo
>> >> >> >>> > Bundle-SymbolicName = BndToolsTestIPojo
>> >> >> >>> > Bundle-Version = 0.0.1
>> >> >> >>> > Created-By = 1.6.0_31 (Sun Microsystems Inc.)
>> >> >> >>> > Import-Package =
>> >> >> >>> >
>> >> >> >>>
>> >> >>
>> >> >>
>> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
>> >> >> >>>
>> >> >> >>> org.osgi.service.cm
>> ;version="1.2",org.osgi.service.log;version="1.3"
>> >> >> >>> > Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
>> >> >> >>> > IPOJO-Components = instance {
>> >> >> $component="org.example.ExampleComponent"
>> >> >> >>> }
>> >> >> >>> > Manifest-Version = 1.0
>> >> >> >>> > Private-Package = org.example
>> >> >> >>> > Tool = Bnd-1.51.0
>> >> >> >>> > -> uninstall 9
>> >> >> >>> > -> install
>> >> >> >>>
>> >> >>
>> >> >>
>> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >> >> >>> > Processing URL :
>> >> >> >>> >
>> >> >> >>>
>> >> >>
>> >> >>
>> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >> >> >>> > Extracted URL :
>> >> >> >>> >
>> >> >> >>>
>> >> >>
>> >> >>
>> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >> >> >>> > 3092 bytes copied
>> >> >> >>> > Metadata file found: META-INF/metadata.xml
>> >> >> >>> > 73 bytes copied
>> >> >> >>> > Metadata file saved to
>> >> >> >>> >
>> >> >> >>>
>> >> >>
>> >> >>
>> /home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/fw/bundle4/data/temp/ipojo_4326206654856524444.xml
>> >> >> >>> > Pojoization true - true
>> >> >> >>> > Manipulation done : true
>> >> >> >>> > Bundle ID: 10
>> >> >> >>> > -> start 10
>> >> >> >>> > -> I'm constructed...
>> >> >> >>> > I'm starting...
>> >> >> >>> >
>> >> >> >>> > Yours, Alexey Romanov
>> >> >> >>> >
>> >> >> >>> >
>> >> >> >>> >
>> >> >> >>> > On Tue, Apr 10, 2012 at 13:13, Alexey Romanov
>> >> >> >>> > <al...@gmail.com> wrote:
>> >> >> >>> >> Thank you! Yes, that does help. Though I wonder why
>> >> >> >>> >> org.apache.felix.ipojo.manipulator-1.8.2.jar is not available
>> >> >> >>> >> from
>> >> >> >>> >> iPOJO downloads page: BND plugin appears to depend on it
>> >> >> >>> >> (according
>> >> >> to
>> >> >> >>> >>
>> >> >> >>>
>> >> >>
>> >> >>
>> http://mvnrepository.com/artifact/org.apache.felix/bnd-ipojo-plugin/1.8.2
>> >> >> >>> ),
>> >> >> >>> >> and I was
>> >> >> >>> >> getting NoClassDefFoundError until adding it to the plugin
>> class
>> >> >> path.
>> >> >> >>> >>
>> >> >> >>> >> Yours, Alexey Romanov
>> >> >> >>> >>
>> >> >> >>> >>
>> >> >> >>> >>
>> >> >> >>> >> On Tue, Apr 10, 2012 at 12:42, Guillaume Sauthier (Objectweb)
>> >> >> >>> >> <gu...@objectweb.org> wrote:
>> >> >> >>> >>> Nop, the Bnd "-plugin" instruction must contains the plugin
>> >> >> classname.
>> >> >> >>> >>> Ex:
>> >> >> >>> >>> -plugin
>> >> >> >>> >>>
>> >> >> >>>
>> >> >>
>> >> >>
>> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/src/main/resources/META-INF/metadata.xml;use-local-schemas=true
>> >> >> >>> >>>
>> >> >> >>> >>> The (optional) 'metadata' option instructs the plugin where
>> to
>> >> >> >>> >>> fin
>> >> >> the
>> >> >> >>> >>> metadata.xml file
>> >> >> >>> >>> By default, it looks in the archive for a
>> META-INF/metadata.xml
>> >> >> file
>> >> >> >>> >>>
>> >> >> >>> >>> The (optional) 'use-local-schemas' property simply tells
>> iPOJO
>> >> >> >>> >>> to
>> >> >> not
>> >> >> >>> >>> verify XML validity against external resources but with the
>> >> >> >>> >>> latest
>> >> >> XML
>> >> >> >>> >>> schemas included in the current version of the iPOJO
>> >> >> >>> >>> manipulator
>> >> >> >>> >>>
>> >> >> >>> >>> Hope that helps
>> >> >> >>> >>> --G
>> >> >> >>> >>>
>> >> >> >>> >>> PS here is an example:
>> >> >> >>> >>>
>> >> >> >>>
>> >> >>
>> >> >>
>> http://gitorious.ow2.org/ow2-shelbie/parent/blobs/master/pom.xml#line303
>> >> >> >>> >>>
>> >> >> >>> >>>
>> >> >> >>> >>> 2012/4/9 Alexey Romanov <al...@gmail.com>
>> >> >> >>> >>>
>> >> >> >>> >>>> How can I use iPOJO BND plugin? What instructions does it
>> >> >> provide? Or
>> >> >> >>> >>>> is it enough to include
>> >> >> >>> >>>>
>> >> >> >>> >>>> -plugin: path_to_plugin/bnd-ipojo-plugin-1.8.2.jar
>> >> >> >>> >>>>
>> >> >> >>> >>>> in my .bnd file?
>> >> >> >>> >>>>
>> >> >> >>> >>>> Yours, Alexey Romanov
>> >> >> >>> >>>>
>> >> >> >>> >>>>
>> >> >> ---------------------------------------------------------------------
>> >> >> >>> >>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >> >> >>> >>>> For additional commands, e-mail:
>> users-help@felix.apache.org
>> >> >> >>> >>>>
>> >> >> >>> >>>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> ---------------------------------------------------------------------
>> >> >> >>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >> >> >>> For additional commands, e-mail: users-help@felix.apache.org
>> >> >> >>>
>> >> >> >>>
>> >> >> >>
>> >> >>
>> >> >> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >> >> For additional commands, e-mail: users-help@felix.apache.org
>> >> >>
>> >> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >> For additional commands, e-mail: users-help@felix.apache.org
>> >>
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> > For additional commands, e-mail: users-help@felix.apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: iPOJO BND Plugin

Posted by "Guillaume Sauthier (Objectweb)" <gu...@objectweb.org>.
This is nice to hear that you find a solution :)
--G

2012/4/12 Alexey Romanov <al...@gmail.com>

> Got things working. Seems like old version had been cached and picked
> up from somewhere. Thanks again!
>
> Yours, Alexey Romanov
>
>
>
> On Wed, Apr 11, 2012 at 12:09, Guillaume Sauthier (Objectweb)
> <gu...@objectweb.org> wrote:
> > I've constructed a similar example exclusievely based on maven.
> > After a "mvn clean install", I get the correct header (merging
> annotations
> > AND metadata.xml)
> >
> > Can you try it on your side ?
> > --G
> >
> >
> > 2012/4/11 Alexey Romanov <al...@gmail.com>
> >>
> >> This gave me a suspicion, which turned out to be correct: after adding
> >> <component className="org.example.ExampleComponent"/> to metadata.xml
> >> I get "I'm constructed" in output and
> >>
> >> IPOJO-Components = instance {
> >> $component="org.example.ExampleComponent" }component {
> >> $classname="org.example.ExampleComponent" manipulation { method {
> >> $name="$init" }method { $arguments="{java.lang.String}"
> >> $name="sayHello" $return="java.lang.String" }method { $name="start"
> >> }method { $name="stop" }interface { $name="org.example.api.Greeting"
> >> }}}
> >>
> >> in header. But still no result from @Validate @Invalidate annotations,
> >> and I _really_ don't want to have to do everything in XML :(
> >>
> >> Yours, Alexey Romanov
> >>
> >>
> >>
> >> On Tue, Apr 10, 2012 at 18:34, Guillaume Sauthier (Objectweb)
> >> <gu...@objectweb.org> wrote:
> >> > Looks like the IPOJO-Components manifest's heasder is missing the
> >> > component
> >> > type description (something like component {class="some java class
> >> > name",
> >> > ....})
> >> >
> >> > Are you using annotations or XML file for declaring your components ?
> >> > Can you show me your metadata.xml ?
> >> >
> >> > --G
> >> >
> >> > 2012/4/10 Alexey Romanov <al...@gmail.com>
> >> >
> >> >> Yes, just built it. Still no success:
> >> >>
> >> >> -> ps
> >> >> START LEVEL 1
> >> >>   ID   State         Level  Name
> >> >> [   0] [Active     ] [    0] System Bundle (4.0.1)
> >> >> [   1] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> >> >> [   2] [Active     ] [    1] BndToolsTest (0)
> >> >> [   3] [Active     ] [    1] Apache Felix iPOJO Arch Command (1.6.0)
> >> >> [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler (1.6.0)
> >> >> [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> >> >> [   6] [Active     ] [    1] Apache Felix iPOJO (1.8.2)
> >> >> [   7] [Active     ] [    1] Apache Felix Declarative Services
> (1.6.0)
> >> >> [   8] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
> >> >> [   9] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
> >> >> -> headers 9
> >> >>
> >> >> BndToolsTestIPojo (9)
> >> >> ---------------------
> >> >> Bnd-LastModified = 1334063371339
> >> >> Bundle-ManifestVersion = 2
> >> >> Bundle-Name = BndToolsTestIPojo
> >> >> Bundle-SymbolicName = BndToolsTestIPojo
> >> >> Bundle-Version = 0.0.1
> >> >> Created-By = 1.6.0_31 (Sun Microsystems Inc.)
> >> >> Import-Package =
> >> >>
> >> >>
> >> >>
> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
> >> >> org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
> >> >> Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
> >> >> IPOJO-Components = instance {
> $component="org.example.ExampleComponent"
> >> >> }
> >> >> Manifest-Version = 1.0
> >> >> Private-Package = org.example
> >> >> Tool = Bnd-1.51.0
> >> >>
> >> >> This is with bnd plugin version 1.8.2, manipulator 1.8.4 and core
> >> >> built by Maven from source (changed version number to 1.8.2 to avoid
> a
> >> >> problem with Bndtools). Tried 1.9.0-SNAPSHOT of bnd-plugin and
> >> >> manipulator as well. (Don't know why BND is still calculating
> >> >> Import-Package versions to be 1.8.0.)
> >> >>
> >> >>
> >> >> Yours, Alexey Romanov
> >> >>
> >> >>
> >> >>
> >> >> On Tue, Apr 10, 2012 at 17:50, Guillaume Sauthier (Objectweb)
> >> >> <gu...@objectweb.org> wrote:
> >> >> > Uh, looks like 1.8.2 is still not released
> >> >> >
> >> >> > Can you try with the iPOJO core ? (Should be 1.9.0-SNAPSHOT)
> >> >> >
> >> >> > --G
> >> >> >
> >> >> > 2012/4/10 Guillaume Sauthier (Objectweb) <
> >> >> guillaume.sauthier@objectweb.org>
> >> >> >
> >> >> >> Another thing, Bnd requires the Manifest headers to start with an
> >> >> >> uppercase character.
> >> >> >> https://issues.apache.org/jira/browse/FELIX-3036
> >> >> >>
> >> >> >> Looks like it's is iPOJO 1.8.2
> >> >> >>
> >> >> >> --G
> >> >> >>
> >> >> >> 2012/4/10 Alexey Romanov <al...@gmail.com>
> >> >> >>
> >> >> >>> Found this bug on JIRA:
> >> >> >>> https://issues.apache.org/jira/browse/FELIX-3389 However, after
> >> >> >>> updating to org.apache.felix.ipojo.manipulator-1.8.4.jar, there
> is
> >> >> >>> no
> >> >> >>> change.
> >> >> >>>
> >> >> >>> Yours, Alexey Romanov
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>> On Tue, Apr 10, 2012 at 14:29, Alexey Romanov
> >> >> >>> <al...@gmail.com> wrote:
> >> >> >>> > So, after adding the plugin,
> >> >> >>> >
> >> >> >>> > -plugin:
> >> >> >>>
> >> >>
> >> >>
> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/META-INF/metadata.xml;use-local-schemas=true
> >> >> >>> >
> >> >> >>> > it builds fine. I checked that META-INF/metadata.xml is
> included
> >> >> >>> > in
> >> >> >>> > the JAR, and the plugin adds header "IPOJO-Components:
> instance {
> >> >> >>> > $component="org.example.ExampleComponent" }". But when it's
> >> >> >>> > installed
> >> >> >>> > and started, the component isn't created. Using online
> >> >> >>> > manipulator
> >> >> >>> > works fine. Any idea what could be a reason? E.g. am I missing
> >> >> >>> > some
> >> >> >>> > necessary bundle? Here is a log:
> >> >> >>> >
> >> >> >>> > -> ps
> >> >> >>> > START LEVEL 1
> >> >> >>> >   ID   State         Level  Name
> >> >> >>> > [   0] [Active     ] [    0] System Bundle (4.0.1)
> >> >> >>> > [   1] [Active     ] [    1] Apache Felix iPOJO (1.8.0)
> >> >> >>> > [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> >> >> >>> > [   3] [Active     ] [    1] BndToolsTest (0)
> >> >> >>> > [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler
> >> >> >>> > (1.6.0)
> >> >> >>> > [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> >> >> >>> > [   6] [Active     ] [    1] Apache Felix Declarative Services
> >> >> (1.6.0)
> >> >> >>> > [   7] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
> >> >> >>> > [   8] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
> >> >> >>> > -> uninstall 8
> >> >> >>> > -> install
> >> >> >>>
> >> >>
> >> >>
> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> >> >> >>> > Bundle ID: 9
> >> >> >>> > -> start 9
> >> >> >>> > -> headers 9
> >> >> >>> >
> >> >> >>> > BndToolsTestIPojo (9)
> >> >> >>> > ----------------------
> >> >> >>> > Bnd-LastModified = 1334052977766
> >> >> >>> > Bundle-ManifestVersion = 2
> >> >> >>> > Bundle-Name = BndToolsTestIPojo
> >> >> >>> > Bundle-SymbolicName = BndToolsTestIPojo
> >> >> >>> > Bundle-Version = 0.0.1
> >> >> >>> > Created-By = 1.6.0_31 (Sun Microsystems Inc.)
> >> >> >>> > Import-Package =
> >> >> >>> >
> >> >> >>>
> >> >>
> >> >>
> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
> >> >> >>>
> >> >> >>> org.osgi.service.cm
> ;version="1.2",org.osgi.service.log;version="1.3"
> >> >> >>> > Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
> >> >> >>> > IPOJO-Components = instance {
> >> >> $component="org.example.ExampleComponent"
> >> >> >>> }
> >> >> >>> > Manifest-Version = 1.0
> >> >> >>> > Private-Package = org.example
> >> >> >>> > Tool = Bnd-1.51.0
> >> >> >>> > -> uninstall 9
> >> >> >>> > -> install
> >> >> >>>
> >> >>
> >> >>
> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> >> >> >>> > Processing URL :
> >> >> >>> >
> >> >> >>>
> >> >>
> >> >>
> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> >> >> >>> > Extracted URL :
> >> >> >>> >
> >> >> >>>
> >> >>
> >> >>
> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> >> >> >>> > 3092 bytes copied
> >> >> >>> > Metadata file found: META-INF/metadata.xml
> >> >> >>> > 73 bytes copied
> >> >> >>> > Metadata file saved to
> >> >> >>> >
> >> >> >>>
> >> >>
> >> >>
> /home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/fw/bundle4/data/temp/ipojo_4326206654856524444.xml
> >> >> >>> > Pojoization true - true
> >> >> >>> > Manipulation done : true
> >> >> >>> > Bundle ID: 10
> >> >> >>> > -> start 10
> >> >> >>> > -> I'm constructed...
> >> >> >>> > I'm starting...
> >> >> >>> >
> >> >> >>> > Yours, Alexey Romanov
> >> >> >>> >
> >> >> >>> >
> >> >> >>> >
> >> >> >>> > On Tue, Apr 10, 2012 at 13:13, Alexey Romanov
> >> >> >>> > <al...@gmail.com> wrote:
> >> >> >>> >> Thank you! Yes, that does help. Though I wonder why
> >> >> >>> >> org.apache.felix.ipojo.manipulator-1.8.2.jar is not available
> >> >> >>> >> from
> >> >> >>> >> iPOJO downloads page: BND plugin appears to depend on it
> >> >> >>> >> (according
> >> >> to
> >> >> >>> >>
> >> >> >>>
> >> >>
> >> >>
> http://mvnrepository.com/artifact/org.apache.felix/bnd-ipojo-plugin/1.8.2
> >> >> >>> ),
> >> >> >>> >> and I was
> >> >> >>> >> getting NoClassDefFoundError until adding it to the plugin
> class
> >> >> path.
> >> >> >>> >>
> >> >> >>> >> Yours, Alexey Romanov
> >> >> >>> >>
> >> >> >>> >>
> >> >> >>> >>
> >> >> >>> >> On Tue, Apr 10, 2012 at 12:42, Guillaume Sauthier (Objectweb)
> >> >> >>> >> <gu...@objectweb.org> wrote:
> >> >> >>> >>> Nop, the Bnd "-plugin" instruction must contains the plugin
> >> >> classname.
> >> >> >>> >>> Ex:
> >> >> >>> >>> -plugin
> >> >> >>> >>>
> >> >> >>>
> >> >>
> >> >>
> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/src/main/resources/META-INF/metadata.xml;use-local-schemas=true
> >> >> >>> >>>
> >> >> >>> >>> The (optional) 'metadata' option instructs the plugin where
> to
> >> >> >>> >>> fin
> >> >> the
> >> >> >>> >>> metadata.xml file
> >> >> >>> >>> By default, it looks in the archive for a
> META-INF/metadata.xml
> >> >> file
> >> >> >>> >>>
> >> >> >>> >>> The (optional) 'use-local-schemas' property simply tells
> iPOJO
> >> >> >>> >>> to
> >> >> not
> >> >> >>> >>> verify XML validity against external resources but with the
> >> >> >>> >>> latest
> >> >> XML
> >> >> >>> >>> schemas included in the current version of the iPOJO
> >> >> >>> >>> manipulator
> >> >> >>> >>>
> >> >> >>> >>> Hope that helps
> >> >> >>> >>> --G
> >> >> >>> >>>
> >> >> >>> >>> PS here is an example:
> >> >> >>> >>>
> >> >> >>>
> >> >>
> >> >>
> http://gitorious.ow2.org/ow2-shelbie/parent/blobs/master/pom.xml#line303
> >> >> >>> >>>
> >> >> >>> >>>
> >> >> >>> >>> 2012/4/9 Alexey Romanov <al...@gmail.com>
> >> >> >>> >>>
> >> >> >>> >>>> How can I use iPOJO BND plugin? What instructions does it
> >> >> provide? Or
> >> >> >>> >>>> is it enough to include
> >> >> >>> >>>>
> >> >> >>> >>>> -plugin: path_to_plugin/bnd-ipojo-plugin-1.8.2.jar
> >> >> >>> >>>>
> >> >> >>> >>>> in my .bnd file?
> >> >> >>> >>>>
> >> >> >>> >>>> Yours, Alexey Romanov
> >> >> >>> >>>>
> >> >> >>> >>>>
> >> >> ---------------------------------------------------------------------
> >> >> >>> >>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> >> >>> >>>> For additional commands, e-mail:
> users-help@felix.apache.org
> >> >> >>> >>>>
> >> >> >>> >>>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> ---------------------------------------------------------------------
> >> >> >>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> >> >>> For additional commands, e-mail: users-help@felix.apache.org
> >> >> >>>
> >> >> >>>
> >> >> >>
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> >> For additional commands, e-mail: users-help@felix.apache.org
> >> >>
> >> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: iPOJO BND Plugin

Posted by Alexey Romanov <al...@gmail.com>.
Got things working. Seems like old version had been cached and picked
up from somewhere. Thanks again!

Yours, Alexey Romanov



On Wed, Apr 11, 2012 at 12:09, Guillaume Sauthier (Objectweb)
<gu...@objectweb.org> wrote:
> I've constructed a similar example exclusievely based on maven.
> After a "mvn clean install", I get the correct header (merging annotations
> AND metadata.xml)
>
> Can you try it on your side ?
> --G
>
>
> 2012/4/11 Alexey Romanov <al...@gmail.com>
>>
>> This gave me a suspicion, which turned out to be correct: after adding
>> <component className="org.example.ExampleComponent"/> to metadata.xml
>> I get "I'm constructed" in output and
>>
>> IPOJO-Components = instance {
>> $component="org.example.ExampleComponent" }component {
>> $classname="org.example.ExampleComponent" manipulation { method {
>> $name="$init" }method { $arguments="{java.lang.String}"
>> $name="sayHello" $return="java.lang.String" }method { $name="start"
>> }method { $name="stop" }interface { $name="org.example.api.Greeting"
>> }}}
>>
>> in header. But still no result from @Validate @Invalidate annotations,
>> and I _really_ don't want to have to do everything in XML :(
>>
>> Yours, Alexey Romanov
>>
>>
>>
>> On Tue, Apr 10, 2012 at 18:34, Guillaume Sauthier (Objectweb)
>> <gu...@objectweb.org> wrote:
>> > Looks like the IPOJO-Components manifest's heasder is missing the
>> > component
>> > type description (something like component {class="some java class
>> > name",
>> > ....})
>> >
>> > Are you using annotations or XML file for declaring your components ?
>> > Can you show me your metadata.xml ?
>> >
>> > --G
>> >
>> > 2012/4/10 Alexey Romanov <al...@gmail.com>
>> >
>> >> Yes, just built it. Still no success:
>> >>
>> >> -> ps
>> >> START LEVEL 1
>> >>   ID   State         Level  Name
>> >> [   0] [Active     ] [    0] System Bundle (4.0.1)
>> >> [   1] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
>> >> [   2] [Active     ] [    1] BndToolsTest (0)
>> >> [   3] [Active     ] [    1] Apache Felix iPOJO Arch Command (1.6.0)
>> >> [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler (1.6.0)
>> >> [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
>> >> [   6] [Active     ] [    1] Apache Felix iPOJO (1.8.2)
>> >> [   7] [Active     ] [    1] Apache Felix Declarative Services (1.6.0)
>> >> [   8] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
>> >> [   9] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
>> >> -> headers 9
>> >>
>> >> BndToolsTestIPojo (9)
>> >> ---------------------
>> >> Bnd-LastModified = 1334063371339
>> >> Bundle-ManifestVersion = 2
>> >> Bundle-Name = BndToolsTestIPojo
>> >> Bundle-SymbolicName = BndToolsTestIPojo
>> >> Bundle-Version = 0.0.1
>> >> Created-By = 1.6.0_31 (Sun Microsystems Inc.)
>> >> Import-Package =
>> >>
>> >>
>> >> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
>> >> org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
>> >> Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
>> >> IPOJO-Components = instance { $component="org.example.ExampleComponent"
>> >> }
>> >> Manifest-Version = 1.0
>> >> Private-Package = org.example
>> >> Tool = Bnd-1.51.0
>> >>
>> >> This is with bnd plugin version 1.8.2, manipulator 1.8.4 and core
>> >> built by Maven from source (changed version number to 1.8.2 to avoid a
>> >> problem with Bndtools). Tried 1.9.0-SNAPSHOT of bnd-plugin and
>> >> manipulator as well. (Don't know why BND is still calculating
>> >> Import-Package versions to be 1.8.0.)
>> >>
>> >>
>> >> Yours, Alexey Romanov
>> >>
>> >>
>> >>
>> >> On Tue, Apr 10, 2012 at 17:50, Guillaume Sauthier (Objectweb)
>> >> <gu...@objectweb.org> wrote:
>> >> > Uh, looks like 1.8.2 is still not released
>> >> >
>> >> > Can you try with the iPOJO core ? (Should be 1.9.0-SNAPSHOT)
>> >> >
>> >> > --G
>> >> >
>> >> > 2012/4/10 Guillaume Sauthier (Objectweb) <
>> >> guillaume.sauthier@objectweb.org>
>> >> >
>> >> >> Another thing, Bnd requires the Manifest headers to start with an
>> >> >> uppercase character.
>> >> >> https://issues.apache.org/jira/browse/FELIX-3036
>> >> >>
>> >> >> Looks like it's is iPOJO 1.8.2
>> >> >>
>> >> >> --G
>> >> >>
>> >> >> 2012/4/10 Alexey Romanov <al...@gmail.com>
>> >> >>
>> >> >>> Found this bug on JIRA:
>> >> >>> https://issues.apache.org/jira/browse/FELIX-3389 However, after
>> >> >>> updating to org.apache.felix.ipojo.manipulator-1.8.4.jar, there is
>> >> >>> no
>> >> >>> change.
>> >> >>>
>> >> >>> Yours, Alexey Romanov
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> On Tue, Apr 10, 2012 at 14:29, Alexey Romanov
>> >> >>> <al...@gmail.com> wrote:
>> >> >>> > So, after adding the plugin,
>> >> >>> >
>> >> >>> > -plugin:
>> >> >>>
>> >>
>> >> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/META-INF/metadata.xml;use-local-schemas=true
>> >> >>> >
>> >> >>> > it builds fine. I checked that META-INF/metadata.xml is included
>> >> >>> > in
>> >> >>> > the JAR, and the plugin adds header "IPOJO-Components: instance {
>> >> >>> > $component="org.example.ExampleComponent" }". But when it's
>> >> >>> > installed
>> >> >>> > and started, the component isn't created. Using online
>> >> >>> > manipulator
>> >> >>> > works fine. Any idea what could be a reason? E.g. am I missing
>> >> >>> > some
>> >> >>> > necessary bundle? Here is a log:
>> >> >>> >
>> >> >>> > -> ps
>> >> >>> > START LEVEL 1
>> >> >>> >   ID   State         Level  Name
>> >> >>> > [   0] [Active     ] [    0] System Bundle (4.0.1)
>> >> >>> > [   1] [Active     ] [    1] Apache Felix iPOJO (1.8.0)
>> >> >>> > [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
>> >> >>> > [   3] [Active     ] [    1] BndToolsTest (0)
>> >> >>> > [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler
>> >> >>> > (1.6.0)
>> >> >>> > [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
>> >> >>> > [   6] [Active     ] [    1] Apache Felix Declarative Services
>> >> (1.6.0)
>> >> >>> > [   7] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
>> >> >>> > [   8] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
>> >> >>> > -> uninstall 8
>> >> >>> > -> install
>> >> >>>
>> >>
>> >> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >> >>> > Bundle ID: 9
>> >> >>> > -> start 9
>> >> >>> > -> headers 9
>> >> >>> >
>> >> >>> > BndToolsTestIPojo (9)
>> >> >>> > ----------------------
>> >> >>> > Bnd-LastModified = 1334052977766
>> >> >>> > Bundle-ManifestVersion = 2
>> >> >>> > Bundle-Name = BndToolsTestIPojo
>> >> >>> > Bundle-SymbolicName = BndToolsTestIPojo
>> >> >>> > Bundle-Version = 0.0.1
>> >> >>> > Created-By = 1.6.0_31 (Sun Microsystems Inc.)
>> >> >>> > Import-Package =
>> >> >>> >
>> >> >>>
>> >>
>> >> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
>> >> >>>
>> >> >>> org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
>> >> >>> > Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
>> >> >>> > IPOJO-Components = instance {
>> >> $component="org.example.ExampleComponent"
>> >> >>> }
>> >> >>> > Manifest-Version = 1.0
>> >> >>> > Private-Package = org.example
>> >> >>> > Tool = Bnd-1.51.0
>> >> >>> > -> uninstall 9
>> >> >>> > -> install
>> >> >>>
>> >>
>> >> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >> >>> > Processing URL :
>> >> >>> >
>> >> >>>
>> >>
>> >> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >> >>> > Extracted URL :
>> >> >>> >
>> >> >>>
>> >>
>> >> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >> >>> > 3092 bytes copied
>> >> >>> > Metadata file found: META-INF/metadata.xml
>> >> >>> > 73 bytes copied
>> >> >>> > Metadata file saved to
>> >> >>> >
>> >> >>>
>> >>
>> >> /home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/fw/bundle4/data/temp/ipojo_4326206654856524444.xml
>> >> >>> > Pojoization true - true
>> >> >>> > Manipulation done : true
>> >> >>> > Bundle ID: 10
>> >> >>> > -> start 10
>> >> >>> > -> I'm constructed...
>> >> >>> > I'm starting...
>> >> >>> >
>> >> >>> > Yours, Alexey Romanov
>> >> >>> >
>> >> >>> >
>> >> >>> >
>> >> >>> > On Tue, Apr 10, 2012 at 13:13, Alexey Romanov
>> >> >>> > <al...@gmail.com> wrote:
>> >> >>> >> Thank you! Yes, that does help. Though I wonder why
>> >> >>> >> org.apache.felix.ipojo.manipulator-1.8.2.jar is not available
>> >> >>> >> from
>> >> >>> >> iPOJO downloads page: BND plugin appears to depend on it
>> >> >>> >> (according
>> >> to
>> >> >>> >>
>> >> >>>
>> >>
>> >> http://mvnrepository.com/artifact/org.apache.felix/bnd-ipojo-plugin/1.8.2
>> >> >>> ),
>> >> >>> >> and I was
>> >> >>> >> getting NoClassDefFoundError until adding it to the plugin class
>> >> path.
>> >> >>> >>
>> >> >>> >> Yours, Alexey Romanov
>> >> >>> >>
>> >> >>> >>
>> >> >>> >>
>> >> >>> >> On Tue, Apr 10, 2012 at 12:42, Guillaume Sauthier (Objectweb)
>> >> >>> >> <gu...@objectweb.org> wrote:
>> >> >>> >>> Nop, the Bnd "-plugin" instruction must contains the plugin
>> >> classname.
>> >> >>> >>> Ex:
>> >> >>> >>> -plugin
>> >> >>> >>>
>> >> >>>
>> >>
>> >> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/src/main/resources/META-INF/metadata.xml;use-local-schemas=true
>> >> >>> >>>
>> >> >>> >>> The (optional) 'metadata' option instructs the plugin where to
>> >> >>> >>> fin
>> >> the
>> >> >>> >>> metadata.xml file
>> >> >>> >>> By default, it looks in the archive for a META-INF/metadata.xml
>> >> file
>> >> >>> >>>
>> >> >>> >>> The (optional) 'use-local-schemas' property simply tells iPOJO
>> >> >>> >>> to
>> >> not
>> >> >>> >>> verify XML validity against external resources but with the
>> >> >>> >>> latest
>> >> XML
>> >> >>> >>> schemas included in the current version of the iPOJO
>> >> >>> >>> manipulator
>> >> >>> >>>
>> >> >>> >>> Hope that helps
>> >> >>> >>> --G
>> >> >>> >>>
>> >> >>> >>> PS here is an example:
>> >> >>> >>>
>> >> >>>
>> >>
>> >> http://gitorious.ow2.org/ow2-shelbie/parent/blobs/master/pom.xml#line303
>> >> >>> >>>
>> >> >>> >>>
>> >> >>> >>> 2012/4/9 Alexey Romanov <al...@gmail.com>
>> >> >>> >>>
>> >> >>> >>>> How can I use iPOJO BND plugin? What instructions does it
>> >> provide? Or
>> >> >>> >>>> is it enough to include
>> >> >>> >>>>
>> >> >>> >>>> -plugin: path_to_plugin/bnd-ipojo-plugin-1.8.2.jar
>> >> >>> >>>>
>> >> >>> >>>> in my .bnd file?
>> >> >>> >>>>
>> >> >>> >>>> Yours, Alexey Romanov
>> >> >>> >>>>
>> >> >>> >>>>
>> >> ---------------------------------------------------------------------
>> >> >>> >>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >> >>> >>>> For additional commands, e-mail: users-help@felix.apache.org
>> >> >>> >>>>
>> >> >>> >>>>
>> >> >>>
>> >> >>>
>> >> >>> ---------------------------------------------------------------------
>> >> >>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >> >>> For additional commands, e-mail: users-help@felix.apache.org
>> >> >>>
>> >> >>>
>> >> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >> For additional commands, e-mail: users-help@felix.apache.org
>> >>
>> >>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: iPOJO BND Plugin

Posted by Alexey Romanov <al...@gmail.com>.
Yes, that works for me. Now I'll try to figure out the problem...

Yours, Alexey Romanov



On Wed, Apr 11, 2012 at 12:09, Guillaume Sauthier (Objectweb)
<gu...@objectweb.org> wrote:
> I've constructed a similar example exclusievely based on maven.
> After a "mvn clean install", I get the correct header (merging annotations
> AND metadata.xml)
>
> Can you try it on your side ?
> --G
>
>
> 2012/4/11 Alexey Romanov <al...@gmail.com>
>>
>> This gave me a suspicion, which turned out to be correct: after adding
>> <component className="org.example.ExampleComponent"/> to metadata.xml
>> I get "I'm constructed" in output and
>>
>> IPOJO-Components = instance {
>> $component="org.example.ExampleComponent" }component {
>> $classname="org.example.ExampleComponent" manipulation { method {
>> $name="$init" }method { $arguments="{java.lang.String}"
>> $name="sayHello" $return="java.lang.String" }method { $name="start"
>> }method { $name="stop" }interface { $name="org.example.api.Greeting"
>> }}}
>>
>> in header. But still no result from @Validate @Invalidate annotations,
>> and I _really_ don't want to have to do everything in XML :(
>>
>> Yours, Alexey Romanov
>>
>>
>>
>> On Tue, Apr 10, 2012 at 18:34, Guillaume Sauthier (Objectweb)
>> <gu...@objectweb.org> wrote:
>> > Looks like the IPOJO-Components manifest's heasder is missing the
>> > component
>> > type description (something like component {class="some java class
>> > name",
>> > ....})
>> >
>> > Are you using annotations or XML file for declaring your components ?
>> > Can you show me your metadata.xml ?
>> >
>> > --G
>> >
>> > 2012/4/10 Alexey Romanov <al...@gmail.com>
>> >
>> >> Yes, just built it. Still no success:
>> >>
>> >> -> ps
>> >> START LEVEL 1
>> >>   ID   State         Level  Name
>> >> [   0] [Active     ] [    0] System Bundle (4.0.1)
>> >> [   1] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
>> >> [   2] [Active     ] [    1] BndToolsTest (0)
>> >> [   3] [Active     ] [    1] Apache Felix iPOJO Arch Command (1.6.0)
>> >> [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler (1.6.0)
>> >> [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
>> >> [   6] [Active     ] [    1] Apache Felix iPOJO (1.8.2)
>> >> [   7] [Active     ] [    1] Apache Felix Declarative Services (1.6.0)
>> >> [   8] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
>> >> [   9] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
>> >> -> headers 9
>> >>
>> >> BndToolsTestIPojo (9)
>> >> ---------------------
>> >> Bnd-LastModified = 1334063371339
>> >> Bundle-ManifestVersion = 2
>> >> Bundle-Name = BndToolsTestIPojo
>> >> Bundle-SymbolicName = BndToolsTestIPojo
>> >> Bundle-Version = 0.0.1
>> >> Created-By = 1.6.0_31 (Sun Microsystems Inc.)
>> >> Import-Package =
>> >>
>> >>
>> >> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
>> >> org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
>> >> Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
>> >> IPOJO-Components = instance { $component="org.example.ExampleComponent"
>> >> }
>> >> Manifest-Version = 1.0
>> >> Private-Package = org.example
>> >> Tool = Bnd-1.51.0
>> >>
>> >> This is with bnd plugin version 1.8.2, manipulator 1.8.4 and core
>> >> built by Maven from source (changed version number to 1.8.2 to avoid a
>> >> problem with Bndtools). Tried 1.9.0-SNAPSHOT of bnd-plugin and
>> >> manipulator as well. (Don't know why BND is still calculating
>> >> Import-Package versions to be 1.8.0.)
>> >>
>> >>
>> >> Yours, Alexey Romanov
>> >>
>> >>
>> >>
>> >> On Tue, Apr 10, 2012 at 17:50, Guillaume Sauthier (Objectweb)
>> >> <gu...@objectweb.org> wrote:
>> >> > Uh, looks like 1.8.2 is still not released
>> >> >
>> >> > Can you try with the iPOJO core ? (Should be 1.9.0-SNAPSHOT)
>> >> >
>> >> > --G
>> >> >
>> >> > 2012/4/10 Guillaume Sauthier (Objectweb) <
>> >> guillaume.sauthier@objectweb.org>
>> >> >
>> >> >> Another thing, Bnd requires the Manifest headers to start with an
>> >> >> uppercase character.
>> >> >> https://issues.apache.org/jira/browse/FELIX-3036
>> >> >>
>> >> >> Looks like it's is iPOJO 1.8.2
>> >> >>
>> >> >> --G
>> >> >>
>> >> >> 2012/4/10 Alexey Romanov <al...@gmail.com>
>> >> >>
>> >> >>> Found this bug on JIRA:
>> >> >>> https://issues.apache.org/jira/browse/FELIX-3389 However, after
>> >> >>> updating to org.apache.felix.ipojo.manipulator-1.8.4.jar, there is
>> >> >>> no
>> >> >>> change.
>> >> >>>
>> >> >>> Yours, Alexey Romanov
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> On Tue, Apr 10, 2012 at 14:29, Alexey Romanov
>> >> >>> <al...@gmail.com> wrote:
>> >> >>> > So, after adding the plugin,
>> >> >>> >
>> >> >>> > -plugin:
>> >> >>>
>> >>
>> >> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/META-INF/metadata.xml;use-local-schemas=true
>> >> >>> >
>> >> >>> > it builds fine. I checked that META-INF/metadata.xml is included
>> >> >>> > in
>> >> >>> > the JAR, and the plugin adds header "IPOJO-Components: instance {
>> >> >>> > $component="org.example.ExampleComponent" }". But when it's
>> >> >>> > installed
>> >> >>> > and started, the component isn't created. Using online
>> >> >>> > manipulator
>> >> >>> > works fine. Any idea what could be a reason? E.g. am I missing
>> >> >>> > some
>> >> >>> > necessary bundle? Here is a log:
>> >> >>> >
>> >> >>> > -> ps
>> >> >>> > START LEVEL 1
>> >> >>> >   ID   State         Level  Name
>> >> >>> > [   0] [Active     ] [    0] System Bundle (4.0.1)
>> >> >>> > [   1] [Active     ] [    1] Apache Felix iPOJO (1.8.0)
>> >> >>> > [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
>> >> >>> > [   3] [Active     ] [    1] BndToolsTest (0)
>> >> >>> > [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler
>> >> >>> > (1.6.0)
>> >> >>> > [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
>> >> >>> > [   6] [Active     ] [    1] Apache Felix Declarative Services
>> >> (1.6.0)
>> >> >>> > [   7] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
>> >> >>> > [   8] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
>> >> >>> > -> uninstall 8
>> >> >>> > -> install
>> >> >>>
>> >>
>> >> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >> >>> > Bundle ID: 9
>> >> >>> > -> start 9
>> >> >>> > -> headers 9
>> >> >>> >
>> >> >>> > BndToolsTestIPojo (9)
>> >> >>> > ----------------------
>> >> >>> > Bnd-LastModified = 1334052977766
>> >> >>> > Bundle-ManifestVersion = 2
>> >> >>> > Bundle-Name = BndToolsTestIPojo
>> >> >>> > Bundle-SymbolicName = BndToolsTestIPojo
>> >> >>> > Bundle-Version = 0.0.1
>> >> >>> > Created-By = 1.6.0_31 (Sun Microsystems Inc.)
>> >> >>> > Import-Package =
>> >> >>> >
>> >> >>>
>> >>
>> >> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
>> >> >>>
>> >> >>> org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
>> >> >>> > Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
>> >> >>> > IPOJO-Components = instance {
>> >> $component="org.example.ExampleComponent"
>> >> >>> }
>> >> >>> > Manifest-Version = 1.0
>> >> >>> > Private-Package = org.example
>> >> >>> > Tool = Bnd-1.51.0
>> >> >>> > -> uninstall 9
>> >> >>> > -> install
>> >> >>>
>> >>
>> >> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >> >>> > Processing URL :
>> >> >>> >
>> >> >>>
>> >>
>> >> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >> >>> > Extracted URL :
>> >> >>> >
>> >> >>>
>> >>
>> >> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >> >>> > 3092 bytes copied
>> >> >>> > Metadata file found: META-INF/metadata.xml
>> >> >>> > 73 bytes copied
>> >> >>> > Metadata file saved to
>> >> >>> >
>> >> >>>
>> >>
>> >> /home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/fw/bundle4/data/temp/ipojo_4326206654856524444.xml
>> >> >>> > Pojoization true - true
>> >> >>> > Manipulation done : true
>> >> >>> > Bundle ID: 10
>> >> >>> > -> start 10
>> >> >>> > -> I'm constructed...
>> >> >>> > I'm starting...
>> >> >>> >
>> >> >>> > Yours, Alexey Romanov
>> >> >>> >
>> >> >>> >
>> >> >>> >
>> >> >>> > On Tue, Apr 10, 2012 at 13:13, Alexey Romanov
>> >> >>> > <al...@gmail.com> wrote:
>> >> >>> >> Thank you! Yes, that does help. Though I wonder why
>> >> >>> >> org.apache.felix.ipojo.manipulator-1.8.2.jar is not available
>> >> >>> >> from
>> >> >>> >> iPOJO downloads page: BND plugin appears to depend on it
>> >> >>> >> (according
>> >> to
>> >> >>> >>
>> >> >>>
>> >>
>> >> http://mvnrepository.com/artifact/org.apache.felix/bnd-ipojo-plugin/1.8.2
>> >> >>> ),
>> >> >>> >> and I was
>> >> >>> >> getting NoClassDefFoundError until adding it to the plugin class
>> >> path.
>> >> >>> >>
>> >> >>> >> Yours, Alexey Romanov
>> >> >>> >>
>> >> >>> >>
>> >> >>> >>
>> >> >>> >> On Tue, Apr 10, 2012 at 12:42, Guillaume Sauthier (Objectweb)
>> >> >>> >> <gu...@objectweb.org> wrote:
>> >> >>> >>> Nop, the Bnd "-plugin" instruction must contains the plugin
>> >> classname.
>> >> >>> >>> Ex:
>> >> >>> >>> -plugin
>> >> >>> >>>
>> >> >>>
>> >>
>> >> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/src/main/resources/META-INF/metadata.xml;use-local-schemas=true
>> >> >>> >>>
>> >> >>> >>> The (optional) 'metadata' option instructs the plugin where to
>> >> >>> >>> fin
>> >> the
>> >> >>> >>> metadata.xml file
>> >> >>> >>> By default, it looks in the archive for a META-INF/metadata.xml
>> >> file
>> >> >>> >>>
>> >> >>> >>> The (optional) 'use-local-schemas' property simply tells iPOJO
>> >> >>> >>> to
>> >> not
>> >> >>> >>> verify XML validity against external resources but with the
>> >> >>> >>> latest
>> >> XML
>> >> >>> >>> schemas included in the current version of the iPOJO
>> >> >>> >>> manipulator
>> >> >>> >>>
>> >> >>> >>> Hope that helps
>> >> >>> >>> --G
>> >> >>> >>>
>> >> >>> >>> PS here is an example:
>> >> >>> >>>
>> >> >>>
>> >>
>> >> http://gitorious.ow2.org/ow2-shelbie/parent/blobs/master/pom.xml#line303
>> >> >>> >>>
>> >> >>> >>>
>> >> >>> >>> 2012/4/9 Alexey Romanov <al...@gmail.com>
>> >> >>> >>>
>> >> >>> >>>> How can I use iPOJO BND plugin? What instructions does it
>> >> provide? Or
>> >> >>> >>>> is it enough to include
>> >> >>> >>>>
>> >> >>> >>>> -plugin: path_to_plugin/bnd-ipojo-plugin-1.8.2.jar
>> >> >>> >>>>
>> >> >>> >>>> in my .bnd file?
>> >> >>> >>>>
>> >> >>> >>>> Yours, Alexey Romanov
>> >> >>> >>>>
>> >> >>> >>>>
>> >> ---------------------------------------------------------------------
>> >> >>> >>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >> >>> >>>> For additional commands, e-mail: users-help@felix.apache.org
>> >> >>> >>>>
>> >> >>> >>>>
>> >> >>>
>> >> >>>
>> >> >>> ---------------------------------------------------------------------
>> >> >>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >> >>> For additional commands, e-mail: users-help@felix.apache.org
>> >> >>>
>> >> >>>
>> >> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >> For additional commands, e-mail: users-help@felix.apache.org
>> >>
>> >>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: iPOJO BND Plugin

Posted by "Guillaume Sauthier (Objectweb)" <gu...@objectweb.org>.
I've constructed a similar example exclusievely based on maven.
After a "mvn clean install", I get the correct header (merging annotations
AND metadata.xml)

Can you try it on your side ?
--G

2012/4/11 Alexey Romanov <al...@gmail.com>

> This gave me a suspicion, which turned out to be correct: after adding
> <component className="org.example.ExampleComponent"/> to metadata.xml
> I get "I'm constructed" in output and
>
> IPOJO-Components = instance {
> $component="org.example.ExampleComponent" }component {
> $classname="org.example.ExampleComponent" manipulation { method {
> $name="$init" }method { $arguments="{java.lang.String}"
> $name="sayHello" $return="java.lang.String" }method { $name="start"
> }method { $name="stop" }interface { $name="org.example.api.Greeting"
> }}}
>
> in header. But still no result from @Validate @Invalidate annotations,
> and I _really_ don't want to have to do everything in XML :(
>
> Yours, Alexey Romanov
>
>
>
> On Tue, Apr 10, 2012 at 18:34, Guillaume Sauthier (Objectweb)
> <gu...@objectweb.org> wrote:
> > Looks like the IPOJO-Components manifest's heasder is missing the
> component
> > type description (something like component {class="some java class name",
> > ....})
> >
> > Are you using annotations or XML file for declaring your components ?
> > Can you show me your metadata.xml ?
> >
> > --G
> >
> > 2012/4/10 Alexey Romanov <al...@gmail.com>
> >
> >> Yes, just built it. Still no success:
> >>
> >> -> ps
> >> START LEVEL 1
> >>   ID   State         Level  Name
> >> [   0] [Active     ] [    0] System Bundle (4.0.1)
> >> [   1] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> >> [   2] [Active     ] [    1] BndToolsTest (0)
> >> [   3] [Active     ] [    1] Apache Felix iPOJO Arch Command (1.6.0)
> >> [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler (1.6.0)
> >> [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> >> [   6] [Active     ] [    1] Apache Felix iPOJO (1.8.2)
> >> [   7] [Active     ] [    1] Apache Felix Declarative Services (1.6.0)
> >> [   8] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
> >> [   9] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
> >> -> headers 9
> >>
> >> BndToolsTestIPojo (9)
> >> ---------------------
> >> Bnd-LastModified = 1334063371339
> >> Bundle-ManifestVersion = 2
> >> Bundle-Name = BndToolsTestIPojo
> >> Bundle-SymbolicName = BndToolsTestIPojo
> >> Bundle-Version = 0.0.1
> >> Created-By = 1.6.0_31 (Sun Microsystems Inc.)
> >> Import-Package =
> >>
> >>
> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
> >> org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
> >> Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
> >> IPOJO-Components = instance { $component="org.example.ExampleComponent"
> }
> >> Manifest-Version = 1.0
> >> Private-Package = org.example
> >> Tool = Bnd-1.51.0
> >>
> >> This is with bnd plugin version 1.8.2, manipulator 1.8.4 and core
> >> built by Maven from source (changed version number to 1.8.2 to avoid a
> >> problem with Bndtools). Tried 1.9.0-SNAPSHOT of bnd-plugin and
> >> manipulator as well. (Don't know why BND is still calculating
> >> Import-Package versions to be 1.8.0.)
> >>
> >>
> >> Yours, Alexey Romanov
> >>
> >>
> >>
> >> On Tue, Apr 10, 2012 at 17:50, Guillaume Sauthier (Objectweb)
> >> <gu...@objectweb.org> wrote:
> >> > Uh, looks like 1.8.2 is still not released
> >> >
> >> > Can you try with the iPOJO core ? (Should be 1.9.0-SNAPSHOT)
> >> >
> >> > --G
> >> >
> >> > 2012/4/10 Guillaume Sauthier (Objectweb) <
> >> guillaume.sauthier@objectweb.org>
> >> >
> >> >> Another thing, Bnd requires the Manifest headers to start with an
> >> >> uppercase character.
> >> >> https://issues.apache.org/jira/browse/FELIX-3036
> >> >>
> >> >> Looks like it's is iPOJO 1.8.2
> >> >>
> >> >> --G
> >> >>
> >> >> 2012/4/10 Alexey Romanov <al...@gmail.com>
> >> >>
> >> >>> Found this bug on JIRA:
> >> >>> https://issues.apache.org/jira/browse/FELIX-3389 However, after
> >> >>> updating to org.apache.felix.ipojo.manipulator-1.8.4.jar, there is
> no
> >> >>> change.
> >> >>>
> >> >>> Yours, Alexey Romanov
> >> >>>
> >> >>>
> >> >>>
> >> >>> On Tue, Apr 10, 2012 at 14:29, Alexey Romanov
> >> >>> <al...@gmail.com> wrote:
> >> >>> > So, after adding the plugin,
> >> >>> >
> >> >>> > -plugin:
> >> >>>
> >>
> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/META-INF/metadata.xml;use-local-schemas=true
> >> >>> >
> >> >>> > it builds fine. I checked that META-INF/metadata.xml is included
> in
> >> >>> > the JAR, and the plugin adds header "IPOJO-Components: instance {
> >> >>> > $component="org.example.ExampleComponent" }". But when it's
> installed
> >> >>> > and started, the component isn't created. Using online manipulator
> >> >>> > works fine. Any idea what could be a reason? E.g. am I missing
> some
> >> >>> > necessary bundle? Here is a log:
> >> >>> >
> >> >>> > -> ps
> >> >>> > START LEVEL 1
> >> >>> >   ID   State         Level  Name
> >> >>> > [   0] [Active     ] [    0] System Bundle (4.0.1)
> >> >>> > [   1] [Active     ] [    1] Apache Felix iPOJO (1.8.0)
> >> >>> > [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> >> >>> > [   3] [Active     ] [    1] BndToolsTest (0)
> >> >>> > [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler
> (1.6.0)
> >> >>> > [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> >> >>> > [   6] [Active     ] [    1] Apache Felix Declarative Services
> >> (1.6.0)
> >> >>> > [   7] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
> >> >>> > [   8] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
> >> >>> > -> uninstall 8
> >> >>> > -> install
> >> >>>
> >>
> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> >> >>> > Bundle ID: 9
> >> >>> > -> start 9
> >> >>> > -> headers 9
> >> >>> >
> >> >>> > BndToolsTestIPojo (9)
> >> >>> > ----------------------
> >> >>> > Bnd-LastModified = 1334052977766
> >> >>> > Bundle-ManifestVersion = 2
> >> >>> > Bundle-Name = BndToolsTestIPojo
> >> >>> > Bundle-SymbolicName = BndToolsTestIPojo
> >> >>> > Bundle-Version = 0.0.1
> >> >>> > Created-By = 1.6.0_31 (Sun Microsystems Inc.)
> >> >>> > Import-Package =
> >> >>> >
> >> >>>
> >>
> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
> >> >>> org.osgi.service.cm
> ;version="1.2",org.osgi.service.log;version="1.3"
> >> >>> > Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
> >> >>> > IPOJO-Components = instance {
> >> $component="org.example.ExampleComponent"
> >> >>> }
> >> >>> > Manifest-Version = 1.0
> >> >>> > Private-Package = org.example
> >> >>> > Tool = Bnd-1.51.0
> >> >>> > -> uninstall 9
> >> >>> > -> install
> >> >>>
> >>
> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> >> >>> > Processing URL :
> >> >>> >
> >> >>>
> >>
> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> >> >>> > Extracted URL :
> >> >>> >
> >> >>>
> >>
> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> >> >>> > 3092 bytes copied
> >> >>> > Metadata file found: META-INF/metadata.xml
> >> >>> > 73 bytes copied
> >> >>> > Metadata file saved to
> >> >>> >
> >> >>>
> >>
> /home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/fw/bundle4/data/temp/ipojo_4326206654856524444.xml
> >> >>> > Pojoization true - true
> >> >>> > Manipulation done : true
> >> >>> > Bundle ID: 10
> >> >>> > -> start 10
> >> >>> > -> I'm constructed...
> >> >>> > I'm starting...
> >> >>> >
> >> >>> > Yours, Alexey Romanov
> >> >>> >
> >> >>> >
> >> >>> >
> >> >>> > On Tue, Apr 10, 2012 at 13:13, Alexey Romanov
> >> >>> > <al...@gmail.com> wrote:
> >> >>> >> Thank you! Yes, that does help. Though I wonder why
> >> >>> >> org.apache.felix.ipojo.manipulator-1.8.2.jar is not available
> from
> >> >>> >> iPOJO downloads page: BND plugin appears to depend on it
> (according
> >> to
> >> >>> >>
> >> >>>
> >>
> http://mvnrepository.com/artifact/org.apache.felix/bnd-ipojo-plugin/1.8.2
> >> >>> ),
> >> >>> >> and I was
> >> >>> >> getting NoClassDefFoundError until adding it to the plugin class
> >> path.
> >> >>> >>
> >> >>> >> Yours, Alexey Romanov
> >> >>> >>
> >> >>> >>
> >> >>> >>
> >> >>> >> On Tue, Apr 10, 2012 at 12:42, Guillaume Sauthier (Objectweb)
> >> >>> >> <gu...@objectweb.org> wrote:
> >> >>> >>> Nop, the Bnd "-plugin" instruction must contains the plugin
> >> classname.
> >> >>> >>> Ex:
> >> >>> >>> -plugin
> >> >>> >>>
> >> >>>
> >>
> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/src/main/resources/META-INF/metadata.xml;use-local-schemas=true
> >> >>> >>>
> >> >>> >>> The (optional) 'metadata' option instructs the plugin where to
> fin
> >> the
> >> >>> >>> metadata.xml file
> >> >>> >>> By default, it looks in the archive for a META-INF/metadata.xml
> >> file
> >> >>> >>>
> >> >>> >>> The (optional) 'use-local-schemas' property simply tells iPOJO
> to
> >> not
> >> >>> >>> verify XML validity against external resources but with the
> latest
> >> XML
> >> >>> >>> schemas included in the current version of the iPOJO manipulator
> >> >>> >>>
> >> >>> >>> Hope that helps
> >> >>> >>> --G
> >> >>> >>>
> >> >>> >>> PS here is an example:
> >> >>> >>>
> >> >>>
> >>
> http://gitorious.ow2.org/ow2-shelbie/parent/blobs/master/pom.xml#line303
> >> >>> >>>
> >> >>> >>>
> >> >>> >>> 2012/4/9 Alexey Romanov <al...@gmail.com>
> >> >>> >>>
> >> >>> >>>> How can I use iPOJO BND plugin? What instructions does it
> >> provide? Or
> >> >>> >>>> is it enough to include
> >> >>> >>>>
> >> >>> >>>> -plugin: path_to_plugin/bnd-ipojo-plugin-1.8.2.jar
> >> >>> >>>>
> >> >>> >>>> in my .bnd file?
> >> >>> >>>>
> >> >>> >>>> Yours, Alexey Romanov
> >> >>> >>>>
> >> >>> >>>>
> >> ---------------------------------------------------------------------
> >> >>> >>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> >>> >>>> For additional commands, e-mail: users-help@felix.apache.org
> >> >>> >>>>
> >> >>> >>>>
> >> >>>
> >> >>>
> ---------------------------------------------------------------------
> >> >>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> >>> For additional commands, e-mail: users-help@felix.apache.org
> >> >>>
> >> >>>
> >> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: iPOJO BND Plugin

Posted by Alexey Romanov <al...@gmail.com>.
This gave me a suspicion, which turned out to be correct: after adding
<component className="org.example.ExampleComponent"/> to metadata.xml
I get "I'm constructed" in output and

IPOJO-Components = instance {
$component="org.example.ExampleComponent" }component {
$classname="org.example.ExampleComponent" manipulation { method {
$name="$init" }method { $arguments="{java.lang.String}"
$name="sayHello" $return="java.lang.String" }method { $name="start"
}method { $name="stop" }interface { $name="org.example.api.Greeting"
}}}

in header. But still no result from @Validate @Invalidate annotations,
and I _really_ don't want to have to do everything in XML :(

Yours, Alexey Romanov



On Tue, Apr 10, 2012 at 18:34, Guillaume Sauthier (Objectweb)
<gu...@objectweb.org> wrote:
> Looks like the IPOJO-Components manifest's heasder is missing the component
> type description (something like component {class="some java class name",
> ....})
>
> Are you using annotations or XML file for declaring your components ?
> Can you show me your metadata.xml ?
>
> --G
>
> 2012/4/10 Alexey Romanov <al...@gmail.com>
>
>> Yes, just built it. Still no success:
>>
>> -> ps
>> START LEVEL 1
>>   ID   State         Level  Name
>> [   0] [Active     ] [    0] System Bundle (4.0.1)
>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
>> [   2] [Active     ] [    1] BndToolsTest (0)
>> [   3] [Active     ] [    1] Apache Felix iPOJO Arch Command (1.6.0)
>> [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler (1.6.0)
>> [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
>> [   6] [Active     ] [    1] Apache Felix iPOJO (1.8.2)
>> [   7] [Active     ] [    1] Apache Felix Declarative Services (1.6.0)
>> [   8] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
>> [   9] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
>> -> headers 9
>>
>> BndToolsTestIPojo (9)
>> ---------------------
>> Bnd-LastModified = 1334063371339
>> Bundle-ManifestVersion = 2
>> Bundle-Name = BndToolsTestIPojo
>> Bundle-SymbolicName = BndToolsTestIPojo
>> Bundle-Version = 0.0.1
>> Created-By = 1.6.0_31 (Sun Microsystems Inc.)
>> Import-Package =
>>
>> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
>> org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
>> Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
>> IPOJO-Components = instance { $component="org.example.ExampleComponent" }
>> Manifest-Version = 1.0
>> Private-Package = org.example
>> Tool = Bnd-1.51.0
>>
>> This is with bnd plugin version 1.8.2, manipulator 1.8.4 and core
>> built by Maven from source (changed version number to 1.8.2 to avoid a
>> problem with Bndtools). Tried 1.9.0-SNAPSHOT of bnd-plugin and
>> manipulator as well. (Don't know why BND is still calculating
>> Import-Package versions to be 1.8.0.)
>>
>>
>> Yours, Alexey Romanov
>>
>>
>>
>> On Tue, Apr 10, 2012 at 17:50, Guillaume Sauthier (Objectweb)
>> <gu...@objectweb.org> wrote:
>> > Uh, looks like 1.8.2 is still not released
>> >
>> > Can you try with the iPOJO core ? (Should be 1.9.0-SNAPSHOT)
>> >
>> > --G
>> >
>> > 2012/4/10 Guillaume Sauthier (Objectweb) <
>> guillaume.sauthier@objectweb.org>
>> >
>> >> Another thing, Bnd requires the Manifest headers to start with an
>> >> uppercase character.
>> >> https://issues.apache.org/jira/browse/FELIX-3036
>> >>
>> >> Looks like it's is iPOJO 1.8.2
>> >>
>> >> --G
>> >>
>> >> 2012/4/10 Alexey Romanov <al...@gmail.com>
>> >>
>> >>> Found this bug on JIRA:
>> >>> https://issues.apache.org/jira/browse/FELIX-3389 However, after
>> >>> updating to org.apache.felix.ipojo.manipulator-1.8.4.jar, there is no
>> >>> change.
>> >>>
>> >>> Yours, Alexey Romanov
>> >>>
>> >>>
>> >>>
>> >>> On Tue, Apr 10, 2012 at 14:29, Alexey Romanov
>> >>> <al...@gmail.com> wrote:
>> >>> > So, after adding the plugin,
>> >>> >
>> >>> > -plugin:
>> >>>
>> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/META-INF/metadata.xml;use-local-schemas=true
>> >>> >
>> >>> > it builds fine. I checked that META-INF/metadata.xml is included in
>> >>> > the JAR, and the plugin adds header "IPOJO-Components: instance {
>> >>> > $component="org.example.ExampleComponent" }". But when it's installed
>> >>> > and started, the component isn't created. Using online manipulator
>> >>> > works fine. Any idea what could be a reason? E.g. am I missing some
>> >>> > necessary bundle? Here is a log:
>> >>> >
>> >>> > -> ps
>> >>> > START LEVEL 1
>> >>> >   ID   State         Level  Name
>> >>> > [   0] [Active     ] [    0] System Bundle (4.0.1)
>> >>> > [   1] [Active     ] [    1] Apache Felix iPOJO (1.8.0)
>> >>> > [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
>> >>> > [   3] [Active     ] [    1] BndToolsTest (0)
>> >>> > [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler (1.6.0)
>> >>> > [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
>> >>> > [   6] [Active     ] [    1] Apache Felix Declarative Services
>> (1.6.0)
>> >>> > [   7] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
>> >>> > [   8] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
>> >>> > -> uninstall 8
>> >>> > -> install
>> >>>
>> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >>> > Bundle ID: 9
>> >>> > -> start 9
>> >>> > -> headers 9
>> >>> >
>> >>> > BndToolsTestIPojo (9)
>> >>> > ----------------------
>> >>> > Bnd-LastModified = 1334052977766
>> >>> > Bundle-ManifestVersion = 2
>> >>> > Bundle-Name = BndToolsTestIPojo
>> >>> > Bundle-SymbolicName = BndToolsTestIPojo
>> >>> > Bundle-Version = 0.0.1
>> >>> > Created-By = 1.6.0_31 (Sun Microsystems Inc.)
>> >>> > Import-Package =
>> >>> >
>> >>>
>> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
>> >>> org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
>> >>> > Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
>> >>> > IPOJO-Components = instance {
>> $component="org.example.ExampleComponent"
>> >>> }
>> >>> > Manifest-Version = 1.0
>> >>> > Private-Package = org.example
>> >>> > Tool = Bnd-1.51.0
>> >>> > -> uninstall 9
>> >>> > -> install
>> >>>
>> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >>> > Processing URL :
>> >>> >
>> >>>
>> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >>> > Extracted URL :
>> >>> >
>> >>>
>> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >>> > 3092 bytes copied
>> >>> > Metadata file found: META-INF/metadata.xml
>> >>> > 73 bytes copied
>> >>> > Metadata file saved to
>> >>> >
>> >>>
>> /home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/fw/bundle4/data/temp/ipojo_4326206654856524444.xml
>> >>> > Pojoization true - true
>> >>> > Manipulation done : true
>> >>> > Bundle ID: 10
>> >>> > -> start 10
>> >>> > -> I'm constructed...
>> >>> > I'm starting...
>> >>> >
>> >>> > Yours, Alexey Romanov
>> >>> >
>> >>> >
>> >>> >
>> >>> > On Tue, Apr 10, 2012 at 13:13, Alexey Romanov
>> >>> > <al...@gmail.com> wrote:
>> >>> >> Thank you! Yes, that does help. Though I wonder why
>> >>> >> org.apache.felix.ipojo.manipulator-1.8.2.jar is not available from
>> >>> >> iPOJO downloads page: BND plugin appears to depend on it (according
>> to
>> >>> >>
>> >>>
>> http://mvnrepository.com/artifact/org.apache.felix/bnd-ipojo-plugin/1.8.2
>> >>> ),
>> >>> >> and I was
>> >>> >> getting NoClassDefFoundError until adding it to the plugin class
>> path.
>> >>> >>
>> >>> >> Yours, Alexey Romanov
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> On Tue, Apr 10, 2012 at 12:42, Guillaume Sauthier (Objectweb)
>> >>> >> <gu...@objectweb.org> wrote:
>> >>> >>> Nop, the Bnd "-plugin" instruction must contains the plugin
>> classname.
>> >>> >>> Ex:
>> >>> >>> -plugin
>> >>> >>>
>> >>>
>> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/src/main/resources/META-INF/metadata.xml;use-local-schemas=true
>> >>> >>>
>> >>> >>> The (optional) 'metadata' option instructs the plugin where to fin
>> the
>> >>> >>> metadata.xml file
>> >>> >>> By default, it looks in the archive for a META-INF/metadata.xml
>> file
>> >>> >>>
>> >>> >>> The (optional) 'use-local-schemas' property simply tells iPOJO to
>> not
>> >>> >>> verify XML validity against external resources but with the latest
>> XML
>> >>> >>> schemas included in the current version of the iPOJO manipulator
>> >>> >>>
>> >>> >>> Hope that helps
>> >>> >>> --G
>> >>> >>>
>> >>> >>> PS here is an example:
>> >>> >>>
>> >>>
>> http://gitorious.ow2.org/ow2-shelbie/parent/blobs/master/pom.xml#line303
>> >>> >>>
>> >>> >>>
>> >>> >>> 2012/4/9 Alexey Romanov <al...@gmail.com>
>> >>> >>>
>> >>> >>>> How can I use iPOJO BND plugin? What instructions does it
>> provide? Or
>> >>> >>>> is it enough to include
>> >>> >>>>
>> >>> >>>> -plugin: path_to_plugin/bnd-ipojo-plugin-1.8.2.jar
>> >>> >>>>
>> >>> >>>> in my .bnd file?
>> >>> >>>>
>> >>> >>>> Yours, Alexey Romanov
>> >>> >>>>
>> >>> >>>>
>> ---------------------------------------------------------------------
>> >>> >>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >>> >>>> For additional commands, e-mail: users-help@felix.apache.org
>> >>> >>>>
>> >>> >>>>
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >>> For additional commands, e-mail: users-help@felix.apache.org
>> >>>
>> >>>
>> >>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: iPOJO BND Plugin

Posted by Alexey Romanov <al...@gmail.com>.
It's basically the example from
http://felix.apache.org/site/apache-felix-ipojo-eclipse-integration.html,
I just added a constructor to see if it was constructing the component
and not calling the @Validate method. So

metadata.xml:
<ipojo>
<instance component="org.example.ExampleComponent"/>
</ipojo>

org/example/ExampleComponent.java:
package org.example;

import org.apache.felix.ipojo.annotations.Component;
import org.apache.felix.ipojo.annotations.Invalidate;
import org.apache.felix.ipojo.annotations.Validate;

@Component
public class ExampleComponent {
    public ExampleComponent() {
        System.out.println("I'm constructed...");
    }

    @Validate
    public void start() {
        System.out.println("I'm starting...");
    }

    @Invalidate
    public void stop() {
        System.out.println("I'm leaving !");
    }
}

Yours, Alexey Romanov



On Tue, Apr 10, 2012 at 18:34, Guillaume Sauthier (Objectweb)
<gu...@objectweb.org> wrote:
> Looks like the IPOJO-Components manifest's heasder is missing the component
> type description (something like component {class="some java class name",
> ....})
>
> Are you using annotations or XML file for declaring your components ?
> Can you show me your metadata.xml ?
>
> --G
>
> 2012/4/10 Alexey Romanov <al...@gmail.com>
>
>> Yes, just built it. Still no success:
>>
>> -> ps
>> START LEVEL 1
>>   ID   State         Level  Name
>> [   0] [Active     ] [    0] System Bundle (4.0.1)
>> [   1] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
>> [   2] [Active     ] [    1] BndToolsTest (0)
>> [   3] [Active     ] [    1] Apache Felix iPOJO Arch Command (1.6.0)
>> [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler (1.6.0)
>> [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
>> [   6] [Active     ] [    1] Apache Felix iPOJO (1.8.2)
>> [   7] [Active     ] [    1] Apache Felix Declarative Services (1.6.0)
>> [   8] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
>> [   9] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
>> -> headers 9
>>
>> BndToolsTestIPojo (9)
>> ---------------------
>> Bnd-LastModified = 1334063371339
>> Bundle-ManifestVersion = 2
>> Bundle-Name = BndToolsTestIPojo
>> Bundle-SymbolicName = BndToolsTestIPojo
>> Bundle-Version = 0.0.1
>> Created-By = 1.6.0_31 (Sun Microsystems Inc.)
>> Import-Package =
>>
>> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
>> org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
>> Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
>> IPOJO-Components = instance { $component="org.example.ExampleComponent" }
>> Manifest-Version = 1.0
>> Private-Package = org.example
>> Tool = Bnd-1.51.0
>>
>> This is with bnd plugin version 1.8.2, manipulator 1.8.4 and core
>> built by Maven from source (changed version number to 1.8.2 to avoid a
>> problem with Bndtools). Tried 1.9.0-SNAPSHOT of bnd-plugin and
>> manipulator as well. (Don't know why BND is still calculating
>> Import-Package versions to be 1.8.0.)
>>
>>
>> Yours, Alexey Romanov
>>
>>
>>
>> On Tue, Apr 10, 2012 at 17:50, Guillaume Sauthier (Objectweb)
>> <gu...@objectweb.org> wrote:
>> > Uh, looks like 1.8.2 is still not released
>> >
>> > Can you try with the iPOJO core ? (Should be 1.9.0-SNAPSHOT)
>> >
>> > --G
>> >
>> > 2012/4/10 Guillaume Sauthier (Objectweb) <
>> guillaume.sauthier@objectweb.org>
>> >
>> >> Another thing, Bnd requires the Manifest headers to start with an
>> >> uppercase character.
>> >> https://issues.apache.org/jira/browse/FELIX-3036
>> >>
>> >> Looks like it's is iPOJO 1.8.2
>> >>
>> >> --G
>> >>
>> >> 2012/4/10 Alexey Romanov <al...@gmail.com>
>> >>
>> >>> Found this bug on JIRA:
>> >>> https://issues.apache.org/jira/browse/FELIX-3389 However, after
>> >>> updating to org.apache.felix.ipojo.manipulator-1.8.4.jar, there is no
>> >>> change.
>> >>>
>> >>> Yours, Alexey Romanov
>> >>>
>> >>>
>> >>>
>> >>> On Tue, Apr 10, 2012 at 14:29, Alexey Romanov
>> >>> <al...@gmail.com> wrote:
>> >>> > So, after adding the plugin,
>> >>> >
>> >>> > -plugin:
>> >>>
>> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/META-INF/metadata.xml;use-local-schemas=true
>> >>> >
>> >>> > it builds fine. I checked that META-INF/metadata.xml is included in
>> >>> > the JAR, and the plugin adds header "IPOJO-Components: instance {
>> >>> > $component="org.example.ExampleComponent" }". But when it's installed
>> >>> > and started, the component isn't created. Using online manipulator
>> >>> > works fine. Any idea what could be a reason? E.g. am I missing some
>> >>> > necessary bundle? Here is a log:
>> >>> >
>> >>> > -> ps
>> >>> > START LEVEL 1
>> >>> >   ID   State         Level  Name
>> >>> > [   0] [Active     ] [    0] System Bundle (4.0.1)
>> >>> > [   1] [Active     ] [    1] Apache Felix iPOJO (1.8.0)
>> >>> > [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
>> >>> > [   3] [Active     ] [    1] BndToolsTest (0)
>> >>> > [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler (1.6.0)
>> >>> > [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
>> >>> > [   6] [Active     ] [    1] Apache Felix Declarative Services
>> (1.6.0)
>> >>> > [   7] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
>> >>> > [   8] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
>> >>> > -> uninstall 8
>> >>> > -> install
>> >>>
>> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >>> > Bundle ID: 9
>> >>> > -> start 9
>> >>> > -> headers 9
>> >>> >
>> >>> > BndToolsTestIPojo (9)
>> >>> > ----------------------
>> >>> > Bnd-LastModified = 1334052977766
>> >>> > Bundle-ManifestVersion = 2
>> >>> > Bundle-Name = BndToolsTestIPojo
>> >>> > Bundle-SymbolicName = BndToolsTestIPojo
>> >>> > Bundle-Version = 0.0.1
>> >>> > Created-By = 1.6.0_31 (Sun Microsystems Inc.)
>> >>> > Import-Package =
>> >>> >
>> >>>
>> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
>> >>> org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
>> >>> > Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
>> >>> > IPOJO-Components = instance {
>> $component="org.example.ExampleComponent"
>> >>> }
>> >>> > Manifest-Version = 1.0
>> >>> > Private-Package = org.example
>> >>> > Tool = Bnd-1.51.0
>> >>> > -> uninstall 9
>> >>> > -> install
>> >>>
>> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >>> > Processing URL :
>> >>> >
>> >>>
>> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >>> > Extracted URL :
>> >>> >
>> >>>
>> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> >>> > 3092 bytes copied
>> >>> > Metadata file found: META-INF/metadata.xml
>> >>> > 73 bytes copied
>> >>> > Metadata file saved to
>> >>> >
>> >>>
>> /home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/fw/bundle4/data/temp/ipojo_4326206654856524444.xml
>> >>> > Pojoization true - true
>> >>> > Manipulation done : true
>> >>> > Bundle ID: 10
>> >>> > -> start 10
>> >>> > -> I'm constructed...
>> >>> > I'm starting...
>> >>> >
>> >>> > Yours, Alexey Romanov
>> >>> >
>> >>> >
>> >>> >
>> >>> > On Tue, Apr 10, 2012 at 13:13, Alexey Romanov
>> >>> > <al...@gmail.com> wrote:
>> >>> >> Thank you! Yes, that does help. Though I wonder why
>> >>> >> org.apache.felix.ipojo.manipulator-1.8.2.jar is not available from
>> >>> >> iPOJO downloads page: BND plugin appears to depend on it (according
>> to
>> >>> >>
>> >>>
>> http://mvnrepository.com/artifact/org.apache.felix/bnd-ipojo-plugin/1.8.2
>> >>> ),
>> >>> >> and I was
>> >>> >> getting NoClassDefFoundError until adding it to the plugin class
>> path.
>> >>> >>
>> >>> >> Yours, Alexey Romanov
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> On Tue, Apr 10, 2012 at 12:42, Guillaume Sauthier (Objectweb)
>> >>> >> <gu...@objectweb.org> wrote:
>> >>> >>> Nop, the Bnd "-plugin" instruction must contains the plugin
>> classname.
>> >>> >>> Ex:
>> >>> >>> -plugin
>> >>> >>>
>> >>>
>> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/src/main/resources/META-INF/metadata.xml;use-local-schemas=true
>> >>> >>>
>> >>> >>> The (optional) 'metadata' option instructs the plugin where to fin
>> the
>> >>> >>> metadata.xml file
>> >>> >>> By default, it looks in the archive for a META-INF/metadata.xml
>> file
>> >>> >>>
>> >>> >>> The (optional) 'use-local-schemas' property simply tells iPOJO to
>> not
>> >>> >>> verify XML validity against external resources but with the latest
>> XML
>> >>> >>> schemas included in the current version of the iPOJO manipulator
>> >>> >>>
>> >>> >>> Hope that helps
>> >>> >>> --G
>> >>> >>>
>> >>> >>> PS here is an example:
>> >>> >>>
>> >>>
>> http://gitorious.ow2.org/ow2-shelbie/parent/blobs/master/pom.xml#line303
>> >>> >>>
>> >>> >>>
>> >>> >>> 2012/4/9 Alexey Romanov <al...@gmail.com>
>> >>> >>>
>> >>> >>>> How can I use iPOJO BND plugin? What instructions does it
>> provide? Or
>> >>> >>>> is it enough to include
>> >>> >>>>
>> >>> >>>> -plugin: path_to_plugin/bnd-ipojo-plugin-1.8.2.jar
>> >>> >>>>
>> >>> >>>> in my .bnd file?
>> >>> >>>>
>> >>> >>>> Yours, Alexey Romanov
>> >>> >>>>
>> >>> >>>>
>> ---------------------------------------------------------------------
>> >>> >>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >>> >>>> For additional commands, e-mail: users-help@felix.apache.org
>> >>> >>>>
>> >>> >>>>
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >>> For additional commands, e-mail: users-help@felix.apache.org
>> >>>
>> >>>
>> >>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: iPOJO BND Plugin

Posted by "Guillaume Sauthier (Objectweb)" <gu...@objectweb.org>.
Looks like the IPOJO-Components manifest's heasder is missing the component
type description (something like component {class="some java class name",
....})

Are you using annotations or XML file for declaring your components ?
Can you show me your metadata.xml ?

--G

2012/4/10 Alexey Romanov <al...@gmail.com>

> Yes, just built it. Still no success:
>
> -> ps
> START LEVEL 1
>   ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (4.0.1)
> [   1] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> [   2] [Active     ] [    1] BndToolsTest (0)
> [   3] [Active     ] [    1] Apache Felix iPOJO Arch Command (1.6.0)
> [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler (1.6.0)
> [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> [   6] [Active     ] [    1] Apache Felix iPOJO (1.8.2)
> [   7] [Active     ] [    1] Apache Felix Declarative Services (1.6.0)
> [   8] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
> [   9] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
> -> headers 9
>
> BndToolsTestIPojo (9)
> ---------------------
> Bnd-LastModified = 1334063371339
> Bundle-ManifestVersion = 2
> Bundle-Name = BndToolsTestIPojo
> Bundle-SymbolicName = BndToolsTestIPojo
> Bundle-Version = 0.0.1
> Created-By = 1.6.0_31 (Sun Microsystems Inc.)
> Import-Package =
>
> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
> org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
> Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
> IPOJO-Components = instance { $component="org.example.ExampleComponent" }
> Manifest-Version = 1.0
> Private-Package = org.example
> Tool = Bnd-1.51.0
>
> This is with bnd plugin version 1.8.2, manipulator 1.8.4 and core
> built by Maven from source (changed version number to 1.8.2 to avoid a
> problem with Bndtools). Tried 1.9.0-SNAPSHOT of bnd-plugin and
> manipulator as well. (Don't know why BND is still calculating
> Import-Package versions to be 1.8.0.)
>
>
> Yours, Alexey Romanov
>
>
>
> On Tue, Apr 10, 2012 at 17:50, Guillaume Sauthier (Objectweb)
> <gu...@objectweb.org> wrote:
> > Uh, looks like 1.8.2 is still not released
> >
> > Can you try with the iPOJO core ? (Should be 1.9.0-SNAPSHOT)
> >
> > --G
> >
> > 2012/4/10 Guillaume Sauthier (Objectweb) <
> guillaume.sauthier@objectweb.org>
> >
> >> Another thing, Bnd requires the Manifest headers to start with an
> >> uppercase character.
> >> https://issues.apache.org/jira/browse/FELIX-3036
> >>
> >> Looks like it's is iPOJO 1.8.2
> >>
> >> --G
> >>
> >> 2012/4/10 Alexey Romanov <al...@gmail.com>
> >>
> >>> Found this bug on JIRA:
> >>> https://issues.apache.org/jira/browse/FELIX-3389 However, after
> >>> updating to org.apache.felix.ipojo.manipulator-1.8.4.jar, there is no
> >>> change.
> >>>
> >>> Yours, Alexey Romanov
> >>>
> >>>
> >>>
> >>> On Tue, Apr 10, 2012 at 14:29, Alexey Romanov
> >>> <al...@gmail.com> wrote:
> >>> > So, after adding the plugin,
> >>> >
> >>> > -plugin:
> >>>
> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/META-INF/metadata.xml;use-local-schemas=true
> >>> >
> >>> > it builds fine. I checked that META-INF/metadata.xml is included in
> >>> > the JAR, and the plugin adds header "IPOJO-Components: instance {
> >>> > $component="org.example.ExampleComponent" }". But when it's installed
> >>> > and started, the component isn't created. Using online manipulator
> >>> > works fine. Any idea what could be a reason? E.g. am I missing some
> >>> > necessary bundle? Here is a log:
> >>> >
> >>> > -> ps
> >>> > START LEVEL 1
> >>> >   ID   State         Level  Name
> >>> > [   0] [Active     ] [    0] System Bundle (4.0.1)
> >>> > [   1] [Active     ] [    1] Apache Felix iPOJO (1.8.0)
> >>> > [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> >>> > [   3] [Active     ] [    1] BndToolsTest (0)
> >>> > [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler (1.6.0)
> >>> > [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> >>> > [   6] [Active     ] [    1] Apache Felix Declarative Services
> (1.6.0)
> >>> > [   7] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
> >>> > [   8] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
> >>> > -> uninstall 8
> >>> > -> install
> >>>
> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> >>> > Bundle ID: 9
> >>> > -> start 9
> >>> > -> headers 9
> >>> >
> >>> > BndToolsTestIPojo (9)
> >>> > ----------------------
> >>> > Bnd-LastModified = 1334052977766
> >>> > Bundle-ManifestVersion = 2
> >>> > Bundle-Name = BndToolsTestIPojo
> >>> > Bundle-SymbolicName = BndToolsTestIPojo
> >>> > Bundle-Version = 0.0.1
> >>> > Created-By = 1.6.0_31 (Sun Microsystems Inc.)
> >>> > Import-Package =
> >>> >
> >>>
> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
> >>> org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
> >>> > Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
> >>> > IPOJO-Components = instance {
> $component="org.example.ExampleComponent"
> >>> }
> >>> > Manifest-Version = 1.0
> >>> > Private-Package = org.example
> >>> > Tool = Bnd-1.51.0
> >>> > -> uninstall 9
> >>> > -> install
> >>>
> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> >>> > Processing URL :
> >>> >
> >>>
> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> >>> > Extracted URL :
> >>> >
> >>>
> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> >>> > 3092 bytes copied
> >>> > Metadata file found: META-INF/metadata.xml
> >>> > 73 bytes copied
> >>> > Metadata file saved to
> >>> >
> >>>
> /home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/fw/bundle4/data/temp/ipojo_4326206654856524444.xml
> >>> > Pojoization true - true
> >>> > Manipulation done : true
> >>> > Bundle ID: 10
> >>> > -> start 10
> >>> > -> I'm constructed...
> >>> > I'm starting...
> >>> >
> >>> > Yours, Alexey Romanov
> >>> >
> >>> >
> >>> >
> >>> > On Tue, Apr 10, 2012 at 13:13, Alexey Romanov
> >>> > <al...@gmail.com> wrote:
> >>> >> Thank you! Yes, that does help. Though I wonder why
> >>> >> org.apache.felix.ipojo.manipulator-1.8.2.jar is not available from
> >>> >> iPOJO downloads page: BND plugin appears to depend on it (according
> to
> >>> >>
> >>>
> http://mvnrepository.com/artifact/org.apache.felix/bnd-ipojo-plugin/1.8.2
> >>> ),
> >>> >> and I was
> >>> >> getting NoClassDefFoundError until adding it to the plugin class
> path.
> >>> >>
> >>> >> Yours, Alexey Romanov
> >>> >>
> >>> >>
> >>> >>
> >>> >> On Tue, Apr 10, 2012 at 12:42, Guillaume Sauthier (Objectweb)
> >>> >> <gu...@objectweb.org> wrote:
> >>> >>> Nop, the Bnd "-plugin" instruction must contains the plugin
> classname.
> >>> >>> Ex:
> >>> >>> -plugin
> >>> >>>
> >>>
> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/src/main/resources/META-INF/metadata.xml;use-local-schemas=true
> >>> >>>
> >>> >>> The (optional) 'metadata' option instructs the plugin where to fin
> the
> >>> >>> metadata.xml file
> >>> >>> By default, it looks in the archive for a META-INF/metadata.xml
> file
> >>> >>>
> >>> >>> The (optional) 'use-local-schemas' property simply tells iPOJO to
> not
> >>> >>> verify XML validity against external resources but with the latest
> XML
> >>> >>> schemas included in the current version of the iPOJO manipulator
> >>> >>>
> >>> >>> Hope that helps
> >>> >>> --G
> >>> >>>
> >>> >>> PS here is an example:
> >>> >>>
> >>>
> http://gitorious.ow2.org/ow2-shelbie/parent/blobs/master/pom.xml#line303
> >>> >>>
> >>> >>>
> >>> >>> 2012/4/9 Alexey Romanov <al...@gmail.com>
> >>> >>>
> >>> >>>> How can I use iPOJO BND plugin? What instructions does it
> provide? Or
> >>> >>>> is it enough to include
> >>> >>>>
> >>> >>>> -plugin: path_to_plugin/bnd-ipojo-plugin-1.8.2.jar
> >>> >>>>
> >>> >>>> in my .bnd file?
> >>> >>>>
> >>> >>>> Yours, Alexey Romanov
> >>> >>>>
> >>> >>>>
> ---------------------------------------------------------------------
> >>> >>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>> >>>> For additional commands, e-mail: users-help@felix.apache.org
> >>> >>>>
> >>> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>> For additional commands, e-mail: users-help@felix.apache.org
> >>>
> >>>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: iPOJO BND Plugin

Posted by Alexey Romanov <al...@gmail.com>.
Yes, just built it. Still no success:

-> ps
START LEVEL 1
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (4.0.1)
[   1] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
[   2] [Active     ] [    1] BndToolsTest (0)
[   3] [Active     ] [    1] Apache Felix iPOJO Arch Command (1.6.0)
[   4] [Active     ] [    1] Apache Felix iPOJO URL Handler (1.6.0)
[   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
[   6] [Active     ] [    1] Apache Felix iPOJO (1.8.2)
[   7] [Active     ] [    1] Apache Felix Declarative Services (1.6.0)
[   8] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
[   9] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
-> headers 9

BndToolsTestIPojo (9)
---------------------
Bnd-LastModified = 1334063371339
Bundle-ManifestVersion = 2
Bundle-Name = BndToolsTestIPojo
Bundle-SymbolicName = BndToolsTestIPojo
Bundle-Version = 0.0.1
Created-By = 1.6.0_31 (Sun Microsystems Inc.)
Import-Package =
org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
IPOJO-Components = instance { $component="org.example.ExampleComponent" }
Manifest-Version = 1.0
Private-Package = org.example
Tool = Bnd-1.51.0

This is with bnd plugin version 1.8.2, manipulator 1.8.4 and core
built by Maven from source (changed version number to 1.8.2 to avoid a
problem with Bndtools). Tried 1.9.0-SNAPSHOT of bnd-plugin and
manipulator as well. (Don't know why BND is still calculating
Import-Package versions to be 1.8.0.)


Yours, Alexey Romanov



On Tue, Apr 10, 2012 at 17:50, Guillaume Sauthier (Objectweb)
<gu...@objectweb.org> wrote:
> Uh, looks like 1.8.2 is still not released
>
> Can you try with the iPOJO core ? (Should be 1.9.0-SNAPSHOT)
>
> --G
>
> 2012/4/10 Guillaume Sauthier (Objectweb) <gu...@objectweb.org>
>
>> Another thing, Bnd requires the Manifest headers to start with an
>> uppercase character.
>> https://issues.apache.org/jira/browse/FELIX-3036
>>
>> Looks like it's is iPOJO 1.8.2
>>
>> --G
>>
>> 2012/4/10 Alexey Romanov <al...@gmail.com>
>>
>>> Found this bug on JIRA:
>>> https://issues.apache.org/jira/browse/FELIX-3389 However, after
>>> updating to org.apache.felix.ipojo.manipulator-1.8.4.jar, there is no
>>> change.
>>>
>>> Yours, Alexey Romanov
>>>
>>>
>>>
>>> On Tue, Apr 10, 2012 at 14:29, Alexey Romanov
>>> <al...@gmail.com> wrote:
>>> > So, after adding the plugin,
>>> >
>>> > -plugin:
>>> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/META-INF/metadata.xml;use-local-schemas=true
>>> >
>>> > it builds fine. I checked that META-INF/metadata.xml is included in
>>> > the JAR, and the plugin adds header "IPOJO-Components: instance {
>>> > $component="org.example.ExampleComponent" }". But when it's installed
>>> > and started, the component isn't created. Using online manipulator
>>> > works fine. Any idea what could be a reason? E.g. am I missing some
>>> > necessary bundle? Here is a log:
>>> >
>>> > -> ps
>>> > START LEVEL 1
>>> >   ID   State         Level  Name
>>> > [   0] [Active     ] [    0] System Bundle (4.0.1)
>>> > [   1] [Active     ] [    1] Apache Felix iPOJO (1.8.0)
>>> > [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
>>> > [   3] [Active     ] [    1] BndToolsTest (0)
>>> > [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler (1.6.0)
>>> > [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
>>> > [   6] [Active     ] [    1] Apache Felix Declarative Services (1.6.0)
>>> > [   7] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
>>> > [   8] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
>>> > -> uninstall 8
>>> > -> install
>>> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>>> > Bundle ID: 9
>>> > -> start 9
>>> > -> headers 9
>>> >
>>> > BndToolsTestIPojo (9)
>>> > ----------------------
>>> > Bnd-LastModified = 1334052977766
>>> > Bundle-ManifestVersion = 2
>>> > Bundle-Name = BndToolsTestIPojo
>>> > Bundle-SymbolicName = BndToolsTestIPojo
>>> > Bundle-Version = 0.0.1
>>> > Created-By = 1.6.0_31 (Sun Microsystems Inc.)
>>> > Import-Package =
>>> >
>>> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
>>> org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
>>> > Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
>>> > IPOJO-Components = instance { $component="org.example.ExampleComponent"
>>> }
>>> > Manifest-Version = 1.0
>>> > Private-Package = org.example
>>> > Tool = Bnd-1.51.0
>>> > -> uninstall 9
>>> > -> install
>>> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>>> > Processing URL :
>>> >
>>> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>>> > Extracted URL :
>>> >
>>> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>>> > 3092 bytes copied
>>> > Metadata file found: META-INF/metadata.xml
>>> > 73 bytes copied
>>> > Metadata file saved to
>>> >
>>> /home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/fw/bundle4/data/temp/ipojo_4326206654856524444.xml
>>> > Pojoization true - true
>>> > Manipulation done : true
>>> > Bundle ID: 10
>>> > -> start 10
>>> > -> I'm constructed...
>>> > I'm starting...
>>> >
>>> > Yours, Alexey Romanov
>>> >
>>> >
>>> >
>>> > On Tue, Apr 10, 2012 at 13:13, Alexey Romanov
>>> > <al...@gmail.com> wrote:
>>> >> Thank you! Yes, that does help. Though I wonder why
>>> >> org.apache.felix.ipojo.manipulator-1.8.2.jar is not available from
>>> >> iPOJO downloads page: BND plugin appears to depend on it (according to
>>> >>
>>> http://mvnrepository.com/artifact/org.apache.felix/bnd-ipojo-plugin/1.8.2
>>> ),
>>> >> and I was
>>> >> getting NoClassDefFoundError until adding it to the plugin class path.
>>> >>
>>> >> Yours, Alexey Romanov
>>> >>
>>> >>
>>> >>
>>> >> On Tue, Apr 10, 2012 at 12:42, Guillaume Sauthier (Objectweb)
>>> >> <gu...@objectweb.org> wrote:
>>> >>> Nop, the Bnd "-plugin" instruction must contains the plugin classname.
>>> >>> Ex:
>>> >>> -plugin
>>> >>>
>>> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/src/main/resources/META-INF/metadata.xml;use-local-schemas=true
>>> >>>
>>> >>> The (optional) 'metadata' option instructs the plugin where to fin the
>>> >>> metadata.xml file
>>> >>> By default, it looks in the archive for a META-INF/metadata.xml file
>>> >>>
>>> >>> The (optional) 'use-local-schemas' property simply tells iPOJO to not
>>> >>> verify XML validity against external resources but with the latest XML
>>> >>> schemas included in the current version of the iPOJO manipulator
>>> >>>
>>> >>> Hope that helps
>>> >>> --G
>>> >>>
>>> >>> PS here is an example:
>>> >>>
>>> http://gitorious.ow2.org/ow2-shelbie/parent/blobs/master/pom.xml#line303
>>> >>>
>>> >>>
>>> >>> 2012/4/9 Alexey Romanov <al...@gmail.com>
>>> >>>
>>> >>>> How can I use iPOJO BND plugin? What instructions does it provide? Or
>>> >>>> is it enough to include
>>> >>>>
>>> >>>> -plugin: path_to_plugin/bnd-ipojo-plugin-1.8.2.jar
>>> >>>>
>>> >>>> in my .bnd file?
>>> >>>>
>>> >>>> Yours, Alexey Romanov
>>> >>>>
>>> >>>> ---------------------------------------------------------------------
>>> >>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> >>>> For additional commands, e-mail: users-help@felix.apache.org
>>> >>>>
>>> >>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: iPOJO BND Plugin

Posted by "Guillaume Sauthier (Objectweb)" <gu...@objectweb.org>.
Uh, looks like 1.8.2 is still not released

Can you try with the iPOJO core ? (Should be 1.9.0-SNAPSHOT)

--G

2012/4/10 Guillaume Sauthier (Objectweb) <gu...@objectweb.org>

> Another thing, Bnd requires the Manifest headers to start with an
> uppercase character.
> https://issues.apache.org/jira/browse/FELIX-3036
>
> Looks like it's is iPOJO 1.8.2
>
> --G
>
> 2012/4/10 Alexey Romanov <al...@gmail.com>
>
>> Found this bug on JIRA:
>> https://issues.apache.org/jira/browse/FELIX-3389 However, after
>> updating to org.apache.felix.ipojo.manipulator-1.8.4.jar, there is no
>> change.
>>
>> Yours, Alexey Romanov
>>
>>
>>
>> On Tue, Apr 10, 2012 at 14:29, Alexey Romanov
>> <al...@gmail.com> wrote:
>> > So, after adding the plugin,
>> >
>> > -plugin:
>> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/META-INF/metadata.xml;use-local-schemas=true
>> >
>> > it builds fine. I checked that META-INF/metadata.xml is included in
>> > the JAR, and the plugin adds header "IPOJO-Components: instance {
>> > $component="org.example.ExampleComponent" }". But when it's installed
>> > and started, the component isn't created. Using online manipulator
>> > works fine. Any idea what could be a reason? E.g. am I missing some
>> > necessary bundle? Here is a log:
>> >
>> > -> ps
>> > START LEVEL 1
>> >   ID   State         Level  Name
>> > [   0] [Active     ] [    0] System Bundle (4.0.1)
>> > [   1] [Active     ] [    1] Apache Felix iPOJO (1.8.0)
>> > [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
>> > [   3] [Active     ] [    1] BndToolsTest (0)
>> > [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler (1.6.0)
>> > [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
>> > [   6] [Active     ] [    1] Apache Felix Declarative Services (1.6.0)
>> > [   7] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
>> > [   8] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
>> > -> uninstall 8
>> > -> install
>> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> > Bundle ID: 9
>> > -> start 9
>> > -> headers 9
>> >
>> > BndToolsTestIPojo (9)
>> > ----------------------
>> > Bnd-LastModified = 1334052977766
>> > Bundle-ManifestVersion = 2
>> > Bundle-Name = BndToolsTestIPojo
>> > Bundle-SymbolicName = BndToolsTestIPojo
>> > Bundle-Version = 0.0.1
>> > Created-By = 1.6.0_31 (Sun Microsystems Inc.)
>> > Import-Package =
>> >
>> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
>> org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
>> > Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
>> > IPOJO-Components = instance { $component="org.example.ExampleComponent"
>> }
>> > Manifest-Version = 1.0
>> > Private-Package = org.example
>> > Tool = Bnd-1.51.0
>> > -> uninstall 9
>> > -> install
>> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> > Processing URL :
>> >
>> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> > Extracted URL :
>> >
>> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
>> > 3092 bytes copied
>> > Metadata file found: META-INF/metadata.xml
>> > 73 bytes copied
>> > Metadata file saved to
>> >
>> /home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/fw/bundle4/data/temp/ipojo_4326206654856524444.xml
>> > Pojoization true - true
>> > Manipulation done : true
>> > Bundle ID: 10
>> > -> start 10
>> > -> I'm constructed...
>> > I'm starting...
>> >
>> > Yours, Alexey Romanov
>> >
>> >
>> >
>> > On Tue, Apr 10, 2012 at 13:13, Alexey Romanov
>> > <al...@gmail.com> wrote:
>> >> Thank you! Yes, that does help. Though I wonder why
>> >> org.apache.felix.ipojo.manipulator-1.8.2.jar is not available from
>> >> iPOJO downloads page: BND plugin appears to depend on it (according to
>> >>
>> http://mvnrepository.com/artifact/org.apache.felix/bnd-ipojo-plugin/1.8.2
>> ),
>> >> and I was
>> >> getting NoClassDefFoundError until adding it to the plugin class path.
>> >>
>> >> Yours, Alexey Romanov
>> >>
>> >>
>> >>
>> >> On Tue, Apr 10, 2012 at 12:42, Guillaume Sauthier (Objectweb)
>> >> <gu...@objectweb.org> wrote:
>> >>> Nop, the Bnd "-plugin" instruction must contains the plugin classname.
>> >>> Ex:
>> >>> -plugin
>> >>>
>> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/src/main/resources/META-INF/metadata.xml;use-local-schemas=true
>> >>>
>> >>> The (optional) 'metadata' option instructs the plugin where to fin the
>> >>> metadata.xml file
>> >>> By default, it looks in the archive for a META-INF/metadata.xml file
>> >>>
>> >>> The (optional) 'use-local-schemas' property simply tells iPOJO to not
>> >>> verify XML validity against external resources but with the latest XML
>> >>> schemas included in the current version of the iPOJO manipulator
>> >>>
>> >>> Hope that helps
>> >>> --G
>> >>>
>> >>> PS here is an example:
>> >>>
>> http://gitorious.ow2.org/ow2-shelbie/parent/blobs/master/pom.xml#line303
>> >>>
>> >>>
>> >>> 2012/4/9 Alexey Romanov <al...@gmail.com>
>> >>>
>> >>>> How can I use iPOJO BND plugin? What instructions does it provide? Or
>> >>>> is it enough to include
>> >>>>
>> >>>> -plugin: path_to_plugin/bnd-ipojo-plugin-1.8.2.jar
>> >>>>
>> >>>> in my .bnd file?
>> >>>>
>> >>>> Yours, Alexey Romanov
>> >>>>
>> >>>> ---------------------------------------------------------------------
>> >>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >>>> For additional commands, e-mail: users-help@felix.apache.org
>> >>>>
>> >>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>

Re: iPOJO BND Plugin

Posted by "Guillaume Sauthier (Objectweb)" <gu...@objectweb.org>.
Another thing, Bnd requires the Manifest headers to start with an uppercase
character.
https://issues.apache.org/jira/browse/FELIX-3036

Looks like it's is iPOJO 1.8.2

--G

2012/4/10 Alexey Romanov <al...@gmail.com>

> Found this bug on JIRA:
> https://issues.apache.org/jira/browse/FELIX-3389 However, after
> updating to org.apache.felix.ipojo.manipulator-1.8.4.jar, there is no
> change.
>
> Yours, Alexey Romanov
>
>
>
> On Tue, Apr 10, 2012 at 14:29, Alexey Romanov
> <al...@gmail.com> wrote:
> > So, after adding the plugin,
> >
> > -plugin:
> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/META-INF/metadata.xml;use-local-schemas=true
> >
> > it builds fine. I checked that META-INF/metadata.xml is included in
> > the JAR, and the plugin adds header "IPOJO-Components: instance {
> > $component="org.example.ExampleComponent" }". But when it's installed
> > and started, the component isn't created. Using online manipulator
> > works fine. Any idea what could be a reason? E.g. am I missing some
> > necessary bundle? Here is a log:
> >
> > -> ps
> > START LEVEL 1
> >   ID   State         Level  Name
> > [   0] [Active     ] [    0] System Bundle (4.0.1)
> > [   1] [Active     ] [    1] Apache Felix iPOJO (1.8.0)
> > [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> > [   3] [Active     ] [    1] BndToolsTest (0)
> > [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler (1.6.0)
> > [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> > [   6] [Active     ] [    1] Apache Felix Declarative Services (1.6.0)
> > [   7] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
> > [   8] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
> > -> uninstall 8
> > -> install
> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> > Bundle ID: 9
> > -> start 9
> > -> headers 9
> >
> > BndToolsTestIPojo (9)
> > ----------------------
> > Bnd-LastModified = 1334052977766
> > Bundle-ManifestVersion = 2
> > Bundle-Name = BndToolsTestIPojo
> > Bundle-SymbolicName = BndToolsTestIPojo
> > Bundle-Version = 0.0.1
> > Created-By = 1.6.0_31 (Sun Microsystems Inc.)
> > Import-Package =
> >
> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
> org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
> > Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
> > IPOJO-Components = instance { $component="org.example.ExampleComponent" }
> > Manifest-Version = 1.0
> > Private-Package = org.example
> > Tool = Bnd-1.51.0
> > -> uninstall 9
> > -> install
> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> > Processing URL :
> >
> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> > Extracted URL :
> >
> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> > 3092 bytes copied
> > Metadata file found: META-INF/metadata.xml
> > 73 bytes copied
> > Metadata file saved to
> >
> /home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/fw/bundle4/data/temp/ipojo_4326206654856524444.xml
> > Pojoization true - true
> > Manipulation done : true
> > Bundle ID: 10
> > -> start 10
> > -> I'm constructed...
> > I'm starting...
> >
> > Yours, Alexey Romanov
> >
> >
> >
> > On Tue, Apr 10, 2012 at 13:13, Alexey Romanov
> > <al...@gmail.com> wrote:
> >> Thank you! Yes, that does help. Though I wonder why
> >> org.apache.felix.ipojo.manipulator-1.8.2.jar is not available from
> >> iPOJO downloads page: BND plugin appears to depend on it (according to
> >>
> http://mvnrepository.com/artifact/org.apache.felix/bnd-ipojo-plugin/1.8.2
> ),
> >> and I was
> >> getting NoClassDefFoundError until adding it to the plugin class path.
> >>
> >> Yours, Alexey Romanov
> >>
> >>
> >>
> >> On Tue, Apr 10, 2012 at 12:42, Guillaume Sauthier (Objectweb)
> >> <gu...@objectweb.org> wrote:
> >>> Nop, the Bnd "-plugin" instruction must contains the plugin classname.
> >>> Ex:
> >>> -plugin
> >>>
> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/src/main/resources/META-INF/metadata.xml;use-local-schemas=true
> >>>
> >>> The (optional) 'metadata' option instructs the plugin where to fin the
> >>> metadata.xml file
> >>> By default, it looks in the archive for a META-INF/metadata.xml file
> >>>
> >>> The (optional) 'use-local-schemas' property simply tells iPOJO to not
> >>> verify XML validity against external resources but with the latest XML
> >>> schemas included in the current version of the iPOJO manipulator
> >>>
> >>> Hope that helps
> >>> --G
> >>>
> >>> PS here is an example:
> >>>
> http://gitorious.ow2.org/ow2-shelbie/parent/blobs/master/pom.xml#line303
> >>>
> >>>
> >>> 2012/4/9 Alexey Romanov <al...@gmail.com>
> >>>
> >>>> How can I use iPOJO BND plugin? What instructions does it provide? Or
> >>>> is it enough to include
> >>>>
> >>>> -plugin: path_to_plugin/bnd-ipojo-plugin-1.8.2.jar
> >>>>
> >>>> in my .bnd file?
> >>>>
> >>>> Yours, Alexey Romanov
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>
> >>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: iPOJO BND Plugin

Posted by Alexey Romanov <al...@gmail.com>.
Found this bug on JIRA:
https://issues.apache.org/jira/browse/FELIX-3389 However, after
updating to org.apache.felix.ipojo.manipulator-1.8.4.jar, there is no
change.

Yours, Alexey Romanov



On Tue, Apr 10, 2012 at 14:29, Alexey Romanov
<al...@gmail.com> wrote:
> So, after adding the plugin,
>
> -plugin: org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/META-INF/metadata.xml;use-local-schemas=true
>
> it builds fine. I checked that META-INF/metadata.xml is included in
> the JAR, and the plugin adds header "IPOJO-Components: instance {
> $component="org.example.ExampleComponent" }". But when it's installed
> and started, the component isn't created. Using online manipulator
> works fine. Any idea what could be a reason? E.g. am I missing some
> necessary bundle? Here is a log:
>
> -> ps
> START LEVEL 1
>   ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (4.0.1)
> [   1] [Active     ] [    1] Apache Felix iPOJO (1.8.0)
> [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> [   3] [Active     ] [    1] BndToolsTest (0)
> [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler (1.6.0)
> [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> [   6] [Active     ] [    1] Apache Felix Declarative Services (1.6.0)
> [   7] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
> [   8] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
> -> uninstall 8
> -> install file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> Bundle ID: 9
> -> start 9
> -> headers 9
>
> BndToolsTestIPojo (9)
> ----------------------
> Bnd-LastModified = 1334052977766
> Bundle-ManifestVersion = 2
> Bundle-Name = BndToolsTestIPojo
> Bundle-SymbolicName = BndToolsTestIPojo
> Bundle-Version = 0.0.1
> Created-By = 1.6.0_31 (Sun Microsystems Inc.)
> Import-Package =
> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
> Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
> IPOJO-Components = instance { $component="org.example.ExampleComponent" }
> Manifest-Version = 1.0
> Private-Package = org.example
> Tool = Bnd-1.51.0
> -> uninstall 9
> -> install ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> Processing URL :
> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> Extracted URL :
> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> 3092 bytes copied
> Metadata file found: META-INF/metadata.xml
> 73 bytes copied
> Metadata file saved to
> /home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/fw/bundle4/data/temp/ipojo_4326206654856524444.xml
> Pojoization true - true
> Manipulation done : true
> Bundle ID: 10
> -> start 10
> -> I'm constructed...
> I'm starting...
>
> Yours, Alexey Romanov
>
>
>
> On Tue, Apr 10, 2012 at 13:13, Alexey Romanov
> <al...@gmail.com> wrote:
>> Thank you! Yes, that does help. Though I wonder why
>> org.apache.felix.ipojo.manipulator-1.8.2.jar is not available from
>> iPOJO downloads page: BND plugin appears to depend on it (according to
>> http://mvnrepository.com/artifact/org.apache.felix/bnd-ipojo-plugin/1.8.2),
>> and I was
>> getting NoClassDefFoundError until adding it to the plugin class path.
>>
>> Yours, Alexey Romanov
>>
>>
>>
>> On Tue, Apr 10, 2012 at 12:42, Guillaume Sauthier (Objectweb)
>> <gu...@objectweb.org> wrote:
>>> Nop, the Bnd "-plugin" instruction must contains the plugin classname.
>>> Ex:
>>> -plugin
>>> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/src/main/resources/META-INF/metadata.xml;use-local-schemas=true
>>>
>>> The (optional) 'metadata' option instructs the plugin where to fin the
>>> metadata.xml file
>>> By default, it looks in the archive for a META-INF/metadata.xml file
>>>
>>> The (optional) 'use-local-schemas' property simply tells iPOJO to not
>>> verify XML validity against external resources but with the latest XML
>>> schemas included in the current version of the iPOJO manipulator
>>>
>>> Hope that helps
>>> --G
>>>
>>> PS here is an example:
>>> http://gitorious.ow2.org/ow2-shelbie/parent/blobs/master/pom.xml#line303
>>>
>>>
>>> 2012/4/9 Alexey Romanov <al...@gmail.com>
>>>
>>>> How can I use iPOJO BND plugin? What instructions does it provide? Or
>>>> is it enough to include
>>>>
>>>> -plugin: path_to_plugin/bnd-ipojo-plugin-1.8.2.jar
>>>>
>>>> in my .bnd file?
>>>>
>>>> Yours, Alexey Romanov
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: iPOJO BND Plugin

Posted by "Guillaume Sauthier (Objectweb)" <gu...@objectweb.org>.
Please use version 1.8.4
--G

2012/4/10 Alexey Romanov <al...@gmail.com>

> So, after adding the plugin,
>
> -plugin:
> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/META-INF/metadata.xml;use-local-schemas=true
>
> it builds fine. I checked that META-INF/metadata.xml is included in
> the JAR, and the plugin adds header "IPOJO-Components: instance {
> $component="org.example.ExampleComponent" }". But when it's installed
> and started, the component isn't created. Using online manipulator
> works fine. Any idea what could be a reason? E.g. am I missing some
> necessary bundle? Here is a log:
>
> -> ps
> START LEVEL 1
>   ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (4.0.1)
> [   1] [Active     ] [    1] Apache Felix iPOJO (1.8.0)
> [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> [   3] [Active     ] [    1] BndToolsTest (0)
> [   4] [Active     ] [    1] Apache Felix iPOJO URL Handler (1.6.0)
> [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> [   6] [Active     ] [    1] Apache Felix Declarative Services (1.6.0)
> [   7] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
> [   8] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
> -> uninstall 8
> -> install
> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> Bundle ID: 9
> -> start 9
> -> headers 9
>
> BndToolsTestIPojo (9)
> ----------------------
> Bnd-LastModified = 1334052977766
> Bundle-ManifestVersion = 2
> Bundle-Name = BndToolsTestIPojo
> Bundle-SymbolicName = BndToolsTestIPojo
> Bundle-Version = 0.0.1
> Created-By = 1.6.0_31 (Sun Microsystems Inc.)
> Import-Package =
>
> org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",
> org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
> Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
> IPOJO-Components = instance { $component="org.example.ExampleComponent" }
> Manifest-Version = 1.0
> Private-Package = org.example
> Tool = Bnd-1.51.0
> -> uninstall 9
> -> install
> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> Processing URL :
>
> ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> Extracted URL :
>
> file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
> 3092 bytes copied
> Metadata file found: META-INF/metadata.xml
> 73 bytes copied
> Metadata file saved to
>
> /home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/fw/bundle4/data/temp/ipojo_4326206654856524444.xml
> Pojoization true - true
> Manipulation done : true
> Bundle ID: 10
> -> start 10
> -> I'm constructed...
> I'm starting...
>
> Yours, Alexey Romanov
>
>
>
> On Tue, Apr 10, 2012 at 13:13, Alexey Romanov
> <al...@gmail.com> wrote:
> > Thank you! Yes, that does help. Though I wonder why
> > org.apache.felix.ipojo.manipulator-1.8.2.jar is not available from
> > iPOJO downloads page: BND plugin appears to depend on it (according to
> >
> http://mvnrepository.com/artifact/org.apache.felix/bnd-ipojo-plugin/1.8.2
> ),
> > and I was
> > getting NoClassDefFoundError until adding it to the plugin class path.
> >
> > Yours, Alexey Romanov
> >
> >
> >
> > On Tue, Apr 10, 2012 at 12:42, Guillaume Sauthier (Objectweb)
> > <gu...@objectweb.org> wrote:
> >> Nop, the Bnd "-plugin" instruction must contains the plugin classname.
> >> Ex:
> >> -plugin
> >>
> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/src/main/resources/META-INF/metadata.xml;use-local-schemas=true
> >>
> >> The (optional) 'metadata' option instructs the plugin where to fin the
> >> metadata.xml file
> >> By default, it looks in the archive for a META-INF/metadata.xml file
> >>
> >> The (optional) 'use-local-schemas' property simply tells iPOJO to not
> >> verify XML validity against external resources but with the latest XML
> >> schemas included in the current version of the iPOJO manipulator
> >>
> >> Hope that helps
> >> --G
> >>
> >> PS here is an example:
> >>
> http://gitorious.ow2.org/ow2-shelbie/parent/blobs/master/pom.xml#line303
> >>
> >>
> >> 2012/4/9 Alexey Romanov <al...@gmail.com>
> >>
> >>> How can I use iPOJO BND plugin? What instructions does it provide? Or
> >>> is it enough to include
> >>>
> >>> -plugin: path_to_plugin/bnd-ipojo-plugin-1.8.2.jar
> >>>
> >>> in my .bnd file?
> >>>
> >>> Yours, Alexey Romanov
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>> For additional commands, e-mail: users-help@felix.apache.org
> >>>
> >>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: iPOJO BND Plugin

Posted by Alexey Romanov <al...@gmail.com>.
So, after adding the plugin,

-plugin: org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/META-INF/metadata.xml;use-local-schemas=true

it builds fine. I checked that META-INF/metadata.xml is included in
the JAR, and the plugin adds header "IPOJO-Components: instance {
$component="org.example.ExampleComponent" }". But when it's installed
and started, the component isn't created. Using online manipulator
works fine. Any idea what could be a reason? E.g. am I missing some
necessary bundle? Here is a log:

-> ps
START LEVEL 1
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (4.0.1)
[   1] [Active     ] [    1] Apache Felix iPOJO (1.8.0)
[   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
[   3] [Active     ] [    1] BndToolsTest (0)
[   4] [Active     ] [    1] Apache Felix iPOJO URL Handler (1.6.0)
[   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
[   6] [Active     ] [    1] Apache Felix Declarative Services (1.6.0)
[   7] [Active     ] [    1] osgi.cmpn (4.2.1.201001051203)
[   8] [Active     ] [    1] BndToolsTestIPojo (0.0.1)
-> uninstall 8
-> install file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
Bundle ID: 9
-> start 9
-> headers 9

BndToolsTestIPojo (9)
----------------------
Bnd-LastModified = 1334052977766
Bundle-ManifestVersion = 2
Bundle-Name = BndToolsTestIPojo
Bundle-SymbolicName = BndToolsTestIPojo
Bundle-Version = 0.0.1
Created-By = 1.6.0_31 (Sun Microsystems Inc.)
Import-Package =
org.apache.felix.ipojo;version="1.8.0",org.apache.felix.ipojo.architecture;version="1.8.0",org.example.api;version="[1.0,2)",org.osgi.service.cm;version="1.2",org.osgi.service.log;version="1.3"
Include-Resource = META-INF/metadata.xml=META-INF/metadata.xml
IPOJO-Components = instance { $component="org.example.ExampleComponent" }
Manifest-Version = 1.0
Private-Package = org.example
Tool = Bnd-1.51.0
-> uninstall 9
-> install ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
Processing URL :
ipojo:file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
Extracted URL :
file:/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/BndToolsTestIPojo.jar
3092 bytes copied
Metadata file found: META-INF/metadata.xml
73 bytes copied
Metadata file saved to
/home/aromanov/workspaces/odp-server/BndToolsTestIPojo/generated/fw/bundle4/data/temp/ipojo_4326206654856524444.xml
Pojoization true - true
Manipulation done : true
Bundle ID: 10
-> start 10
-> I'm constructed...
I'm starting...

Yours, Alexey Romanov



On Tue, Apr 10, 2012 at 13:13, Alexey Romanov
<al...@gmail.com> wrote:
> Thank you! Yes, that does help. Though I wonder why
> org.apache.felix.ipojo.manipulator-1.8.2.jar is not available from
> iPOJO downloads page: BND plugin appears to depend on it (according to
> http://mvnrepository.com/artifact/org.apache.felix/bnd-ipojo-plugin/1.8.2),
> and I was
> getting NoClassDefFoundError until adding it to the plugin class path.
>
> Yours, Alexey Romanov
>
>
>
> On Tue, Apr 10, 2012 at 12:42, Guillaume Sauthier (Objectweb)
> <gu...@objectweb.org> wrote:
>> Nop, the Bnd "-plugin" instruction must contains the plugin classname.
>> Ex:
>> -plugin
>> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/src/main/resources/META-INF/metadata.xml;use-local-schemas=true
>>
>> The (optional) 'metadata' option instructs the plugin where to fin the
>> metadata.xml file
>> By default, it looks in the archive for a META-INF/metadata.xml file
>>
>> The (optional) 'use-local-schemas' property simply tells iPOJO to not
>> verify XML validity against external resources but with the latest XML
>> schemas included in the current version of the iPOJO manipulator
>>
>> Hope that helps
>> --G
>>
>> PS here is an example:
>> http://gitorious.ow2.org/ow2-shelbie/parent/blobs/master/pom.xml#line303
>>
>>
>> 2012/4/9 Alexey Romanov <al...@gmail.com>
>>
>>> How can I use iPOJO BND plugin? What instructions does it provide? Or
>>> is it enough to include
>>>
>>> -plugin: path_to_plugin/bnd-ipojo-plugin-1.8.2.jar
>>>
>>> in my .bnd file?
>>>
>>> Yours, Alexey Romanov
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: iPOJO BND Plugin

Posted by Alexey Romanov <al...@gmail.com>.
Thank you! Yes, that does help. Though I wonder why
org.apache.felix.ipojo.manipulator-1.8.2.jar is not available from
iPOJO downloads page: BND plugin appears to depend on it (according to
http://mvnrepository.com/artifact/org.apache.felix/bnd-ipojo-plugin/1.8.2),
and I was
getting NoClassDefFoundError until adding it to the plugin class path.

Yours, Alexey Romanov



On Tue, Apr 10, 2012 at 12:42, Guillaume Sauthier (Objectweb)
<gu...@objectweb.org> wrote:
> Nop, the Bnd "-plugin" instruction must contains the plugin classname.
> Ex:
> -plugin
> org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/src/main/resources/META-INF/metadata.xml;use-local-schemas=true
>
> The (optional) 'metadata' option instructs the plugin where to fin the
> metadata.xml file
> By default, it looks in the archive for a META-INF/metadata.xml file
>
> The (optional) 'use-local-schemas' property simply tells iPOJO to not
> verify XML validity against external resources but with the latest XML
> schemas included in the current version of the iPOJO manipulator
>
> Hope that helps
> --G
>
> PS here is an example:
> http://gitorious.ow2.org/ow2-shelbie/parent/blobs/master/pom.xml#line303
>
>
> 2012/4/9 Alexey Romanov <al...@gmail.com>
>
>> How can I use iPOJO BND plugin? What instructions does it provide? Or
>> is it enough to include
>>
>> -plugin: path_to_plugin/bnd-ipojo-plugin-1.8.2.jar
>>
>> in my .bnd file?
>>
>> Yours, Alexey Romanov
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: iPOJO BND Plugin

Posted by "Guillaume Sauthier (Objectweb)" <gu...@objectweb.org>.
Nop, the Bnd "-plugin" instruction must contains the plugin classname.
Ex:
-plugin
org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/src/main/resources/META-INF/metadata.xml;use-local-schemas=true

The (optional) 'metadata' option instructs the plugin where to fin the
metadata.xml file
By default, it looks in the archive for a META-INF/metadata.xml file

The (optional) 'use-local-schemas' property simply tells iPOJO to not
verify XML validity against external resources but with the latest XML
schemas included in the current version of the iPOJO manipulator

Hope that helps
--G

PS here is an example:
http://gitorious.ow2.org/ow2-shelbie/parent/blobs/master/pom.xml#line303


2012/4/9 Alexey Romanov <al...@gmail.com>

> How can I use iPOJO BND plugin? What instructions does it provide? Or
> is it enough to include
>
> -plugin: path_to_plugin/bnd-ipojo-plugin-1.8.2.jar
>
> in my .bnd file?
>
> Yours, Alexey Romanov
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: iPOJO BND Plugin

Posted by Clement Escoffier <cl...@gmail.com>.
Hi,

This pom file gives you an example:
http://svn.apache.org/viewvc/felix/trunk/ipojo/junit4osgi/junit4osgi/pom.xml?view=markup

(notice that the maven-ipojo-plugin is in comment).

Basically, you need to declare the _plugin:
<_plugin>
	org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/metadata.xml;use-local-schemas=true
</_plugin>

Regards,

Clement

On 09.04.2012, at 13:12, Alexey Romanov wrote:

> How can I use iPOJO BND plugin? What instructions does it provide? Or
> is it enough to include
> 
> -plugin: path_to_plugin/bnd-ipojo-plugin-1.8.2.jar
> 
> in my .bnd file?
> 
> Yours, Alexey Romanov
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>