Although I'm still very interested to get an answer to my previous
post, I have just implemented the "temporary hack" that I mentioned,
and I actually would say that it's a good approach.  I created a
"Build" gwt module, which has an entry point, and inherits the overlay
type library.  I edited my ant file's gwt-compile target so that it
runs a gwt-compile on the "Build" module, and the gwt-compile
succeeded.  There are 2 nice things about this approach...

1) The "make-jar" target can create a jar file which only contains
code from the library, and so I don't have to ship the build module.

2) The Build module's entry point actually is a nice space to write
some code which uses the library, as another set of tests.  I haven't
done this yet, but in theory I could write some code which calls all
of the code in the library, and this would ensure that the intended
usage of the library is compliant with the GWT compiler as well.
However, perhaps this is redundant if the library has a suite of unit
tests.

Anyways, as I said, I'm still curious to know how I might be able to
run the gwt-compiler to execute only those compile steps which are
relevant to a library (as opposed to an application).

Cheers,
Mike


On Nov 18, 5:52 pm, MonkeyMike <[email protected]> wrote:
> Hello,
>
>    I am creating a GWT Overlay Type library, and have just written an
> ant build file for creating the JAR file that GWT applications will
> import.  To maintain code integrity, I make the JAR creation depend on
> a java compile of all the code, and also a gwt compile.  Obviously,
> this is meant to ensure that the code in the library is acceptable
> Java, and also that it is acceptable GWT.
>
>    When I run the GWT compiler, however, I get an error related to the
> fact that my library has no entry point...
>
> -------------------------
> Buildfile: C:\Data\Dev\EclipseWorkspaceTrunk\gwtgfx\build.xml
> javac-compile:
>     [javac] Compiling 2 source files to C:\Data\Dev
> \EclipseWorkspaceTrunk\gwtgfx\build\javac
> gwt-compile:
>      [java] Compiling module gwtgfx.GwtGfx
>      [java]    [ERROR] Module has no entry points defined
>
> BUILD FAILED
> C:\Data\Dev\EclipseWorkspaceTrunk\gwtgfx\build.xml:25: The following
> error occurred while executing this line:
> C:\Data\Dev\EclipseWorkspaceTrunk\gwtgfx\build.xml:45: Java returned:
> 1
>
> Total time: 3 seconds
> -------------------------
>
>   Of course, it makes perfect sense that my library has no entry point
> since it is, in fact, a library... not an application.
>
>    Is there an option for the GWT compiler to do only the parts that I
> want here?  I want the GWT compiler to ensure, for example, that all
> of my JavaScriptObject subclasses follow the specified restrictions
> (has a protected no-arg constructor, instance methods are final,
> etc)... and anything else that the GWT compiler might do now, or in
> the future, to check that the GWT code is valid.  If not having an
> entry point means that there is no reasonable way to do one or more of
> the compiler steps, then that should be okay because those steps
> probably aren't relevant for a library anyways.
>
>    As a temporary hack, I guess I am going to include an entry point,
> but I really don't want to ship this.  Is there a better alternative?
>
> Thanks in advance. :)

--

You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=.


Reply via email to