1

I've stated using Thomas Broyer's gwt maven plugin as it allows me to run gwt 2.8-rc2. I've got it running with the codeserver fine and with minimum effort.

However now I'm trying to figure out how to use it to do a full compile and package.

Simply running maven install (I expected this to work as it does work with the default) does not actually run the gwt compile.

Then it talks about various packaging formats etc and I'm not sure why these are necessary?

I assume someone has got this plugin packaging the war and has also migrated from the original plugin...

This is my plugin config - I am using skipModule as I've already got a module configured the way the other plugin expects.

                <plugin>
                    <groupId>net.ltgt.gwt.maven</groupId>
                    <artifactId>gwt-maven-plugin</artifactId>
                    <version>1.0-rc-6</version>
                    <extensions>true</extensions>
                    <configuration>
                        <moduleName>com.afrozaar.ashes.web.AshesWeb-safari</moduleName>
                        <skipModule>true</skipModule>
                        <style>DETAILED</style>
                        <!-- <logLevel>DEBUG</logLevel> -->
                        <classpathScope>compile+runtime</classpathScope>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.google.gwt</groupId>
                            <artifactId>gwt-user</artifactId>
                            <version>2.8.0-rc2</version>
                        </dependency>
                        <dependency>
                            <groupId>com.google.gwt</groupId>
                            <artifactId>gwt-dev</artifactId>
                            <version>2.8.0-rc2</version>
                        </dependency>
                        <dependency>
                            <groupId>com.google.gwt</groupId>
                            <artifactId>gwt-servlet</artifactId>
                            <version>2.8.0-rc2</version>
                        </dependency>
                    </dependencies>
                </plugin>
Michael Wiles
  • 20,902
  • 18
  • 71
  • 101

1 Answers1

1

You're missing "executions" in your plugin configuration to run the compile goal (works the same as with the CodeHaus plugin).

My plugin works better when you separate client and server code into distinct Maven modules, which is why this setup is not clearly documented (because I actively discourage it). You can have a look at the samples in the GWT git repository to find examples similar to your case though.

BTW, I believe you can use rc2 with the CodeHaus plugin rc1; that's probably why you added those dependencies, which are useless with my plugin.

See also https://tbroyer.github.io/gwt-maven-plugin/migrating.html

Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164
  • thanks a lot, will investigate. I don't think I'm going back ;-) – Michael Wiles Aug 25 '16 at 08:29
  • when you say "this setup" why is this setup opposite to having separate client and server modules? I do agree with that architecture. – Michael Wiles Aug 25 '16 at 08:32
  • I somehow assumed you have everything in the same Maven module, as `classpathScope` is for `gwt:codeserver` (and `gwt:devmode`). If you have separate modules, I see no reason not to use the `gwt-app` packaging; saves you a hit of configuration, simplifying your POM. – Thomas Broyer Aug 25 '16 at 18:04
  • thanks for the help, I'll bit by bit make things better – Michael Wiles Aug 26 '16 at 08:53
  • @ThomasBroyer Hello, is there a complete POM example where when `mvn package` or other is run it will generate app nocache js files that are not dependent to GWT Code server, since everytime I tried to run the goal it creates the gwt files but when accessed through web browser it asks for GWT Code server, I just want to build the app for deployment as static site. – quarks Nov 02 '16 at 16:18
  • @xybrek https://github.com/tbroyer/gwt-maven-archetypes avoid creating SDM in the production folder. Otherwise, use [`forceCompilation`](https://tbroyer.github.io/gwt-maven-plugin/compile-mojo.html#forceCompilation), or clean before you package. – Thomas Broyer Nov 02 '16 at 21:47