Friday, February 22, 2019

Seeking advice, migrating from Ant to Maven for GWT App build

I'm considering migrating an existing application from being built with Ant, to being built with Maven.
I've been doing a lot of reading and experimenting with the net.ltgt.gwt.maven gwt-maven-plugin but can't seem to wrap my head around the specifics of moving our existing application to the multi-(maven)module model recommended for this plugin.
This application is really two apps in one (each with a separate EntryPoint) plus a third 'common' gwt-module plus supporting common java classes, etc.  Both App-A and App-B GWT modules "inherit" the Common GWT module.  Finally a separate control servlet acts the front-end and returns HTML invoking the correct GWT javascript (App-A or App-B) based on the requested URL.

Our current project structure is:
Project
   src
      com
         foo
            app_a
               client
                  <client-side (GWT related) classes>
                   AppAEntryPoint.java
               server
                  <server-side classes>
               shared
                  <classes shared by client and server packages>
               App_A.gwt.xml
            app_b
               client
                  <client-side (GWT related) classes>
                  AppBEntryPoint.java
               server
                  <server-side classes>
               shared
                  <classes shared by client and server packages>
               App_B.gwt.xml
            common
               client
                  <client-side (GWT related) classes>
               server
                  <server-side classes>
               shared
                  <classes shared by client and server packages>
               Common.gwt.xml (no <entry-point> defined)
   war
      WEB_INF
         lib
            <dependent jars>
My best guess right now for migrating the structure would be to break this into 3 separate projects (App-A, App-B and Common) each with 3 maven modules (App-A-client, App-A-Server, App-A-shared, App-B-client, etc...)  But this seems a bit extreme in that we would end up with 12 distinct Eclipse projects, with code 'spread' across 9 of those.  I feel like if App-A and App-B didn't have their own EntryPoints that I could easily transform this to fit the multi-module archetype structure, but the multiple EntryPoints keeps tripping me up.

Is there something obvious (or not) that I'm missing that would allow our app to 'live' in the (relatively simple) archetyped structure?

BTW - my main reason for wanting to move to a maven-based build is to manage the dependent jars in the web-inf/lib directory.

Thanks in advance for any pointers!

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