Wednesday, February 5, 2025

GWT Maven project Structure

Hello,

We have a big GWT project with following configurations that needs to be converted to a Maven  project. 

GWT2.9
JDK11
Eclipse 4.24
Tomcat 9

We have changed our project by applying the Maven folder structure as below, however, we're not sure if we need to separate the java files to Client/Server/Shared folders or not.

src/main/java -> java sources
src/main/resources -> resources: .properties files, .xml files, ...
src/test/java -> test java sources
src/test/resources -> test resources

According to the project structure specified by the following gwt maven archetype,  we need to move our java files by using this approach, is it correct? In other words, what is the best way to determine which files need to be put in the Client/Server/Shared folders?

https://github.com/xlavs/gwt-maven-archetype


Client folder:

/**
 * The client-side stub for the RPC service.
 */
@RemoteServiceRelativePath("greet")
public interface GreetingService extends RemoteService {
    String greetServer(String name) throws IllegalArgumentException;
}

 * The async counterpart of <code>GreetingService</code>.
 */
public interface GreetingServiceAsync {
    void greetServer(String input, AsyncCallback<String> callback)
            throws IllegalArgumentException;
}


Service folder: 

 * The server-side implementation of the RPC service.
 */
@SuppressWarnings("serial")
public class GreetingServiceImpl extends RemoteServiceServlet implements
        GreetingService {


As our project is a large one with many packages without clear separation, what is the best way to convert it to Maven project with proper structure in a timely manner? I read some posts suggesting to use a multi-module project structures for a big Maven project. Is it the right way to go? Or we have a simple way to convert it as we don't have much maven experiences for the multi-module project. 


Your help is much appreciated!

Jenny



--
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 view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/16e46a0b-a563-47a1-bf12-d340c3df713dn%40googlegroups.com.

No comments:

Post a Comment