开发者

How to get GWT to compile multiple modules?

I've set up a new GWT project in NetBeans 6.9 and created multiple GWT modules I've tried adding them all in 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'm getting an error at compilation time saying that it doesn't find the second module. Now, i can compile just fine only ONE module. Doesn't matter which one. Is it something i'm doing wrong or it's 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 c开发者_开发技巧ase only the last module in the list gets compiled.


You need to create a gwt.xml file per module.

Then you can compile all of them with an 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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜