You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Milen Dyankov <mi...@gmail.com> on 2014/09/13 02:00:13 UTC

iPojo @Stereotype annotated annotation from separate bundle

Hi,

Is the usage of a @Stereotype annotated annotation from another bundle
supported? It doesn't seem to work even though the package is properly
exported and imported.

The docs only say:

If the stereotyped annotation is directly in the manipulated module, no
> problems: any front-end will work as expected.
> If not, the different manipulator's front-end have variable support for
> the stereotype feature.


This is not very clear to me and to be honest I'm no sure what a
"manipulator's front-end" is.

Regards,
Milen



-- 
http://about.me/milen

Re: iPojo @Stereotype annotated annotation from separate bundle

Posted by Milen Dyankov <mi...@gmail.com>.
Hi guys,

I'm sorry it took me so long but I've been really busy lately. I just
wanted to let you know I created a JIRA issue (
https://issues.apache.org/jira/browse/FELIX-4668) and attached a sample
projects to it.
I'm still not sure if this is a bug or I'm missing something and trying to
use it in the wrong way.

Regards,
Milen



On Tue, Sep 30, 2014 at 12:02 AM, Milen Dyankov <mi...@gmail.com>
wrote:

> I can but most likely not before next week.
>
> Thanks
>
> On Mon, Sep 29, 2014 at 1:00 AM, Guillaume Sauthier (OW2) <
> guillaume.ow2@gmail.com> wrote:
>
>> Hi Milen
>>
>> Can you share a minimal project to help us reproduce the issue ?
>> If you could zip it and attach it to a new JIRA, that would be great.
>>
>> Thanks
>>
>> --
>> Guillaume Sauthier (OW2)
>> Sent with Airmail
>>
>> On 22 Sep 2014 at 08:27:12, Clement Escoffier (
>> clement.escoffier@gmail.com) wrote:
>>
>> Hi,
>>
>> Sorry for the late reply (should never change my email program).
>>
>> So, it should not be the case. As soon as the stereotype is available in
>> the manipulator class path, it should be used. Obviously, if it’s in the
>> bundle, it’s necessarily in the class path. Could you open an issue, it’s
>> probably a bug.
>>
>> Cheers,
>>
>> Clement
>> On 16 septembre 2014 at 10:57:46, Milen Dyankov (milendyankov@gmail.com)
>> wrote:
>>
>> OK, my bad, I asked the question poorly.
>> It of course works with private-package as well (I just used the export in
>> my simple test).
>> What I intended to ask was, why the stereotype class needs to be included
>> in the bundle using it? In another words - isn't it enough that the bundle
>> imports the package and the jar is on maven's classpath?
>>
>> On Mon, Sep 15, 2014 at 3:26 PM, Clement Escoffier <
>> clement.escoffier@gmail.com> wrote:
>>
>> > Hi,
>> >
>> > Could you check that the stereotype class is actually included in the
>> jar
>> > file when not exported ? Maybe the ‘private-package’ instruction
>> contains
>> > the error.
>> >
>> > Cheers,
>> >
>> > Clement
>> >
>> > On 15 septembre 2014 at 15:05:17, Milen Dyankov (milendyankov@gmail.com
>> )
>> > wrote:
>> >
>> > OK, found the problem. It's due to how <Export-Package> of
>> > the maven-bundle-plugin is configured.
>> >
>> > Here is an example:
>> > - I have stereotype maven project where I define a @Stereotype as
>> > *test.ipojo.stereotype*.MyComponent
>> > - The bundle maven project where I try to use the stereotype has its
>> > classes in the package *test.ipojo.bundle*
>> >
>> > When I have this in the bundle maven project :
>> >
>> >
>> >
>> <Export-Package>test.ipojo.bundle*;version=${project.version}</Export-Package>
>> >
>> > it does not work! What I see in the console is:
>> >
>> > [WARNING] Class test.ipojo.bundle.ComponentByStereotype has not been
>> marked
>> > as a component type (no @Component, @Handler, ...). It will be ignored
>> by
>> > the iPOJO manipulator.
>> >
>> > However changing this to:
>> >
>> > <Export-Package>*test.ipojo.stereotype**
>> > ,test.ipojo.bundle*;version=${project.version}</Export-Package>
>> >
>> > works just fine.
>> >
>> > While I now know how to make it work, I'm still confused why do I need
>> to
>> > export the stereotype package?
>> >
>> >
>> >
>> > On Mon, Sep 15, 2014 at 11:24 AM, Milen Dyankov <milendyankov@gmail.com
>> >
>> > wrote:
>> >
>> > > Thanks for explaining how it works Clement!
>> > > I am indeed using maven and I tried to add the jar as a maven-ipojo-
>> > > plugin dependency but it still does not seem to work.
>> > > I'll play a bit with it and if it still does not work I'll try to
>> extract
>> > > and provide a simple example so you can eventually tell me what I'm
>> doing
>> > > wrong.
>> > >
>> > > Best,
>> > > Milen
>> > >
>> > >
>> > > On Sat, Sep 13, 2014 at 9:01 AM, Clement Escoffier <
>> > > clement.escoffier@gmail.com> wrote:
>> > >
>> > >> Hi,
>> > >>
>> > >> Stereotypes are analyzed at build time, not at runtime. So they are
>> > >> packaged in regular jars. To work as expected, the stereotype need
>> to be
>> > >> available from the ‘manipulator’ engine, in other words: be in the
>> same
>> > >> class path.
>> > >>
>> > >> So, if you are using Maven, you can do as follows:
>> > >>
>> > >> <plugin>
>> > >> <groupId>org.apache.felix</groupId>
>> > >> <artifactId>maven-ipojo-plugin</artifactId>
>> > >> <executions>
>> > >> <execution>
>> > >> <goals>
>> > >> <goal>ipojo-bundle</goal>
>> > >> </goals>
>> > >> </execution>
>> > >> </executions>
>> > >> <dependencies>
>> > >> <dependency>
>> > >> <groupId>your.groupId</groupId>
>> > >> <artifactId>your.sterotype.artifactId</artifactId>
>> > >> <version>your.version</version>
>> > >> </dependency>
>> > >> </dependencies>
>> > >> </plugin>
>> > >>
>> > >> Cheers,
>> > >>
>> > >> Clement
>> > >>
>> > >>
>> > >>
>> > >> On 13 septembre 2014 at 02:06:25, Milen Dyankov (
>> milendyankov@gmail.com
>> > )
>> > >> wrote:
>> > >>
>> > >> Hi,
>> > >>
>> > >> Is the usage of a @Stereotype annotated annotation from another
>> bundle
>> > >> supported? It doesn't seem to work even though the package is
>> properly
>> > >> exported and imported.
>> > >>
>> > >> The docs only say:
>> > >>
>> > >> If the stereotyped annotation is directly in the manipulated module,
>> no
>> > >> > problems: any front-end will work as expected.
>> > >> > If not, the different manipulator's front-end have variable support
>> > for
>> > >> > the stereotype feature.
>> > >>
>> > >>
>> > >> This is not very clear to me and to be honest I'm no sure what a
>> > >> "manipulator's front-end" is.
>> > >>
>> > >> Regards,
>> > >> Milen
>> > >>
>> > >>
>> > >>
>> > >> --
>> > >> http://about.me/milen
>> > >>
>> > >
>> > >
>> > >
>> > > --
>> > > http://about.me/milen
>> > >
>> >
>> >
>> >
>> > --
>> > http://about.me/milen
>> >
>>
>>
>>
>> --
>> http://about.me/milen
>>
>
>
>
> --
> http://about.me/milen
>



-- 
http://about.me/milen

Re: iPojo @Stereotype annotated annotation from separate bundle

Posted by Milen Dyankov <mi...@gmail.com>.
I can but most likely not before next week.

Thanks

On Mon, Sep 29, 2014 at 1:00 AM, Guillaume Sauthier (OW2) <
guillaume.ow2@gmail.com> wrote:

> Hi Milen
>
> Can you share a minimal project to help us reproduce the issue ?
> If you could zip it and attach it to a new JIRA, that would be great.
>
> Thanks
>
> --
> Guillaume Sauthier (OW2)
> Sent with Airmail
>
> On 22 Sep 2014 at 08:27:12, Clement Escoffier (clement.escoffier@gmail.com)
> wrote:
>
> Hi,
>
> Sorry for the late reply (should never change my email program).
>
> So, it should not be the case. As soon as the stereotype is available in
> the manipulator class path, it should be used. Obviously, if it’s in the
> bundle, it’s necessarily in the class path. Could you open an issue, it’s
> probably a bug.
>
> Cheers,
>
> Clement
> On 16 septembre 2014 at 10:57:46, Milen Dyankov (milendyankov@gmail.com)
> wrote:
>
> OK, my bad, I asked the question poorly.
> It of course works with private-package as well (I just used the export in
> my simple test).
> What I intended to ask was, why the stereotype class needs to be included
> in the bundle using it? In another words - isn't it enough that the bundle
> imports the package and the jar is on maven's classpath?
>
> On Mon, Sep 15, 2014 at 3:26 PM, Clement Escoffier <
> clement.escoffier@gmail.com> wrote:
>
> > Hi,
> >
> > Could you check that the stereotype class is actually included in the jar
> > file when not exported ? Maybe the ‘private-package’ instruction contains
> > the error.
> >
> > Cheers,
> >
> > Clement
> >
> > On 15 septembre 2014 at 15:05:17, Milen Dyankov (milendyankov@gmail.com)
> > wrote:
> >
> > OK, found the problem. It's due to how <Export-Package> of
> > the maven-bundle-plugin is configured.
> >
> > Here is an example:
> > - I have stereotype maven project where I define a @Stereotype as
> > *test.ipojo.stereotype*.MyComponent
> > - The bundle maven project where I try to use the stereotype has its
> > classes in the package *test.ipojo.bundle*
> >
> > When I have this in the bundle maven project :
> >
> >
> >
> <Export-Package>test.ipojo.bundle*;version=${project.version}</Export-Package>
> >
> > it does not work! What I see in the console is:
> >
> > [WARNING] Class test.ipojo.bundle.ComponentByStereotype has not been
> marked
> > as a component type (no @Component, @Handler, ...). It will be ignored by
> > the iPOJO manipulator.
> >
> > However changing this to:
> >
> > <Export-Package>*test.ipojo.stereotype**
> > ,test.ipojo.bundle*;version=${project.version}</Export-Package>
> >
> > works just fine.
> >
> > While I now know how to make it work, I'm still confused why do I need to
> > export the stereotype package?
> >
> >
> >
> > On Mon, Sep 15, 2014 at 11:24 AM, Milen Dyankov <mi...@gmail.com>
> > wrote:
> >
> > > Thanks for explaining how it works Clement!
> > > I am indeed using maven and I tried to add the jar as a maven-ipojo-
> > > plugin dependency but it still does not seem to work.
> > > I'll play a bit with it and if it still does not work I'll try to
> extract
> > > and provide a simple example so you can eventually tell me what I'm
> doing
> > > wrong.
> > >
> > > Best,
> > > Milen
> > >
> > >
> > > On Sat, Sep 13, 2014 at 9:01 AM, Clement Escoffier <
> > > clement.escoffier@gmail.com> wrote:
> > >
> > >> Hi,
> > >>
> > >> Stereotypes are analyzed at build time, not at runtime. So they are
> > >> packaged in regular jars. To work as expected, the stereotype need to
> be
> > >> available from the ‘manipulator’ engine, in other words: be in the
> same
> > >> class path.
> > >>
> > >> So, if you are using Maven, you can do as follows:
> > >>
> > >> <plugin>
> > >> <groupId>org.apache.felix</groupId>
> > >> <artifactId>maven-ipojo-plugin</artifactId>
> > >> <executions>
> > >> <execution>
> > >> <goals>
> > >> <goal>ipojo-bundle</goal>
> > >> </goals>
> > >> </execution>
> > >> </executions>
> > >> <dependencies>
> > >> <dependency>
> > >> <groupId>your.groupId</groupId>
> > >> <artifactId>your.sterotype.artifactId</artifactId>
> > >> <version>your.version</version>
> > >> </dependency>
> > >> </dependencies>
> > >> </plugin>
> > >>
> > >> Cheers,
> > >>
> > >> Clement
> > >>
> > >>
> > >>
> > >> On 13 septembre 2014 at 02:06:25, Milen Dyankov (
> milendyankov@gmail.com
> > )
> > >> wrote:
> > >>
> > >> Hi,
> > >>
> > >> Is the usage of a @Stereotype annotated annotation from another bundle
> > >> supported? It doesn't seem to work even though the package is properly
> > >> exported and imported.
> > >>
> > >> The docs only say:
> > >>
> > >> If the stereotyped annotation is directly in the manipulated module,
> no
> > >> > problems: any front-end will work as expected.
> > >> > If not, the different manipulator's front-end have variable support
> > for
> > >> > the stereotype feature.
> > >>
> > >>
> > >> This is not very clear to me and to be honest I'm no sure what a
> > >> "manipulator's front-end" is.
> > >>
> > >> Regards,
> > >> Milen
> > >>
> > >>
> > >>
> > >> --
> > >> http://about.me/milen
> > >>
> > >
> > >
> > >
> > > --
> > > http://about.me/milen
> > >
> >
> >
> >
> > --
> > http://about.me/milen
> >
>
>
>
> --
> http://about.me/milen
>



-- 
http://about.me/milen

Re: iPojo @Stereotype annotated annotation from separate bundle

Posted by "Guillaume Sauthier (OW2)" <gu...@gmail.com>.
Hi Milen

Can you share a minimal project to help us reproduce the issue ?
If you could zip it and attach it to a new JIRA, that would be great.

Thanks

-- 
Guillaume Sauthier (OW2)
Sent with Airmail

On 22 Sep 2014 at 08:27:12, Clement Escoffier (clement.escoffier@gmail.com) wrote:

Hi,   

Sorry for the late reply (should never change my email program).   

So, it should not be the case. As soon as the stereotype is available in the manipulator class path, it should be used. Obviously, if it’s in the bundle, it’s necessarily in the class path. Could you open an issue, it’s probably a bug.  

Cheers,  

Clement  
On 16 septembre 2014 at 10:57:46, Milen Dyankov (milendyankov@gmail.com) wrote:  

OK, my bad, I asked the question poorly.  
It of course works with private-package as well (I just used the export in  
my simple test).  
What I intended to ask was, why the stereotype class needs to be included  
in the bundle using it? In another words - isn't it enough that the bundle  
imports the package and the jar is on maven's classpath?  

On Mon, Sep 15, 2014 at 3:26 PM, Clement Escoffier <  
clement.escoffier@gmail.com> wrote:  

> Hi,  
>  
> Could you check that the stereotype class is actually included in the jar  
> file when not exported ? Maybe the ‘private-package’ instruction contains  
> the error.  
>  
> Cheers,  
>  
> Clement  
>  
> On 15 septembre 2014 at 15:05:17, Milen Dyankov (milendyankov@gmail.com)  
> wrote:  
>  
> OK, found the problem. It's due to how <Export-Package> of  
> the maven-bundle-plugin is configured.  
>  
> Here is an example:  
> - I have stereotype maven project where I define a @Stereotype as  
> *test.ipojo.stereotype*.MyComponent  
> - The bundle maven project where I try to use the stereotype has its  
> classes in the package *test.ipojo.bundle*  
>  
> When I have this in the bundle maven project :  
>  
>  
> <Export-Package>test.ipojo.bundle*;version=${project.version}</Export-Package>  
>  
> it does not work! What I see in the console is:  
>  
> [WARNING] Class test.ipojo.bundle.ComponentByStereotype has not been marked  
> as a component type (no @Component, @Handler, ...). It will be ignored by  
> the iPOJO manipulator.  
>  
> However changing this to:  
>  
> <Export-Package>*test.ipojo.stereotype**  
> ,test.ipojo.bundle*;version=${project.version}</Export-Package>  
>  
> works just fine.  
>  
> While I now know how to make it work, I'm still confused why do I need to  
> export the stereotype package?  
>  
>  
>  
> On Mon, Sep 15, 2014 at 11:24 AM, Milen Dyankov <mi...@gmail.com>  
> wrote:  
>  
> > Thanks for explaining how it works Clement!  
> > I am indeed using maven and I tried to add the jar as a maven-ipojo-  
> > plugin dependency but it still does not seem to work.  
> > I'll play a bit with it and if it still does not work I'll try to extract  
> > and provide a simple example so you can eventually tell me what I'm doing  
> > wrong.  
> >  
> > Best,  
> > Milen  
> >  
> >  
> > On Sat, Sep 13, 2014 at 9:01 AM, Clement Escoffier <  
> > clement.escoffier@gmail.com> wrote:  
> >  
> >> Hi,  
> >>  
> >> Stereotypes are analyzed at build time, not at runtime. So they are  
> >> packaged in regular jars. To work as expected, the stereotype need to be  
> >> available from the ‘manipulator’ engine, in other words: be in the same  
> >> class path.  
> >>  
> >> So, if you are using Maven, you can do as follows:  
> >>  
> >> <plugin>  
> >> <groupId>org.apache.felix</groupId>  
> >> <artifactId>maven-ipojo-plugin</artifactId>  
> >> <executions>  
> >> <execution>  
> >> <goals>  
> >> <goal>ipojo-bundle</goal>  
> >> </goals>  
> >> </execution>  
> >> </executions>  
> >> <dependencies>  
> >> <dependency>  
> >> <groupId>your.groupId</groupId>  
> >> <artifactId>your.sterotype.artifactId</artifactId>  
> >> <version>your.version</version>  
> >> </dependency>  
> >> </dependencies>  
> >> </plugin>  
> >>  
> >> Cheers,  
> >>  
> >> Clement  
> >>  
> >>  
> >>  
> >> On 13 septembre 2014 at 02:06:25, Milen Dyankov (milendyankov@gmail.com  
> )  
> >> wrote:  
> >>  
> >> Hi,  
> >>  
> >> Is the usage of a @Stereotype annotated annotation from another bundle  
> >> supported? It doesn't seem to work even though the package is properly  
> >> exported and imported.  
> >>  
> >> The docs only say:  
> >>  
> >> If the stereotyped annotation is directly in the manipulated module, no  
> >> > problems: any front-end will work as expected.  
> >> > If not, the different manipulator's front-end have variable support  
> for  
> >> > the stereotype feature.  
> >>  
> >>  
> >> This is not very clear to me and to be honest I'm no sure what a  
> >> "manipulator's front-end" is.  
> >>  
> >> Regards,  
> >> Milen  
> >>  
> >>  
> >>  
> >> --  
> >> http://about.me/milen  
> >>  
> >  
> >  
> >  
> > --  
> > http://about.me/milen  
> >  
>  
>  
>  
> --  
> http://about.me/milen  
>  



--  
http://about.me/milen  

Re: iPojo @Stereotype annotated annotation from separate bundle

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

Sorry for the late reply (should never change my email program). 

So, it should not be the case. As soon as the stereotype is available in the manipulator class path, it should be used. Obviously, if it’s in the bundle, it’s necessarily in the class path. Could you open an issue, it’s probably a bug.

Cheers,

Clement
On 16 septembre 2014 at 10:57:46, Milen Dyankov (milendyankov@gmail.com) wrote:

OK, my bad, I asked the question poorly.  
It of course works with private-package as well (I just used the export in  
my simple test).  
What I intended to ask was, why the stereotype class needs to be included  
in the bundle using it? In another words - isn't it enough that the bundle  
imports the package and the jar is on maven's classpath?  

On Mon, Sep 15, 2014 at 3:26 PM, Clement Escoffier <  
clement.escoffier@gmail.com> wrote:  

> Hi,  
>  
> Could you check that the stereotype class is actually included in the jar  
> file when not exported ? Maybe the ‘private-package’ instruction contains  
> the error.  
>  
> Cheers,  
>  
> Clement  
>  
> On 15 septembre 2014 at 15:05:17, Milen Dyankov (milendyankov@gmail.com)  
> wrote:  
>  
> OK, found the problem. It's due to how <Export-Package> of  
> the maven-bundle-plugin is configured.  
>  
> Here is an example:  
> - I have stereotype maven project where I define a @Stereotype as  
> *test.ipojo.stereotype*.MyComponent  
> - The bundle maven project where I try to use the stereotype has its  
> classes in the package *test.ipojo.bundle*  
>  
> When I have this in the bundle maven project :  
>  
>  
> <Export-Package>test.ipojo.bundle*;version=${project.version}</Export-Package>  
>  
> it does not work! What I see in the console is:  
>  
> [WARNING] Class test.ipojo.bundle.ComponentByStereotype has not been marked  
> as a component type (no @Component, @Handler, ...). It will be ignored by  
> the iPOJO manipulator.  
>  
> However changing this to:  
>  
> <Export-Package>*test.ipojo.stereotype**  
> ,test.ipojo.bundle*;version=${project.version}</Export-Package>  
>  
> works just fine.  
>  
> While I now know how to make it work, I'm still confused why do I need to  
> export the stereotype package?  
>  
>  
>  
> On Mon, Sep 15, 2014 at 11:24 AM, Milen Dyankov <mi...@gmail.com>  
> wrote:  
>  
> > Thanks for explaining how it works Clement!  
> > I am indeed using maven and I tried to add the jar as a maven-ipojo-  
> > plugin dependency but it still does not seem to work.  
> > I'll play a bit with it and if it still does not work I'll try to extract  
> > and provide a simple example so you can eventually tell me what I'm doing  
> > wrong.  
> >  
> > Best,  
> > Milen  
> >  
> >  
> > On Sat, Sep 13, 2014 at 9:01 AM, Clement Escoffier <  
> > clement.escoffier@gmail.com> wrote:  
> >  
> >> Hi,  
> >>  
> >> Stereotypes are analyzed at build time, not at runtime. So they are  
> >> packaged in regular jars. To work as expected, the stereotype need to be  
> >> available from the ‘manipulator’ engine, in other words: be in the same  
> >> class path.  
> >>  
> >> So, if you are using Maven, you can do as follows:  
> >>  
> >> <plugin>  
> >> <groupId>org.apache.felix</groupId>  
> >> <artifactId>maven-ipojo-plugin</artifactId>  
> >> <executions>  
> >> <execution>  
> >> <goals>  
> >> <goal>ipojo-bundle</goal>  
> >> </goals>  
> >> </execution>  
> >> </executions>  
> >> <dependencies>  
> >> <dependency>  
> >> <groupId>your.groupId</groupId>  
> >> <artifactId>your.sterotype.artifactId</artifactId>  
> >> <version>your.version</version>  
> >> </dependency>  
> >> </dependencies>  
> >> </plugin>  
> >>  
> >> Cheers,  
> >>  
> >> Clement  
> >>  
> >>  
> >>  
> >> On 13 septembre 2014 at 02:06:25, Milen Dyankov (milendyankov@gmail.com  
> )  
> >> wrote:  
> >>  
> >> Hi,  
> >>  
> >> Is the usage of a @Stereotype annotated annotation from another bundle  
> >> supported? It doesn't seem to work even though the package is properly  
> >> exported and imported.  
> >>  
> >> The docs only say:  
> >>  
> >> If the stereotyped annotation is directly in the manipulated module, no  
> >> > problems: any front-end will work as expected.  
> >> > If not, the different manipulator's front-end have variable support  
> for  
> >> > the stereotype feature.  
> >>  
> >>  
> >> This is not very clear to me and to be honest I'm no sure what a  
> >> "manipulator's front-end" is.  
> >>  
> >> Regards,  
> >> Milen  
> >>  
> >>  
> >>  
> >> --  
> >> http://about.me/milen  
> >>  
> >  
> >  
> >  
> > --  
> > http://about.me/milen  
> >  
>  
>  
>  
> --  
> http://about.me/milen  
>  



--  
http://about.me/milen  

Re: iPojo @Stereotype annotated annotation from separate bundle

Posted by Milen Dyankov <mi...@gmail.com>.
OK, my bad, I asked the question poorly.
It of course works with private-package as well (I just used the export in
my simple test).
What I intended to ask was, why the stereotype class needs to be included
in the bundle using it? In another words - isn't it enough that the bundle
imports the package and the jar is on maven's classpath?

On Mon, Sep 15, 2014 at 3:26 PM, Clement Escoffier <
clement.escoffier@gmail.com> wrote:

> Hi,
>
> Could you check that the stereotype class is actually included in the jar
> file when not exported ? Maybe the ‘private-package’ instruction contains
> the error.
>
> Cheers,
>
> Clement
>
> On 15 septembre 2014 at 15:05:17, Milen Dyankov (milendyankov@gmail.com)
> wrote:
>
> OK, found the problem. It's due to how <Export-Package> of
> the maven-bundle-plugin is configured.
>
> Here is an example:
> - I have stereotype maven project where I define a @Stereotype as
> *test.ipojo.stereotype*.MyComponent
> - The bundle maven project where I try to use the stereotype has its
> classes in the package *test.ipojo.bundle*
>
> When I have this in the bundle maven project :
>
>
> <Export-Package>test.ipojo.bundle*;version=${project.version}</Export-Package>
>
> it does not work! What I see in the console is:
>
> [WARNING] Class test.ipojo.bundle.ComponentByStereotype has not been marked
> as a component type (no @Component, @Handler, ...). It will be ignored by
> the iPOJO manipulator.
>
> However changing this to:
>
> <Export-Package>*test.ipojo.stereotype**
> ,test.ipojo.bundle*;version=${project.version}</Export-Package>
>
> works just fine.
>
> While I now know how to make it work, I'm still confused why do I need to
> export the stereotype package?
>
>
>
> On Mon, Sep 15, 2014 at 11:24 AM, Milen Dyankov <mi...@gmail.com>
> wrote:
>
> > Thanks for explaining how it works Clement!
> > I am indeed using maven and I tried to add the jar as a maven-ipojo-
> > plugin dependency but it still does not seem to work.
> > I'll play a bit with it and if it still does not work I'll try to extract
> > and provide a simple example so you can eventually tell me what I'm doing
> > wrong.
> >
> > Best,
> > Milen
> >
> >
> > On Sat, Sep 13, 2014 at 9:01 AM, Clement Escoffier <
> > clement.escoffier@gmail.com> wrote:
> >
> >> Hi,
> >>
> >> Stereotypes are analyzed at build time, not at runtime. So they are
> >> packaged in regular jars. To work as expected, the stereotype need to be
> >> available from the ‘manipulator’ engine, in other words: be in the same
> >> class path.
> >>
> >> So, if you are using Maven, you can do as follows:
> >>
> >> <plugin>
> >> <groupId>org.apache.felix</groupId>
> >> <artifactId>maven-ipojo-plugin</artifactId>
> >> <executions>
> >> <execution>
> >> <goals>
> >> <goal>ipojo-bundle</goal>
> >> </goals>
> >> </execution>
> >> </executions>
> >> <dependencies>
> >> <dependency>
> >> <groupId>your.groupId</groupId>
> >> <artifactId>your.sterotype.artifactId</artifactId>
> >> <version>your.version</version>
> >> </dependency>
> >> </dependencies>
> >> </plugin>
> >>
> >> Cheers,
> >>
> >> Clement
> >>
> >>
> >>
> >> On 13 septembre 2014 at 02:06:25, Milen Dyankov (milendyankov@gmail.com
> )
> >> wrote:
> >>
> >> Hi,
> >>
> >> Is the usage of a @Stereotype annotated annotation from another bundle
> >> supported? It doesn't seem to work even though the package is properly
> >> exported and imported.
> >>
> >> The docs only say:
> >>
> >> If the stereotyped annotation is directly in the manipulated module, no
> >> > problems: any front-end will work as expected.
> >> > If not, the different manipulator's front-end have variable support
> for
> >> > the stereotype feature.
> >>
> >>
> >> This is not very clear to me and to be honest I'm no sure what a
> >> "manipulator's front-end" is.
> >>
> >> Regards,
> >> Milen
> >>
> >>
> >>
> >> --
> >> http://about.me/milen
> >>
> >
> >
> >
> > --
> > http://about.me/milen
> >
>
>
>
> --
> http://about.me/milen
>



-- 
http://about.me/milen

Deploying maven central jars to OBR

Posted by Bulu <bu...@romandie.com>.
Hi

I have my jars in my local maven repo, they typically come from central.
I develop my own bundles and deploy to my remote OBR using 
maven-bundle-plugin: the bundles are uploaded and the repository.xml is 
updated. Good.

Now I want also to push the needed dependency jars coming from central 
to the OBR. (my OBR is really just a web space, no nexus or so).

For this I can update the remote repository.xml using the 
maven-bundle-plugin directly, for example:
mvn org.apache.felix:maven-bundle-plugin:2.4.0:deploy-file ^
-DrepositoryId=my-repository-id ^
-Durl=scp://path/to/my/obr ^
-DpomFile=C:\Users\myuser\.m2\repository\com\vaadin\vaadin-shared\7.1.14\vaadin-shared-7.1.14.pom

This updates the repository.xml, but does not upload the jar.

To also upload the jar, I tried:
mvn deploy:deploy-file ^
-DrepositoryId=my-repository-id ^
-Durl=scp://path/to/my/obr ^
-DpomFile=C:\Users\myuser\.m2\repository\com\vaadin\vaadin-shared\7.1.14\vaadin-shared-7.1.14.pom 
^
-Dfile=C:\Users\myuser\.m2\repository\com\vaadin\vaadin-shared\7.1.14\vaadin-shared-7.1.14.jar

But this fails with
Error: (...) Cannot deploy artifact from the local repository

How should I push jars from my local maven repo (or directly from 
central) to my OBR?

Thanks & regards
   Philipp


As a side note: when installing the bundles from an OBR in gogo, the 
whole process mentions no error, although the installation failed...

g! deploy "com.vaadin.themes"
Target resource(s):
-------------------
    vaadin-themes (7.1.14)

Deploying...
done.

(here really no "com.vaadin.themes" was installed, as the download from 
OBR failed)


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


Re: iPojo @Stereotype annotated annotation from separate bundle

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

Could you check that the stereotype class is actually included in the jar file when not exported ? Maybe the ‘private-package’ instruction contains the error.

Cheers,

Clement

On 15 septembre 2014 at 15:05:17, Milen Dyankov (milendyankov@gmail.com) wrote:

OK, found the problem. It's due to how <Export-Package> of  
the maven-bundle-plugin is configured.  

Here is an example:  
- I have stereotype maven project where I define a @Stereotype as  
*test.ipojo.stereotype*.MyComponent  
- The bundle maven project where I try to use the stereotype has its  
classes in the package *test.ipojo.bundle*  

When I have this in the bundle maven project :  

<Export-Package>test.ipojo.bundle*;version=${project.version}</Export-Package>  

it does not work! What I see in the console is:  

[WARNING] Class test.ipojo.bundle.ComponentByStereotype has not been marked  
as a component type (no @Component, @Handler, ...). It will be ignored by  
the iPOJO manipulator.  

However changing this to:  

<Export-Package>*test.ipojo.stereotype**  
,test.ipojo.bundle*;version=${project.version}</Export-Package>  

works just fine.  

While I now know how to make it work, I'm still confused why do I need to  
export the stereotype package?  



On Mon, Sep 15, 2014 at 11:24 AM, Milen Dyankov <mi...@gmail.com>  
wrote:  

> Thanks for explaining how it works Clement!  
> I am indeed using maven and I tried to add the jar as a maven-ipojo-  
> plugin dependency but it still does not seem to work.  
> I'll play a bit with it and if it still does not work I'll try to extract  
> and provide a simple example so you can eventually tell me what I'm doing  
> wrong.  
>  
> Best,  
> Milen  
>  
>  
> On Sat, Sep 13, 2014 at 9:01 AM, Clement Escoffier <  
> clement.escoffier@gmail.com> wrote:  
>  
>> Hi,  
>>  
>> Stereotypes are analyzed at build time, not at runtime. So they are  
>> packaged in regular jars. To work as expected, the stereotype need to be  
>> available from the ‘manipulator’ engine, in other words: be in the same  
>> class path.  
>>  
>> So, if you are using Maven, you can do as follows:  
>>  
>> <plugin>  
>> <groupId>org.apache.felix</groupId>  
>> <artifactId>maven-ipojo-plugin</artifactId>  
>> <executions>  
>> <execution>  
>> <goals>  
>> <goal>ipojo-bundle</goal>  
>> </goals>  
>> </execution>  
>> </executions>  
>> <dependencies>  
>> <dependency>  
>> <groupId>your.groupId</groupId>  
>> <artifactId>your.sterotype.artifactId</artifactId>  
>> <version>your.version</version>  
>> </dependency>  
>> </dependencies>  
>> </plugin>  
>>  
>> Cheers,  
>>  
>> Clement  
>>  
>>  
>>  
>> On 13 septembre 2014 at 02:06:25, Milen Dyankov (milendyankov@gmail.com)  
>> wrote:  
>>  
>> Hi,  
>>  
>> Is the usage of a @Stereotype annotated annotation from another bundle  
>> supported? It doesn't seem to work even though the package is properly  
>> exported and imported.  
>>  
>> The docs only say:  
>>  
>> If the stereotyped annotation is directly in the manipulated module, no  
>> > problems: any front-end will work as expected.  
>> > If not, the different manipulator's front-end have variable support for  
>> > the stereotype feature.  
>>  
>>  
>> This is not very clear to me and to be honest I'm no sure what a  
>> "manipulator's front-end" is.  
>>  
>> Regards,  
>> Milen  
>>  
>>  
>>  
>> --  
>> http://about.me/milen  
>>  
>  
>  
>  
> --  
> http://about.me/milen  
>  



--  
http://about.me/milen  

Re: iPojo @Stereotype annotated annotation from separate bundle

Posted by Milen Dyankov <mi...@gmail.com>.
OK,  found the problem. It's due to how <Export-Package> of
the maven-bundle-plugin is configured.

Here is an example:
- I have stereotype maven project where I define a @Stereotype as
*test.ipojo.stereotype*.MyComponent
- The bundle maven project where I try to use the stereotype has its
classes in the package *test.ipojo.bundle*

When I have this in the bundle maven project :

<Export-Package>test.ipojo.bundle*;version=${project.version}</Export-Package>

it does not work! What I see in the console is:

[WARNING] Class test.ipojo.bundle.ComponentByStereotype has not been marked
as a component type (no @Component, @Handler, ...). It will be ignored by
the iPOJO manipulator.

However changing this to:

<Export-Package>*test.ipojo.stereotype**
,test.ipojo.bundle*;version=${project.version}</Export-Package>

works just fine.

While I now know how to make it work, I'm still confused why do I need to
export the stereotype package?



On Mon, Sep 15, 2014 at 11:24 AM, Milen Dyankov <mi...@gmail.com>
wrote:

> Thanks for explaining how it works Clement!
> I am indeed using maven and I tried to add the jar as a maven-ipojo-
> plugin dependency but it still does not seem to work.
> I'll play a bit with it and if it still does not work I'll try to extract
> and provide a simple example so you can eventually tell me what I'm doing
> wrong.
>
> Best,
> Milen
>
>
> On Sat, Sep 13, 2014 at 9:01 AM, Clement Escoffier <
> clement.escoffier@gmail.com> wrote:
>
>> Hi,
>>
>> Stereotypes are analyzed at build time, not at runtime. So they are
>> packaged in regular jars. To work as expected, the stereotype need to be
>> available from the ‘manipulator’ engine, in other words: be in the same
>> class path.
>>
>> So, if you are using Maven, you can do as follows:
>>
>> <plugin>
>>     <groupId>org.apache.felix</groupId>
>>     <artifactId>maven-ipojo-plugin</artifactId>
>>     <executions>
>>         <execution>
>>             <goals>
>>                 <goal>ipojo-bundle</goal>
>>             </goals>
>>         </execution>
>>     </executions>
>>     <dependencies>
>>         <dependency>
>>             <groupId>your.groupId</groupId>
>>             <artifactId>your.sterotype.artifactId</artifactId>
>>             <version>your.version</version>
>>         </dependency>
>>     </dependencies>
>> </plugin>
>>
>> Cheers,
>>
>> Clement
>>
>>
>>
>> On 13 septembre 2014 at 02:06:25, Milen Dyankov (milendyankov@gmail.com)
>> wrote:
>>
>> Hi,
>>
>> Is the usage of a @Stereotype annotated annotation from another bundle
>> supported? It doesn't seem to work even though the package is properly
>> exported and imported.
>>
>> The docs only say:
>>
>> If the stereotyped annotation is directly in the manipulated module, no
>> > problems: any front-end will work as expected.
>> > If not, the different manipulator's front-end have variable support for
>> > the stereotype feature.
>>
>>
>> This is not very clear to me and to be honest I'm no sure what a
>> "manipulator's front-end" is.
>>
>> Regards,
>> Milen
>>
>>
>>
>> --
>> http://about.me/milen
>>
>
>
>
> --
> http://about.me/milen
>



-- 
http://about.me/milen

Re: iPojo @Stereotype annotated annotation from separate bundle

Posted by Milen Dyankov <mi...@gmail.com>.
Thanks for explaining how it works Clement!
I am indeed using maven and I tried to add the jar as a
maven-ipojo-plugin dependency
but it still does not seem to work.
I'll play a bit with it and if it still does not work I'll try to extract
and provide a simple example so you can eventually tell me what I'm doing
wrong.

Best,
Milen


On Sat, Sep 13, 2014 at 9:01 AM, Clement Escoffier <
clement.escoffier@gmail.com> wrote:

> Hi,
>
> Stereotypes are analyzed at build time, not at runtime. So they are
> packaged in regular jars. To work as expected, the stereotype need to be
> available from the ‘manipulator’ engine, in other words: be in the same
> class path.
>
> So, if you are using Maven, you can do as follows:
>
> <plugin>
>     <groupId>org.apache.felix</groupId>
>     <artifactId>maven-ipojo-plugin</artifactId>
>     <executions>
>         <execution>
>             <goals>
>                 <goal>ipojo-bundle</goal>
>             </goals>
>         </execution>
>     </executions>
>     <dependencies>
>         <dependency>
>             <groupId>your.groupId</groupId>
>             <artifactId>your.sterotype.artifactId</artifactId>
>             <version>your.version</version>
>         </dependency>
>     </dependencies>
> </plugin>
>
> Cheers,
>
> Clement
>
>
>
> On 13 septembre 2014 at 02:06:25, Milen Dyankov (milendyankov@gmail.com)
> wrote:
>
> Hi,
>
> Is the usage of a @Stereotype annotated annotation from another bundle
> supported? It doesn't seem to work even though the package is properly
> exported and imported.
>
> The docs only say:
>
> If the stereotyped annotation is directly in the manipulated module, no
> > problems: any front-end will work as expected.
> > If not, the different manipulator's front-end have variable support for
> > the stereotype feature.
>
>
> This is not very clear to me and to be honest I'm no sure what a
> "manipulator's front-end" is.
>
> Regards,
> Milen
>
>
>
> --
> http://about.me/milen
>



-- 
http://about.me/milen

Re: iPojo @Stereotype annotated annotation from separate bundle

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

Stereotypes are analyzed at build time, not at runtime. So they are packaged in regular jars. To work as expected, the stereotype need to be available from the ‘manipulator’ engine, in other words: be in the same class path.

So, if you are using Maven, you can do as follows:

<plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>maven-ipojo-plugin</artifactId>
    <executions>
        <execution>
            <goals>
                <goal>ipojo-bundle</goal>
            </goals>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>your.groupId</groupId>
            <artifactId>your.sterotype.artifactId</artifactId>
            <version>your.version</version>
        </dependency>
    </dependencies>
</plugin>

Cheers,

Clement



On 13 septembre 2014 at 02:06:25, Milen Dyankov (milendyankov@gmail.com) wrote:

Hi,  

Is the usage of a @Stereotype annotated annotation from another bundle  
supported? It doesn't seem to work even though the package is properly  
exported and imported.  

The docs only say:  

If the stereotyped annotation is directly in the manipulated module, no  
> problems: any front-end will work as expected.  
> If not, the different manipulator's front-end have variable support for  
> the stereotype feature.  


This is not very clear to me and to be honest I'm no sure what a  
"manipulator's front-end" is.  

Regards,  
Milen  



--  
http://about.me/milen