Hi,
On 08.04.2010, at 14:13, Nicolas Delsaux wrote:
> On Wed, Apr 7, 2010 at 5:15 PM, Clement Escoffier
> <clement.escoffier@gmail.com> wrote:
>>
>> Hi,
>>
>>
>> So for the metadata.xml, no it's absolutely not required to have one. But in the
1.4.0, the metadata.xml allows to declare instances. (in the 1.5.0-SNAPSHOT, there is a new
annotation for that).
>
> There is something weird. Since my project is a maven one, I use the
> following dependency declaration :
>
> <dependency>
> <groupId>org.apache.felix</groupId>
> <artifactId>org.apache.felix.ipojo.annotations</artifactId>
> <version>1.2.0</version>
> </dependency>
>
> I think I'm really far from bleeding edge ;-)
> Anyway, I've already seen the metada.xml is mandatory to create
> instances. Do you have a publicly visible repository with iPOJO
> 1.5.0-SNAPSHOT for me to test annotation based instance creation ?
It is deployed on the Apache Snapshot Repository (https://repository.apache.org/content/groups/snapshots/org/apache/felix/org.apache.felix.ipojo.annotations/1.5.0-SNAPSHOT/)
This annotations is processed by the maven-ipojo-plugin 1.5.0-SNAPSHOT too.
The good news is ... the iPOJO 1.6.0 release is pretty close now :-)
Clement
>>
>> The validate method will be call if you have declared an instance of your component.
iPOJO interprets @Component as a component type declaration, so you have to declare instances.
To declare instances, you can use the configu admin or the metadata.xml. In this latter case,
just create a simple metadata.xml containing
>> <ipojo>
>> <instance component="....HelloClient"/>
>> </ipojo>
>>
>> But as far as I see, the maven-ipojo-plugin was not called on your bundle. So add
to your pom file the following excerpt:
>> <plugin>
>> <groupId>org.apache.felix</groupId>
>> <artifactId>maven-ipojo-plugin</artifactId>
>> <version>1.4.2</version>
>> <executions>
>> <execution>
>> <goals>
>> <goal>ipojo-bundle</goal>
>> </goals>
>> </execution>
>> </executions>
>> </plugin>
>>
> Well, it's defined in the superpom.
>>
>> Then, the resulting manifest should contains a specific header with a weird content.
If so, your bundle was correctly manipulated, and your bundle will be managed by iPOJO.
>>
>> Regards,
>>
> Thanks for the advices.
>
> --
> Nicolas Delsaux
>
> ---------------------------------------------------------------------
> 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
|