Tuesday, May 9, 2017

Re: Multiple GWT modules in one Maven module

In my project I have many modules. What I did is simple create a gwt-lib maven module per GWT module. Those modules served different purposes so it made sense to split them in smaller artifacts.

In some cases I moved the code around so that I join multiple modules into one big module instead.

Another solution you could try is to have one module that inherits all the other modules. But I don't like that approach because it means you have manually maintain that gwt.xml file and those other gwt.xml files as well, while with the gwt-lib approach the gwt maven plugin will take care of adding the inherits tags automatically (if you have the gwt-lib in your dependency section).

On Mon, May 8, 2017 at 6:17 PM Frederik Van Hoyweghen <frederik.vanhoyweghen@chapoo.com> wrote:
Hey everyone,

We are currently migrating our project away from using Ant, to Maven.

Along with this migration, we also tried to follow some of the project structuring that is recommended for a maven project.

Our Maven GWT module contains multiple GWT modules, but I'm struggling with making this work using Thomas Broyer's GWT plugin: https://github.com/tbroyer/gwt-maven-plugin
I feel like this was designed specifically with the idea of having only 1 GWT module inside a Maven module (please correct me if I'm wrong).


At first I tried this plugin configuration:
<configuration>
   
<skipModule>true</skipModule>
   
<modules>
       
<module>
           
<moduleName>A</moduleName>
            <moduleName>B</moduleName>
            <moduleName>C</moduleName>
            <moduleName>D</moduleName>
       
</module>
   
</modules>
</configuration>


This doesn't work because ModuleName has to be underneath the <configuration> tag.
Listing the modules underneath the <configuration> tag also doesn't work, running gwt:compile only compiles the last module in the list:

<configuration>
   
<moduleName>A</moduleName>
   
<moduleName>B</moduleName>
   
<moduleName>C</moduleName>
   
<moduleName>D</moduleName>
   
<skipModule>true</skipModule>
</configuration>



Does anyone have any experience with this?

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

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