[ 
https://issues.apache.org/jira/browse/FELIX-3699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471497#comment-13471497
 ] 

Issac Garcia commented on FELIX-3699:
-------------------------------------

It should work to start using this functionality, 

I was thinking if it is possible to annotate our annotations to specify that 
they are ipojo components, for example:

@ipojonize
public @interface MyComponent {...}

And while manipulating, see if the custom annotation is described to manipulate 
the class.

Another option could be using default values to see if it is a custom component 
or not, for example: 

public @interface MyComponent {
  Boolean ipojonize() default true;
  ...
}

If not, your solutions could work anyway
Even if we want to minimize the configuration for the developer as much as 
possible.
In that case, we'll check what is the best approach:
to have a predefined parent pom with the componentAnnotation configured, 
or see if the maven-inherit-plugin allows us to extend the iPOJO plugin to 
configure it and hide this configuration for the developers of our custom 
components.


What do you think?


                
> Allow annotations to handle custom component definitions.
> ---------------------------------------------------------
>
>                 Key: FELIX-3699
>                 URL: https://issues.apache.org/jira/browse/FELIX-3699
>             Project: Felix
>          Issue Type: New Feature
>          Components: iPOJO
>            Reporter: Issac Garcia
>
> Custom components are well handled in iPOJO using the metadata.xml, for 
> example:
> <CustomComponent classname="MyClass" name="myCustomComponent">
>     <requires field="service"/>
> </CustomComponent>
> The custom component definition will, for example, add handlers and so on. It 
> works very well and is nice that iPOJO allows that kind of extensions. 
> But we can't declare a custom component by using annotations, for example 
> doing:
> @CustomComponent
> public class MyClass {...}
> It will be a nice if iPOJO allows to do it using annotations, since the same 
> functionality must be possible with the metadata.mxl and with annotations.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to