On Monday, March 12, 2018 at 12:55:22 PM UTC+1, dflorey wrote:
>
> Hi folks,
> after all those years I've decided to start migrating our GWT / App Engine 
> (standard) projects from Ant to Maven.
> The main app consists of several GWT libraries and multiple modules.
> I'd also like to split the monolithic app into several "microservices" 
> running on App Engine (frontend and backend).
> Problem is that I've not used maven much in the past so there is a lot of 
> new stuff to learn.
>

If you can, you may want to try Gradle instead of Maven. Migration from Ant 
should be much easier, as both Gradle and Ant use graphs of dependent 
tasks, whereas Maven uses a linear lifecycle where you bind plugin "goals" 
to predefined "phases".
 

> I've Googled a bit in the last days to get the big picture, but I did not 
> find any tutorials how to put it all together.
> So I though it would be a good idea to try to collect as much info from 
> the experts as possible and write down a tutorial for others facing the 
> same situation.
>
> What I did so far:
> I've created a maven parent project as I thought it may be a good idea to 
> have a child project for each app engine module / service.
>
I've added the first maven module (frontend) and created an empty project 
> from the appengine standard archetype.
>
> I tried to add the gwt maven plugin to this project, but I had no clue how 
> to do that.
> I copy/pasted the definitions from here into the pom:
> https://tbroyer.github.io/gwt-maven-plugin/usage.html
>

You could have a look at the samples from the GWT 
SDK: https://gwt.googlesource.com/gwt/+/2.8.2/samples/mobilewebapp/
I strongly discourage putting client and server code inside the same Maven 
module though; so I'd suggest you rather take inspiration from my 
archetypes at https://github.com/tbroyer/gwt-maven-archetypes (disclosure: 
I don't use AppEngine, so I have no idea if it's easy, and what it takes, 
to run the AppEngine dev server within multi-module projects; IIRC, 
previous versions required you to "mvn install" the dependencies and start 
the dev server from your "server" module, but this may have –I hope it has– 
changed; even Jetty which had the same limitation for years eventually 
fixed their Maven plugin).
 

> When running
>
> maven gwt:compile
>
> I just get this error:
> [WARNING] Error: Could not find or load main class 
> com.google.gwt.dev.Compiler
>
> Any ideas?
>

First, you don't want to call those goals from the CLI, use the lifecycle 
phases instead. And in a multi-module project, as a rule of thumb, in 
addition to always run Maven from the root, stick to "mvn package" and "mvn 
verify" (and possibly use -DskipTests to skip the tests). So: mvn package 
-DskipTests

Wrt the error, make sure you have gwt-dev declared as a compile-time 
dependency.

-- 
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+unsubscr...@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.

Reply via email to