IntelliJ

32 views
Skip to first unread message

wil.pannell

unread,
Dec 5, 2009, 11:13:20 PM12/5/09
to Google Web Toolkit
This follows up a prior post: can someone with experience post a
sample that uses GWT with IntelliJ, maybe even with Maven?

There are very few examples available on the web. I would like
particularly to see how the hosted mode debugger can be consistently
configured.

Alexander

unread,
Dec 6, 2009, 12:50:49 AM12/6/09
to google-we...@googlegroups.com
There is a demo from Jetbrains itself. http://www.jetbrains.com/idea/features/gwt.html

I believe its enough to understand how configure and run simple application in IDEA. What about Maven integration - its not so hard just read about http://mojo.codehaus.org/gwt-maven-plugin/

Debugger works out of the box. What problem do u have?

2009/12/6 wil.pannell <wil.p...@pepsiamericas.com>

--

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.





--
Regards,
Alexander

Matt Raible

unread,
Dec 6, 2009, 10:16:09 PM12/6/09
to Google Web Toolkit
Here's a sample application that uses GWT 1.7.1 and the Maven GWT
Plugin.

http://static.raibledesigns.com/downloads/gwt-oauth-1.3.zip

You should be able to run "mvn idea:idea" to create IntelliJ project
files.

Hope this helps,

Matt

On Dec 5, 9:13 pm, "wil.pannell" <wil.pann...@pepsiamericas.com>
wrote:

wil.pannell

unread,
Dec 7, 2009, 11:01:02 AM12/7/09
to Google Web Toolkit
@Matt:

Thanks for the post. I'll post back later after I review the app in
IntelliJ.

@Alexander:

I'm a newbie (<1 year) doing Java, and I ran into many configuration
issues using Maven in IntelliJ. I also ran into configuration
headaches taking GWT samples, importing them into IntelliJ and getting
the hosted mode debugger to work. Whatever I got working was a hack.

I hope the post from Matt will help clear up many of the questions I
had.

On Dec 6, 9:16 pm, Matt Raible <mrai...@gmail.com> wrote:
> Here's a sample application that uses GWT 1.7.1 and the Maven GWT
> Plugin.
>
> http://static.raibledesigns.com/downloads/gwt-oauth-1.3.zip
>
> You should be able to run "mvn idea:idea" to createIntelliJproject
> files.
>
> Hope this helps,
>
> Matt
>
> On Dec 5, 9:13 pm, "wil.pannell" <wil.pann...@pepsiamericas.com>
> wrote:
>
>
>
> > This follows up a prior post:  can someone with experience post a
> > sample that uses GWT withIntelliJ, maybe even with Maven?

Brian

unread,
Dec 7, 2009, 1:17:41 PM12/7/09
to Google Web Toolkit
The setup I use isn't ideal, but it mostly works.

I have the code tree set up the way that the maven GWT plugin wants
it. Java module code is in src/main/java/[module package]. I have
module HTML and CSS in src/main/resources/[module package]/public,
though my index.html (containing a redirect to the actual app HTML) is
in src/main/webapp. There's probably an opportunity to make something
more optimal there. Finally, my web.xml is in src/main/resources/
webapp/WEB-INF.

I use maven to run the app: mvn gwt:run. After building and before
running, though, I found that it wants the web.xml to be in war/WEB-
INF. I manually copy this from src/, and that only needs to be done
when you do a really clean build (including manually removing the war
directory, which you should do if you change versions on any of your
jars to avoid duplicates). It's not perfect, but I haven't spent the
time to figure out how to properly configure the maven GWT plugin.

As for IntelliJ, I would recommend using an IDEA 9 Beta or EAP build
when using GWT > 1.5. Also, IntelliJ will nicely import maven pom.xml
files, so no need to run `mvn idea:idea`. Make sure you accept the GWT
facet, since that's what will give you the nice code navigation when
using GWT-RPC and such. To configure the facet, you'll need to have
GWT downloaded and unpacked somewhere so you can point IntelliJ at it.
It's going to warn you "gwt-user.jar library not found in dependencies
of module" and give you a "Fix" button. However, I've found that when
I do that, I end up with 2 copies of the GWT jars on my classpath (one
from IntelliJ's "fix" and the other from maven) and you'll get strange
errors about classes not being available because your module doesn't
inherit from some module or other that should be included in the base
User module, even when your module does inherit User. Removing the
jars that IntelliJ added when "fixing" the project (or just not
letting it fix it at all) makes these go away.

Finally, for running/debugging from IntelliJ, I just have 3 run
configurations set up: 2 maven configs (gwt:run and gwt:debug) and one
remote debug config. In the debug config, just make sure the port
matches the one that maven echos when waiting for a debugger to attach
when you run gwt:debug.

I hesitated to share all of this because I know it's far from perfect,
but maybe you'll find some of it useful. Let us know if you discover
any other tricks.

-Brian

On Dec 7, 11:01 am, "wil.pannell" <wil.pann...@pepsiamericas.com>
wrote:
Reply all
Reply to author
Forward
0 new messages