Search code examples
gwtentry-point

How do I compile a module without an EntryPoint?


I have a utility module for GWT which doesn't have an UI (hence, there is no class which inherits from com.google.gwt.core.client.EntryPoint. When I try to compile this module with GWT 1.7.1, I get this error:

[ERROR] Module has no entry points defined

How do I get rid of this error? Do I really have to define a dummy entry point? How did Google ever compile their own utility modules???


Solution

  • I'm using the gwt-maven-plugin Maven2 plugin to compile my code. I migrated the code from an old version of the maven-googlewebtoolkit2-plugin plugin. For the old plugin, I had to specify which modules were entry points like so:

                    <compileTargets>
                        <param>com.project.module.Module</param>
                    </compileTargets>
    

    For the new plugin, it's

                    <module>com.project.module.Module</module>
    

    Since the plugin couldn't find which modules to compile, it search for "*.gwt.xml" and compiled all of them into "UI modules" (which must have an entry point).