Problems with GPE, maven, m2eclipse, WTP

43 views
Skip to first unread message

Paul Schyska

unread,
Apr 18, 2011, 4:25:10 PM4/18/11
to Google Web Toolkit
Hi all,

I have set up a maven build utilizing gwt-maven-plugin and
corresponding eclipse configuration, so that ecj incremental
compilation and gwt dev mode work on my server. It got a bit
complicated as I want to build a Liferay-compatible portlet out of
it :-)
Everything seems to be working fine, dev mode, mvn package, WTP
deploy, JUnit tests through eclipse and maven.
However, I'm having to issues, which seem to be related to the GPE:

- GPE (or something...) keeps creating *Async Interface in my src/
main/java/../client package. Which is cool, but the maven plugin will
do the same on build but put the *Async Interface to /target/../
generated-sources/... .generated-sources is also on the build path,
leading to the same interface being twice in build path. I assume that
GPE is creating the interfaces, but I want to keep the maven code
generation for this. Less boilerplate in SCM, you know :-). Any idea
how to stop GPE from doing it? I don't recall GPE doing this when
using the gwt-maven-plugin-related archetype for creating my project,
but was unable to pin down the setting resulting in this behavior.

- GPE will mark my gwt JUnit Tests as not inheriting
com.google.gwt.junit.JUnit, although the corresponding
GwtTestCase.gwt.xml is inherting it. The quick fix available makes my
*main* module inherit com.google.gwt.junit.JUnit, which leads to a
runtime error about JUnit-Class not available in runtime, which I
would like to get rid off. I understand that this is a known bug in
GPE (AFAIK), but I would like to turn this particular inspection off.
Is there any way to do it?

- Is there still no way to have the gwt.xml file in another source
folder as the implementation (for example src/main/resources as per
maven convention)?

Thanks for any answers,

Paul

Martin Trummer

unread,
Apr 19, 2011, 5:34:09 AM4/19/11
to Google Web Toolkit
not exactly what you want to hear, but maybe it helps:

- inteface generation
you can tell eclipse to ignore stuff in your target folder:
just right click the target-folder select 'properties' and setup
resource filters
then you will not have any conflict

I prefer not to use any maven generation in eclipse (via the m2eclipse
plugin), because it's so slow.

- Tests
you can exclude test-classes:
http://code.google.com/p/google-web-toolkit/issues/detail?id=4454

- GWT module file location
I think I had it working in src/main/resources, however when I started
to use the GWT designer, I had to move it back to the java folder.

Paul Schyska

unread,
Apr 19, 2011, 9:13:10 AM4/19/11
to Google Web Toolkit
Hi Martin,

thanks for your answers.

> - inteface generation
> you can tell eclipse to ignore stuff in your target folder:
> just right click the target-folder select 'properties' and setup
> resource filters
> then you will not have any conflict

Unfortunateley, I still have two copies of the files still (with
different content btw., maven generator puts some static getInstance()
convenience functions into the interface). As the gwt-maven-plugin-
archetype seems to be able to supress GPE based generation, there
should be a way though.
Even with exclusion in my Main module (Main.gwt.xml) and the JUnit
module (MainJUnit.gwt.xml), GPE is still putting this GWT problems
marker. Any way to prevent the GWT validation ? I'm not an eclipse
pro, maybethere is some setting I didn't find yet or some manuel entry
in .settings

> - GWT module file location
> I think I had it working in src/main/resources, however when I started
> to use the GWT designer, I had to move it back to the java folder.

Yes that's the thing - It's not so much an issue I don't insist on
the .gwt.xml being in resources :-). Moving the file to src/main/java
solves this issue.
Reply all
Reply to author
Forward
0 new messages