Inconsistency (or a bug?) in application creation for GWT 2.0

1 view
Skip to first unread message

jbdhl

unread,
Dec 8, 2009, 6:01:40 PM12/8/09
to Google Web Toolkit
It seems that there are some inconsistency in the ways web apps are
created. There are primary two ways to create an application:

1) Running
./webAppCreator -out myProject -junit /path/to/junit-4.8.1.jar
com.foo.myproject.MyProject
This creates:
- build.xml
- a skeleton unittest
- a bunch of .launch files
- a certain kind of .project-file
However, when importing this project into eclipse, the gwt-
plugin's "compile" button does not work (the popup claims that my
project is not a GWT project). Also, when following the instructions
in README.txt, a separate GWT-development mode window is launched when
running in debug-mode, and the the compiler progress output is not
seen in any eclipse windows.

2) Create the app from eclipse with the google eclipse plugin.
This creates no build.xml, no skeleton unittest, no .launch-files
and another kind of .project-file than above. However, the red compile
button now works out-of-the-box and the compiler progress output can
be seen in eclipse.

This makes me wonder:

a) Why is there such a difference when creating new apps in these
ways? Aren't both methods handled by webAppCreator in the end?

b) How can I make the compile-button work if creating the app with
method 1)?

c) How do I prevent the GWT development mode window from spawning, and
get an in-eclipse developer mode instead as in case 2).

d) As the build.xml get non-trivial over time, how do I make eclipse
compile using a target in build.xml instead of calling the compiler
directly?

Thanks!

Chris Ramsdale

unread,
Dec 9, 2009, 10:09:34 AM12/9/09
to google-we...@googlegroups.com
b) How can I make the compile-button work if creating the app with
method 1)?


Once you have imported the project you'll need to update the project to "Use Google Web Toolkit" (right click on the project->Google->Web Toolkit Settings..."

jbdhl

unread,
Dec 11, 2009, 2:41:08 PM12/11/09
to Google Web Toolkit
Thanks. I guess the answers to c) and d) are

c) by making the project use "Google Web Toolkit" as explained
above.

d) I guess I don't: If I make one initial compile using ant, the
jar's will already be placed in WEB-INF/lib and a conventional GWT-
button-compile will (probably) suffice.

I still don't understand the inconsistency of the generated contents
by the two methods described in question a).

Chris Ramsdale

unread,
Dec 11, 2009, 3:37:25 PM12/11/09
to google-we...@googlegroups.com
In regards to the different artifacts that are produced by the webAppCreator utility and the Eclipse plugin; at its core the webAppCreator simply creates a skeleton web app that is not tied to a particular IDE. We do offer build targets that will allow you to more easily import your project into Eclipse (ant eclipse.generate), but even then we generate the associated .project file in such a way as to let the developer choose how he/she wants to launch the app (Java launch config vs. Web App launch config). 

On the flip side, when you create a project with the Eclipse plugin, we are able to make a few assumptions as to which IDE and launch config you would prefer based on the environment from which you created the project.

- Chris


--

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



Reply all
Reply to author
Forward
0 new messages