1)add <inherits> tag into your project's .gwt.xml file;
2) Add the JAR to the Eclipse build path for your project
3,4,5) Add JAR appropriately to 1 .launch, and 2 .cmd files.
BUT, when just for the heck of it I tried only doing the first two
steps, it worked! Not just in hosted mode, but it also compiled to web
mode, too. No script editing was required.
Am I missing something, or is the two-step approach actually all you
need? I'm using the latest GWT version (1.4.60) so maybe things are
easier now?
John
If you're talking about what I think you're talking about, the .launch
and .cmd files are just scripts for running the GWT compiler from the
command line. If you let those scripts get out of sync from the
Eclipse environment, it'll make your automated build break. Of
course, if you haven't got an automated build, then it's not a
problem, but everyone should have an automated build....
Ian
--
Tired of pop-ups, security holes, and spyware?
Try Firefox: http://www.getfirefox.com
If you only start your GWT app through Eclipse (using the run/debug
menu or toolbar icons) then the first two steps are all you need. Your
launch file (a physical manifestation of the run/debug configuration)
should be setup to inherit classpath entries from the project (updated
in step 2), so you don't have to explicitly update the launch if your
project is configured properly.
I agree with Ian that you should have an automated build, but I can't
advise using the GWT-generated launch or cmd files as part of it. An
ANT script would be much more flexible.
On 10/20/07, John Gunther <johncurt...@yahoo.com> wrote:
>
Thanks a lot for your replies--exactly what I needed to know...now I
get it. By the way, I don't have an automated build, but I'm in the
process of following your advice and setting one up, using ant. This
will be my first time using ant. I've found some good general ant info
on line. Are there any good explanation of GWT-specific ant related
stuff your are aware of?
John
On Oct 22, 8:23 am, "Isaac Truett" <itru...@gmail.com> wrote:
> 1) Required
> 2) Required if you let Eclipse compile your Java code
> 3) Required only if you don't do step 2
> 4&5) Only required if you run the cmds
>
> If you only start your GWT app through Eclipse (using the run/debug
> menu or toolbar icons) then the first two steps are all you need. Your
> launch file (a physical manifestation of the run/debug configuration)
> should be setup to inherit classpath entries from the project (updated
> in step 2), so you don't have to explicitly update the launch if your
> project is configured properly.
>
> I agree with Ian that you should have an automated build, but I can't
> advise using the GWT-generated launch or cmd files as part of it. An
> ANT script would be much more flexible.
>
<target name="gwt-compile">
<java classname="com.google.gwt.dev.GWTCompiler"
classpathref="classpath.gwt" fork="true" failonerror="true">
<arg value="-out" />
<arg value="${gwt.out.dir}" />
<arg value="-style" />
<arg value="${gwt.js.style}" />
<arg value="${gwt.module.name}" />
</java>
</target>
And then make a WAR file as usual. Or to run hosted mode:
<target name="gwt-hosted-mode">
<java classname="com.google.gwt.dev.GWTShell"
classpathref="classpath.gwt" fork="true" spawn="true">
<arg value="-out" />
<arg value="${gwt.out.dir}" />
<arg value="${gwt.module.name}/index.html" />
</java>
</target>
I keep those targets in a common location and import into each GWT
project's build.xml. Just set the module name and other variables in a
properties file and off you go.