How to get GWT to compile multiple modules?

I installed a new GWT project in NetBeans 6.9 and created several GWT modules. I tried to add them all to the gwt.properties file as follows:

*# The names of the modules to compile (separated by a space character) gwt.module=com.company.MyModule1 com.company.MyModule2 com.company.MyModule3* 

I get an error at compile time saying that it does not find the second module. Now I can only compile thin only one module. It doesn't matter which one. Is this something I'm doing wrong or is it a bug in gwt / nbgwt?

I also tried this:

  *# The names of the modules to compile (separated by a space character) gwt.module=com.company.MyModule1 gwt.module=com.company.MyModule2 gwt.module=com.company.MyModule3* 

In this case, only the last module in the list is compiled.

+2
source share
1 answer

You need to create a gwt.xml file for each module.

Then you can compile them all with the ANT Task

 <target name="gwtc" depends="javac" description="GWT compile to JavaScript"> <java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler"> <classpath> <pathelement location="src"/> <path refid="project.class.path"/> </classpath> <!-- Additional arguments like -style PRETTY or -logLevel DEBUG --> <arg value="${myModuleName}"/> </java> </target> 
0
source

Source: https://habr.com/ru/post/1333783/


All Articles