[jboss-jira] [JBoss JIRA] (AS7-2343) Remove dependency on rhq plugin annotations

Shelly McGowan (Commented) (JIRA) jira-events at lists.jboss.org
Fri Oct 28 16:00:45 EDT 2011


    [ https://issues.jboss.org/browse/AS7-2343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12638385#comment-12638385 ] 

Shelly McGowan commented on AS7-2343:
-------------------------------------

Adding Ian's proposal (mentioned above) as discussed on the jboss-prod email list:
Hi Galder,
The RHQ plugin annotations are only used by the RHQ pluginGen tool, which is used to generate the source for the inifnispan plugin, correct? If so, it doesn't seem like the annotations should have a RUNTIME retention policy as they do now, because this makes them a requirement of Infinispan / AS runtime, even though they would never be used. So I think the right solution is to change the retention policy of the annotations to either SOURCE or COMPILE. If SOURCE was used, pluginGen would need to be wrapped in an annotation processor that could then be passed in to javac when compiling Infinispan. If COMPILE was used, pluginGen would need to be refactored to use a bytecode manipulation library (ASM, BCEL, etc.), rather than reflection, to read the annotations (see http://bethecoder.com/applications/tutorials/java-annotations-class-and-runtime-retention-policy.html for an example of this). Let me know if one of these approaches will work for you, and I can make the changes to pluginAnnotations and pluginGen and tag and publish new releases of those jars. You could then update the Infinispan build to use those new releases.
Thanks, Ian
                
> Remove dependency on rhq plugin annotations
> -------------------------------------------
>
>                 Key: AS7-2343
>                 URL: https://issues.jboss.org/browse/AS7-2343
>             Project: Application Server 7
>          Issue Type: Enhancement
>          Components: Build System, Clustering
>            Reporter: Paul Gier
>            Assignee: Galder Zamarreño
>             Fix For: 7.1.0.CR1
>
>
> The AS 7 build currently pulls in a transitive dependency on the artifact org.rhq.helpers:rhq-pluginAnnotations:jar:3.0.1.
> This jar is not included in the AS zip, and the dependency should be removed from the build.  However, just excluding this dependency causes a compile error in the infinispan module, so some of the source probably needs to be changed.
> {quote}
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.1:compile (default-compile) on project jboss-as-clustering-infinispan: Compilation failure
> [ERROR] Failure executing javac, but could not parse the error:
> [ERROR] org/infinispan/manager/DefaultCacheManager.class(org/infinispan/manager:DefaultCacheManager.class): warning: Cannot find annotation method 'displayName()' in type 'org.rhq.helpers.pluginAnnotations.agent.Metric': class file for org.rhq.helpers.pluginAnnotations.agent.Metric not found
> [ERROR] org/infinispan/manager/DefaultCacheManager.class(org/infinispan/manager:DefaultCacheManager.class): warning: Cannot find annotation method 'dataType()' in type 'org.rhq.helpers.pluginAnnotations.agent.Metric'
> [ERROR] An exception has occurred in the compiler (1.6.0_20). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.
> [ERROR] com.sun.tools.javac.code.Symbol$CompletionFailure: class file for org.rhq.helpers.pluginAnnotations.agent.DataType not found
> {quote}

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

       



More information about the jboss-jira mailing list