Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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???

like image 572
Aaron Digulla Avatar asked Nov 27 '09 11:11

Aaron Digulla


2 Answers

Utility Jars do not need to be compiled by GWT.

If you just want to reuse this as a library in other GWT applications then you just have to jar the .class and .java files in one jar and make sure that you have a .gwt.xml that says where the client source is. If you follow the conventions (client classes in client) then you can get away with just otherwise you need to specify a tag for the client package

Then make sure that you inherit this .gwt.xml in the projects where you want to compile an entry point.

like image 159
David Nouls Avatar answered Nov 07 '22 13:11

David Nouls


No you don't need an EntryPoint. Here is an example of one of my modules that doesn't have one:

<?xml version="1.0" encoding="UTF-8"?>
<module>
    <source path="grid" />
    <inherits name="com.google.gwt.user.User"/>
</module>

The short answer is you don't compile code in modules. GWT just needs them as source code. When you compile your main module (the one with the entry point) it uses the source from any other modules you have inherited in your .gwt.xml file to compile the entire project.

like image 28
rustyshelf Avatar answered Nov 07 '22 14:11

rustyshelf