<configuration>
<skipModule>true</skipModule>
<modules>
<module>
<moduleName>A</moduleName>
<moduleName>B</moduleName>
<moduleName>C</moduleName>
<moduleName>D</moduleName>
</module>
</modules>
</configuration>
<configuration>
<moduleName>A</moduleName>
<moduleName>B</moduleName>
<moduleName>C</moduleName>
<moduleName>D</moduleName>
<skipModule>true</skipModule>
</configuration>
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-pluginI 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-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
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).
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/57Sadly, this was closed and recently labeled with a wontfix, hence me asking for help here :)
This indeed seems to be what I was looking for, thank you.Are there any obvious downsides to doing it like this, with multiple executions?
Does it matter which specific moduleName I specify within the <configuration> tag, or should I just pick 1 arbitrary one there and put the others within the <executions> tag?
I wouldn't put any <moduleName> / <moduleShortName> into the plugin-level <configuration>, and only put them into the <executions>.
<configuration>
<localWorkers>6</localWorkers>
<skipModule>true</skipModule>
<draftCompile>true</draftCompile>
</configuration>
<executions>
<execution>
<id>compile-common</id>
<goals><goal>compile</goal></goals>
<configuration>
<moduleName>com.test.common</moduleName>
</configuration>
</execution>
On Tuesday, May 9, 2017 at 12:59:17 PM UTC+2, Thomas Broyer wrote:I wouldn't put any <moduleName> / <moduleShortName> into the plugin-level <configuration>, and only put them into the <executions>.That's what I figured, but it seems to be a required property (The parameters 'moduleName' for goal net.ltgt.gwt.maven:gwt-maven-plugin:1.0-rc-7:compile are missing or invalid, when invoking gwt:compile).
I defined my executions as per your example:
<configuration>
<localWorkers>6</localWorkers>
<skipModule>true</skipModule>
<draftCompile>true</draftCompile>
</configuration>
<executions>
<execution>
<id>compile-common</id>
<goals><goal>compile</goal></goals>
<configuration>
<moduleName>com.test.common</moduleName>
</configuration>
</execution>
etc.. but it appears the executions aren't triggered (or is this an effect of the missing moduleName under configuration?). It seems I have much to learn still.
I tried both the command line (mvn gwt:compile) and via the IntelliJ Maven plugin.Indeed, binding the execution to the prepare-package phase and running mvn gwt:compile@compile-common works, and I'm glad it does.If I'm reading what you're saying correctly, this means that there is no way to invoke all the plugin executions with a simple command?I personally expected mvn gwt:compile to invoke everything it needs (so everything that comes earlier in it's lifecycle, including the executions I bound to the prepare-package phase),or am I missing something obvious?