Tuesday, May 9, 2017

Re: Multiple GWT modules in one Maven module



On Tuesday, May 9, 2017 at 11:27:25 AM UTC+2, Frederik Van Hoyweghen wrote:
Thanks for the replies.

I already took a look at the issue on the plugin's github: https://github.com/tbroyer/gwt-maven-plugin/issues/57
Sadly, this was closed and recently labeled with a wontfix, hence me asking for help here :)

My first comment on this issue tells you how to do it. In case it isn't clear, what I meant there is:

<executions>
  <execution>
    <id>compile-module1</id>
    <goals>
      <goal>compile</goal>
    </goals>
    <configuration>
      <moduleName>com.example.module1.Module1</moduleName>
      <moduleShortName>module1</moduleShortName>
    </configuration>
  </execution>
  <execution>
    <id>compile-module1</id>
    <goals>
      <goal>compile</goal>
    </goals>
    <configuration>
      <moduleName>com.example.module2.Module2</moduleName>
      <moduleShortName>module2</moduleShortName>
    </configuration>
  </execution>
</executions>

Another possibility (if you really do want to fork one and only one GWT compiler process) is to use the exec-maven-plugin's exec goal (though you would have to declare your source roots as resources dirs to get your sources copied to target/classes so they're present in the computed <classpath/>).
(I suppose you could get something working by "hacking" into the <compilerArgs>, and probably then <forceCompilation>true</forceCompilation> as you'd have the staleness check only take the module configured in <moduleName>/<moduleShortName> into account; I would discourage such "hack" though)

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment