You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Daniel Kuffner (JIRA)" <ji...@apache.org> on 2012/05/22 09:28:41 UTC

[jira] [Created] (FELIX-3519) [SCR ANT] A activator method without parameters issue a warning and failes the build

Daniel Kuffner created FELIX-3519:
-------------------------------------

             Summary: [SCR ANT] A activator method without parameters issue a warning and failes the build
                 Key: FELIX-3519
                 URL: https://issues.apache.org/jira/browse/FELIX-3519
             Project: Felix
          Issue Type: Bug
          Components: SCR Annotations
    Affects Versions: scr generator 1.1.4
            Reporter: Daniel Kuffner



The ANT SCR task will produce a warning in case the Component has paramterless activate method like:

public void activate() { ... }

This problem can be fixed by adding a @Activate annnotation to the method.

However it seems to be a bug that 
1. the problem will issue only a warning but breaks the build
2. I thought "activate()" is a valid signature.

I propose either to issue the problem as an error (to make obviouse what actually broke the build) or to let this warning not break the build.


Here is my Task execution:
 <scr srcdir="src/main/java" destdir="target/java" classpathref="scr-classpath"
           parseJavadoc="false" strictMode="false"
generateAccessors="false" specVersion="1.1"/>




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3519) [SCR ANT] A activator method without parameters issue a warning and failes the build

Posted by "Daniel Kuffner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281481#comment-13281481 ] 

Daniel Kuffner commented on FELIX-3519:
---------------------------------------

Yes it works if I put the specVersion on the Component. 
I have retested it and I figured out that I have posted the wrong parameters in the bug description.
It will not fail if I specify the specVersion 1.1 on the ant task. Sorry for the confusion.

Can we issue the problem as an error instead of a warning for future releases? 

                
> [SCR ANT] A activator method without parameters issue a warning and failes the build
> ------------------------------------------------------------------------------------
>
>                 Key: FELIX-3519
>                 URL: https://issues.apache.org/jira/browse/FELIX-3519
>             Project: Felix
>          Issue Type: Bug
>          Components: SCR Annotations
>    Affects Versions: scr generator 1.1.4
>            Reporter: Daniel Kuffner
>              Labels: annotation, generate, scr, task
>
> The ANT SCR task will produce a warning in case the Component has paramterless activate method like:
> public void activate() { ... }
> This problem can be fixed by adding a @Activate annnotation to the method.
> However it seems to be a bug that 
> 1. the problem will issue only a warning but breaks the build
> 2. I thought "activate()" is a valid signature.
> I propose either to issue the problem as an error (to make obviouse what actually broke the build) or to let this warning not break the build.
> Here is my Task execution:
>  <scr srcdir="src/main/java" destdir="target/java" classpathref="scr-classpath"
>            parseJavadoc="false" strictMode="false"
> generateAccessors="false" specVersion="1.1"/>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (FELIX-3519) [SCR ANT] A activator method without parameters issue a warning and failes the build

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler closed FELIX-3519.
-----------------------------------

    Resolution: Cannot Reproduce
    
> [SCR ANT] A activator method without parameters issue a warning and failes the build
> ------------------------------------------------------------------------------------
>
>                 Key: FELIX-3519
>                 URL: https://issues.apache.org/jira/browse/FELIX-3519
>             Project: Felix
>          Issue Type: Bug
>          Components: SCR Annotations
>    Affects Versions: scr generator 1.1.4
>            Reporter: Daniel Kuffner
>              Labels: annotation, generate, scr, task
>
> The ANT SCR task will produce a warning in case the Component has paramterless activate method like:
> public void activate() { ... }
> This problem can be fixed by adding a @Activate annnotation to the method.
> However it seems to be a bug that 
> 1. the problem will issue only a warning but breaks the build
> 2. I thought "activate()" is a valid signature.
> I propose either to issue the problem as an error (to make obviouse what actually broke the build) or to let this warning not break the build.
> Here is my Task execution:
>  <scr srcdir="src/main/java" destdir="target/java" classpathref="scr-classpath"
>            parseJavadoc="false" strictMode="false"
> generateAccessors="false" specVersion="1.1"/>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3519) [SCR ANT] A activator method without parameters issue a warning and failes the build

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281557#comment-13281557 ] 

Carsten Ziegeler commented on FELIX-3519:
-----------------------------------------

The build should only fail if you have set strictMode to true - in that case all warnings are considered as errors

                
> [SCR ANT] A activator method without parameters issue a warning and failes the build
> ------------------------------------------------------------------------------------
>
>                 Key: FELIX-3519
>                 URL: https://issues.apache.org/jira/browse/FELIX-3519
>             Project: Felix
>          Issue Type: Bug
>          Components: SCR Annotations
>    Affects Versions: scr generator 1.1.4
>            Reporter: Daniel Kuffner
>              Labels: annotation, generate, scr, task
>
> The ANT SCR task will produce a warning in case the Component has paramterless activate method like:
> public void activate() { ... }
> This problem can be fixed by adding a @Activate annnotation to the method.
> However it seems to be a bug that 
> 1. the problem will issue only a warning but breaks the build
> 2. I thought "activate()" is a valid signature.
> I propose either to issue the problem as an error (to make obviouse what actually broke the build) or to let this warning not break the build.
> Here is my Task execution:
>  <scr srcdir="src/main/java" destdir="target/java" classpathref="scr-classpath"
>            parseJavadoc="false" strictMode="false"
> generateAccessors="false" specVersion="1.1"/>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3519) [SCR ANT] A activator method without parameters issue a warning and failes the build

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281521#comment-13281521 ] 

Carsten Ziegeler commented on FELIX-3519:
-----------------------------------------

Ah ok, thanks for the update!

Actually its a warning by intention to be compatible. Imagine you're writing a component for 1.0 of the spec but for some reason have an activate() method which is not intended to be called by SCR (and won't be called because of the 1.0 compliance). In this case, an error would break the build and you would have no chance to get the build running other than renaming this method - which might not be possible for some reason.
                
> [SCR ANT] A activator method without parameters issue a warning and failes the build
> ------------------------------------------------------------------------------------
>
>                 Key: FELIX-3519
>                 URL: https://issues.apache.org/jira/browse/FELIX-3519
>             Project: Felix
>          Issue Type: Bug
>          Components: SCR Annotations
>    Affects Versions: scr generator 1.1.4
>            Reporter: Daniel Kuffner
>              Labels: annotation, generate, scr, task
>
> The ANT SCR task will produce a warning in case the Component has paramterless activate method like:
> public void activate() { ... }
> This problem can be fixed by adding a @Activate annnotation to the method.
> However it seems to be a bug that 
> 1. the problem will issue only a warning but breaks the build
> 2. I thought "activate()" is a valid signature.
> I propose either to issue the problem as an error (to make obviouse what actually broke the build) or to let this warning not break the build.
> Here is my Task execution:
>  <scr srcdir="src/main/java" destdir="target/java" classpathref="scr-classpath"
>            parseJavadoc="false" strictMode="false"
> generateAccessors="false" specVersion="1.1"/>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3519) [SCR ANT] A activator method without parameters issue a warning and failes the build

Posted by "Daniel Kuffner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281604#comment-13281604 ] 

Daniel Kuffner commented on FELIX-3519:
---------------------------------------

I have to make soem more tests later or tomorrow. I have still the feeling that there is some inconsistence. :)
thanks for your help.

                
> [SCR ANT] A activator method without parameters issue a warning and failes the build
> ------------------------------------------------------------------------------------
>
>                 Key: FELIX-3519
>                 URL: https://issues.apache.org/jira/browse/FELIX-3519
>             Project: Felix
>          Issue Type: Bug
>          Components: SCR Annotations
>    Affects Versions: scr generator 1.1.4
>            Reporter: Daniel Kuffner
>              Labels: annotation, generate, scr, task
>
> The ANT SCR task will produce a warning in case the Component has paramterless activate method like:
> public void activate() { ... }
> This problem can be fixed by adding a @Activate annnotation to the method.
> However it seems to be a bug that 
> 1. the problem will issue only a warning but breaks the build
> 2. I thought "activate()" is a valid signature.
> I propose either to issue the problem as an error (to make obviouse what actually broke the build) or to let this warning not break the build.
> Here is my Task execution:
>  <scr srcdir="src/main/java" destdir="target/java" classpathref="scr-classpath"
>            parseJavadoc="false" strictMode="false"
> generateAccessors="false" specVersion="1.1"/>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3519) [SCR ANT] A activator method without parameters issue a warning and failes the build

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281441#comment-13281441 ] 

Carsten Ziegeler commented on FELIX-3519:
-----------------------------------------

Yes, I agree this should work and activate() is a valid signature. 
Could you please try if adding specVersion="1.1" to the @Component tag works as well (without adding @Activate)?
                
> [SCR ANT] A activator method without parameters issue a warning and failes the build
> ------------------------------------------------------------------------------------
>
>                 Key: FELIX-3519
>                 URL: https://issues.apache.org/jira/browse/FELIX-3519
>             Project: Felix
>          Issue Type: Bug
>          Components: SCR Annotations
>    Affects Versions: scr generator 1.1.4
>            Reporter: Daniel Kuffner
>              Labels: annotation, generate, scr, task
>
> The ANT SCR task will produce a warning in case the Component has paramterless activate method like:
> public void activate() { ... }
> This problem can be fixed by adding a @Activate annnotation to the method.
> However it seems to be a bug that 
> 1. the problem will issue only a warning but breaks the build
> 2. I thought "activate()" is a valid signature.
> I propose either to issue the problem as an error (to make obviouse what actually broke the build) or to let this warning not break the build.
> Here is my Task execution:
>  <scr srcdir="src/main/java" destdir="target/java" classpathref="scr-classpath"
>            parseJavadoc="false" strictMode="false"
> generateAccessors="false" specVersion="1.1"/>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3519) [SCR ANT] A activator method without parameters issue a warning and failes the build

Posted by "Daniel Kuffner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281535#comment-13281535 ] 

Daniel Kuffner commented on FELIX-3519:
---------------------------------------

Ok make sense to me but in my case the ANT build failes because of the warning. Is that abug of the ANT tool or is that somehow configurable? 
                
> [SCR ANT] A activator method without parameters issue a warning and failes the build
> ------------------------------------------------------------------------------------
>
>                 Key: FELIX-3519
>                 URL: https://issues.apache.org/jira/browse/FELIX-3519
>             Project: Felix
>          Issue Type: Bug
>          Components: SCR Annotations
>    Affects Versions: scr generator 1.1.4
>            Reporter: Daniel Kuffner
>              Labels: annotation, generate, scr, task
>
> The ANT SCR task will produce a warning in case the Component has paramterless activate method like:
> public void activate() { ... }
> This problem can be fixed by adding a @Activate annnotation to the method.
> However it seems to be a bug that 
> 1. the problem will issue only a warning but breaks the build
> 2. I thought "activate()" is a valid signature.
> I propose either to issue the problem as an error (to make obviouse what actually broke the build) or to let this warning not break the build.
> Here is my Task execution:
>  <scr srcdir="src/main/java" destdir="target/java" classpathref="scr-classpath"
>            parseJavadoc="false" strictMode="false"
> generateAccessors="false" specVersion="1.1"/>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3519) [SCR ANT] A activator method without parameters issue a warning and failes the build

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13294432#comment-13294432 ] 

Carsten Ziegeler commented on FELIX-3519:
-----------------------------------------

I retested this and it works for me. Can we close this one?
                
> [SCR ANT] A activator method without parameters issue a warning and failes the build
> ------------------------------------------------------------------------------------
>
>                 Key: FELIX-3519
>                 URL: https://issues.apache.org/jira/browse/FELIX-3519
>             Project: Felix
>          Issue Type: Bug
>          Components: SCR Annotations
>    Affects Versions: scr generator 1.1.4
>            Reporter: Daniel Kuffner
>              Labels: annotation, generate, scr, task
>
> The ANT SCR task will produce a warning in case the Component has paramterless activate method like:
> public void activate() { ... }
> This problem can be fixed by adding a @Activate annnotation to the method.
> However it seems to be a bug that 
> 1. the problem will issue only a warning but breaks the build
> 2. I thought "activate()" is a valid signature.
> I propose either to issue the problem as an error (to make obviouse what actually broke the build) or to let this warning not break the build.
> Here is my Task execution:
>  <scr srcdir="src/main/java" destdir="target/java" classpathref="scr-classpath"
>            parseJavadoc="false" strictMode="false"
> generateAccessors="false" specVersion="1.1"/>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3519) [SCR ANT] A activator method without parameters issue a warning and failes the build

Posted by "Daniel Kuffner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13294436#comment-13294436 ] 

Daniel Kuffner commented on FELIX-3519:
---------------------------------------

Ok lets close it. Thanks for looking into it.
                
> [SCR ANT] A activator method without parameters issue a warning and failes the build
> ------------------------------------------------------------------------------------
>
>                 Key: FELIX-3519
>                 URL: https://issues.apache.org/jira/browse/FELIX-3519
>             Project: Felix
>          Issue Type: Bug
>          Components: SCR Annotations
>    Affects Versions: scr generator 1.1.4
>            Reporter: Daniel Kuffner
>              Labels: annotation, generate, scr, task
>
> The ANT SCR task will produce a warning in case the Component has paramterless activate method like:
> public void activate() { ... }
> This problem can be fixed by adding a @Activate annnotation to the method.
> However it seems to be a bug that 
> 1. the problem will issue only a warning but breaks the build
> 2. I thought "activate()" is a valid signature.
> I propose either to issue the problem as an error (to make obviouse what actually broke the build) or to let this warning not break the build.
> Here is my Task execution:
>  <scr srcdir="src/main/java" destdir="target/java" classpathref="scr-classpath"
>            parseJavadoc="false" strictMode="false"
> generateAccessors="false" specVersion="1.1"/>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira