Hi,

I forget that I created those files :-). The maven plugin was renamed in 
'maven-ipojo-plugin' to follow the Maven name.

Here is an updated version:
http://people.apache.org/~clement/ipojo/tutorials/annotations/annotation-tutorial.zip

It contains the examples and a preconfigured version of Felix. To compile them, 
just run the 'mvn clean package' command from the root of the folder where you 
unzip the archive. Then go in the Felix folder, and start it (java -jar 
bin/felix.jar). You can copy and paste command to run the example from the 
script.txt file (in the felix folder).

Clement

PS: I just updated the wiki page, just waiting for the next synchronization.

-----Original Message-----
From: Miroslav Nachev [mailto:[EMAIL PROTECTED] 
Sent: jeudi 16 octobre 2008 15:29
To: [email protected]
Subject: Re: Dependency Injection with annotations

Hi,

Today I try to compile the examples on the web and I have the following 
error:
[ERROR]BUILD ERROR
------------------------------------------------------------------------
The plugin 'org.apache.felix:org.apache.felix.ipojo.plugin' does not 
exist or no valid version could be found

Probably the repository or/and the artifactId are changed?


Regards,
Miro.

http://felix.apache.org/site/how-to-use-ipojo-annotations.data/hello.impl.annotated-0.0.1-src.zip
http://felix.apache.org/site/how-to-use-ipojo-annotations.data/hello.client.annotation-0.0.1-src.zip


clement escoffier wrote:
> Hi,
>
> iPOJO provides such annotations as:
> @Component
> @Provides // Provides a service
> public class Foo implements Service {
>     @Requires // Service dependency
>     private HelloService hello;
>
>
>     ...
> }
>
> You can find further info at
> http://felix.apache.org/site/how-to-use-ipojo-annotations.html
>
> About parameters, the iPOJO's way is to inject instance property. Those
> fields will be set before the execution of your constructor (between the
> super constructor invocation and the constructor code), and your constructor
> can use those fields, such as in:
>
> @Component
> @Provides // Provides a service
> public class Foo implements Service {
>
>     @Property
>     private String myString;
>
>     @Requires // Service dependency
>     private HelloService hello;
>
>     public Foo() {
>       // Can use myString here as well as hello
>     }
>     ...
> }
>
> Regards,
>
> Clement
>
>
> 2008/10/14 Miroslav Nachev <[EMAIL PROTECTED]>
>
>   
>> Hi,
>>
>> I would like to ask you about some way in Felix to export services in more
>> easy way only with annotation like in EJB3.x: @Stateful, @Stateless,
>> @Remote, @Local, @EJB, etc.
>> In my opinion the best way this to be done is inside of the OSGi framework.
>> Then all resources (services) can be exported to the framework just with
>> annotation. The same for needed services. What about if before to get some
>> service we have to pass some parameters to the constructor?
>>
>>
>> Regards,
>> Miro.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>     
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to