[
https://jira.jboss.org/jira/browse/GTNPORTAL-66?page=com.atlassian.jira.p...
]
Luca Stancapiano commented on GTNPORTAL-66:
-------------------------------------------
I moved the processor inside component.scripting project so it is close to the groovy
compiler.
Instead of mysema plugin I use the standard maven-compiler-plugin in the
component.scripting pom.xml. I add a -proc:none param so the processor is not used in this
project because it need to be compiled before.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
I added a javax.annotation.processor.Processing file inside
src/main/resources/META-INF/services folder of the project containing the custom processor
name class so java 6 knows that there is a processor to execute. This processor will be
execute by all projects that have the component.scripting as dependency in our pom.xml. So
the dependency has to be added in the poms of the projects that use the interested
annotations.
Actually I'm resolving a problem of classloading compiling all portal project. Here
there is the error:
/GATEIN/portal/webui/core/src/main/java/org/exoplatform/webui/config/annotation/EventConfig.java:[42,30]
incompatible types
found : org.exoplatform.webui.event.Event.Phase
required: org.exoplatform.webui.event.Event.Phase
It seems that this class is added by two different classloaders. I f I put off the
processor the compile is ok
Processor for the annotations reading groovy templates
------------------------------------------------------
Key: GTNPORTAL-66
URL:
https://jira.jboss.org/jira/browse/GTNPORTAL-66
Project: GateIn Portal
Issue Type: Task
Components: Common integration
Affects Versions: 3.0.0-Beta01, 3.0.0-Beta02
Environment: jdk 1.6.0_07, jboss 5.1, mvn 2.2.1
Reporter: Luca Stancapiano
Priority: Minor
Fix For: 3.0.0-CR01
Attachments: GroovyAnnotationProcessor.java
maybe useful a mechanism that validates the groovy templates passed in the
org.exoplatform.webui.config.annotation.ComponentConfig annotation declared in the
exo.portal.webui.core project.
This annotation is actually used in the exo.portal.component.dashboard project.
Using the Pluggable Annotation Processing API for java 6 (here some detail of the
technology:
http://www.javabeat.net/articles/14-java-60-features-part-2-pluggable-ann...)
we can validate the groovy templates so we are not forced to load them at runtime and we
avoid a boring testing navigations.
The idea is introduce the Pluggable Annotation Processing in the pom.xml so we validate
the templates through the 'mvn install' command
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira