I am just starting out with developing GWT using Maven as a build system.
I came from the Java + Flex world, so naturally I have client-side modules and server-side modules that are clearly separated.
While delving into the best practices of GWT and digging deeper and deeper, by default, the configuration of GWT projects more and more resembles a complete mess of responsibilities. Especially when it comes to multi-module projects.
I realized that the agreement states that the server logic belongs to the “server” packages, the general code is “shared” and the material is compiled in HTML + JavaScript by the GWT compiler in the “client” packages. And all the code goes to src / main / java. So far so good.
No matter how I try to see it ... for me, the material in the client packages is just dead code. Even if the java compiler compiles this for classes, classes are never used at run time and are only needed to provide input to the GWT compiler at compile time. Therefore, even if it is similar to Java, in fact it is not and only looks like Java. It seems to be dirty to put them in the same banks as the live code.
There would be no maven structure like this:
/src/
/src/main/
/src/main/java
/src/main/shared
/src/main/gwt
And to use the java compiler plugin, use src / main / java and src / main / shared and the GWT compiler to use src / main / gwt and src / main / shared?
, ... "jars", src/main/java src/main/shared, "gwt", src/main/gwt src/main/shared.
, , GWT .
, GWT xml, src/main/java... XML && & != Java; -)
, ... ?