You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2013/01/23 15:38:13 UTC

[jira] [Resolved] (FELIX-3815) Maven SCR Plugin does not correctly set specVersion to 1.1 if bind method with two parameters are used (OSGi Comp 4.2 $112.3.1)

     [ https://issues.apache.org/jira/browse/FELIX-3815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler resolved FELIX-3815.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: scr generator 1.3.2
                   scr ant task 1.3.2
                   maven-scr-plugin-1.9.2

I rewrote the spec version handling, it now also checks the method signature to detect the correct version
                
> Maven SCR Plugin does not correctly set specVersion to 1.1 if bind method with two parameters are used (OSGi Comp 4.2 $112.3.1)
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-3815
>                 URL: https://issues.apache.org/jira/browse/FELIX-3815
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.9.0, scr ant task 1.3.0, scr generator 1.3.0
>            Reporter: Konrad Windszus
>            Assignee: Carsten Ziegeler
>             Fix For: maven-scr-plugin-1.9.2, scr ant task 1.3.2, scr generator 1.3.2
>
>
> The following code leads to an error in Eclipse
> @Component()
> public class DummyService {
>     @Reference(referenceInterface = ResourceResolverFactory.class, cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE, policy = ReferencePolicy.DYNAMIC)
>     List<ResourceResolverFactory> factories;
>     protected void bindFactories(final ResourceResolverFactory factory, final Map properties) {
>     }
>     protected void unbindFactories(final ResourceResolverFactory factory) {
>     }
> }
> The following error will appear in Eclipse:
> @Reference : Missing method bind for reference factories (org.apache.felix:maven-scr-plugin:1.9.0:scr:generate-scr-descriptor:process-classes)
> Only if specVersion=1.1 is explicitly set the error vanishes.
> If built with Maven, the error will not appear and the maven-scr-plugin will automatically create the XML with the right specVersion 1.1
> Seems that the version detection mechanism differs in regular Maven build and built triggered from m2e.

--
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