[
http://jira.codehaus.org/browse/QDOX-231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=270450#comment-270450
]
Michał Bartczak commented on QDOX-231:
-------------------------------------------
Taken from the current gwt-maven-plugin:
{code}
<dependency>
<groupId>com.thoughtworks.qdox</groupId>
<artifactId>qdox</artifactId>
<version>1.12</version>
</dependency>
{code}
I made an example and now I am not 100% sure where the error comes from.
You may try the example that I've attached. Here is what the results would be:
* First run mvn:compile. On target You will see
generated-sources/gwt/com/demo/gaemaven/client/GreetingServiceAsync.java which
is fine, the annotation is processed and there is line of code having
target.setServiceEntryPoint( GWT.getModuleBaseURL() + "blah" );
* Delete that source file
* Rerun mvn:compile, and voila - you get the same class back but this time with
target.setServiceEntryPoint( GWT.getModuleBaseURL() + "GreetingService" );,
which is wrong.
* As long as compiled version of interface is in target/classes, all source
generation will fail
> clazz.getAnnotations() for interface returns empty list of elements.
> --------------------------------------------------------------------
>
> Key: QDOX-231
> URL: http://jira.codehaus.org/browse/QDOX-231
> Project: QDox
> Issue Type: Bug
> Affects Versions: 1.12
> Environment: Used indirectly by gwt-maven-plugin to create Async
> interfaces for GWT
> Reporter: Michał Bartczak
> Assignee: Robert Scholte
> Attachments: gaemaven.zip
>
>
> clazz.getAnnotations() returns an not-null but empty table (0 elements) in
> following code (taken from gwt-maven-plugin)
> {code:title=GenerateAsyncMojo.java}
> String uri = MessageFormat.format( rpcPattern, className );
> if ( clazz.getAnnotations() != null )
> {
> for ( Annotation annotation : clazz.getAnnotations() )
> {
> getLog().debug( "annotation found on service interface " +
> annotation );
> if ( annotation.getType().getValue().equals(
> "com.google.gwt.user.client.rpc.RemoteServiceRelativePath" ) )
> {
> uri = annotation.getNamedParameter( "value" ).toString();
> // remove quotes
> uri = uri.substring( 1, uri.length() - 1 );
> getLog().debug( "@RemoteServiceRelativePath annotation
> found on service interface " + uri );
> }
> }
> }
> {code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email