[ 
https://jira.codehaus.org/browse/MGWT-303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=273463#comment-273463
 ] 

Constantino Cronemberger commented on MGWT-303:
-----------------------------------------------

The same can be done by using:

http://mojo.codehaus.org/build-helper-maven-plugin/index.html

> create configuration for aditional directories with generated code
> ------------------------------------------------------------------
>
>                 Key: MGWT-303
>                 URL: https://jira.codehaus.org/browse/MGWT-303
>             Project: Maven 2.x GWT Plugin
>          Issue Type: Improvement
>            Reporter: Constantino Cronemberger
>
> I am using an annotation processor to generate some CustomFieldSerializers 
> and this is not part of gwt-maven-plugin.
> The code being generated goes to target/generated-sources/annotations and 
> when I use gwt:run, gwt:debug or gwt:compile this directory is not used as a 
> source directory.
> The fix I implemented was to create a parameter:
>                     <additionalSourceRoot>
>                         <param>target/generated-sources/annotations</param>
>                     </additionalSourceRoot>
> added the following attribute to AbstractGwtShellMojo:
>     /**
>      * Use to add source roots for any generated sources not directly 
> generated by this plug-in.
>      *
>      * @parameter
>      */
>     // Added by Constantino Cronemberger
>     private File additionalSourceRoot[];
> and modified the execute method to:
>     public final void execute()
>         throws MojoExecutionException, MojoFailureException
>     {
>         if (additionalSourceRoot != null) {
>             for(File path : additionalSourceRoot) {
>                 getLog().info("adding source root: " + path);
>                 addCompileSourceRoot(path);
>             }
>         }
>         doExecute();
>     }

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


Reply via email to