Hi Keith,

Thanks for offering to help us maven users.  I wish you guys did use
maven :)

On the development workstation, we use STS (for our purposes, Eclipse
Ganymede with m2eclipse plugin).  We use the Google Plugin for Eclipse
for Development mode.  We run development mode from the launch menu
(by manually configuring an Eclipse Debug/Run configuration with the --
noserver mode set.

For our continuous integration environment, we use Hudson and Maven
2.2.1.


We compile our code with the Google Eclipse Plugin and copy our code
over to src/main/webapp/<app-name> for debugging with our server.

We use Tomcat as our dev server.  I might like using Jetty, but there
need to be more instructions for configuring the embedded Jetty in the
Google Plugin for Eclipse.

I think you are on the right track re: the impedance mismatch between
Google Plugin for Eclipse (GWT) and Maven.  Maven does typically look
to src/main/webapp.


We use org.codehaus.mojo gwt-maven-plugin as configured here:

 <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <version>1.2</version>
        <configuration>
                <inplace>false</inplace>
                <runTarget>index.html</runTarget>
                <webXml>src/main/webapp/WEB-INF/web.xml</webXml>
            <logLevel>INFO</logLevel>
                <warSourceDirectory>/war</warSourceDirectory>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>generateAsync</goal>
              <!--
              <goal>test</goal>
               -->
            </goals>
          </execution>
        </executions>
      </plugin>


Our project is a multi-module project with the GWT portion as a
specific module dependent upon a backend module (which has services
and DAOs).   We have another module which handles a web services layer
(separate from GWT).


We copy our GWT code into src/main/webapp so it can be hosted by the
WTP (m2 eclipse integration with Tomcat)  We don't fire up Jetty.  We
launch Tomcat from Eclipse WTP (Debug On Server).  To debug GWT, in
development, we launch our app with --noserver and specify the startup
URL to point to the WTP app.  It connects to the GWT plugin debugger.

Our front end testing leaves a lot to be desired.  We're trying to use
mvp and mocking to better test them.  We don't have it working
smoothly yet.  Our build code for our WAR isn't really working well,
yet either.

I'm happy to do a webex/dimdim to show you what we have working (and
not working).


One thing I've noticed from the responses so far is that some folks
use mvn eclipse:eclipse and others use m2eclipse (from sonatype).  The
sonatype piece seems to have better WTP integration and is part of the
IAM project as I understand it.  It seems more integrated if you use
eclipse.  The sonatype guys are the folks to talk to, specifically
Jason Van Zyl and Eugene Kuleshov  (http://www.sonatype.com/people/
category/m2eclipse/)

I also agree with Nir Feldman's comments.  I see these as well:

1.       Maven standard is using the src/test/java folder for test
cases. Mvn eclipse:eclipse then generates this folder as a source
folder.
Since the GWTTestCase is not part of the user jar and is part of the
dev jar when running the application from eclipse we always get the
following error:
12:16:37.315 [ERROR] [****] Line 12: No source code is available for
type com.google.gwt.junit.client.GWTTestCase; did you forget to
inherit a required module?

2.       Support for coverage reports. When using cobertura plugin the
reports does not contain the GWTTestCase tests.

Brian Bonner

On Jan 13, 11:35 am, Keith Platfoot <kplatf...@google.com> wrote:
> Hi folks,
>
> For the next release of the Google Plugin for Eclipse, we're planning on
> making a few tweaks to make life easier for Maven users. That's right: we've
> seen the stars on the issue tracker, and have decided it's time to act. I
> would say, "we feel your pain", but the problem is, we don't. Which is to
> say, nobody on the plugin team actually uses Maven (everybody around here
> uses Ant). However, I've been researching Maven to determine exactly what
> changes we should make to allow it to work more seamlessly with the Google
> Eclipse Plugin. I've read the relevant issues and groups postings, so I
> think I have a rough idea of what needs to happen. However, before we go and
> make any changes, I wanted to ask for the community's advice.  So, here are
> some questions for you.
>
> What is the typical workflow of a GWT developer using Maven?
>
> I've installed Maven and the gwt-maven-plugin 1.2-SNAPSHOT and managed to
> create a GWT 2.0 app with the provided archetype. After some tweaking, I'm
> able to GWT compile, debug with Eclipse (though not via our Web App launch
> configuration), create a WAR, etc. However, I'm more interested in how you all
> are doing things. For example:
>
> How do you...
>
>    - Create a new project?
>    - Perform GWT compiles?
>    - Debug with Eclipse?
>    - Run your tests?
>    - Create a WAR for deployment?
>
> What specific pain points do Maven users run into when using the Google
> plugin?
>
> I know one major obstacle is that our plugin currently treats the war
> directory as both an input (e.g. static resources, WEB-INF/lib,
> WEB-INF/web.xml) and output (WEB-INF/classes, GWT artifacts like nocache.js
> and hosted.html) . Maven convention, however, says that /src/main/webapp
> should be input only, which means that hosted mode (or development mode, in
> GWT 2.0) needs to run from a staging directory (e.g. gwt:run creates a /war
> folder on demand). This mismatch results in the plugin creating spurious
> validation errors and breaks our Web App launch configuration.
>
> Another incompatibility is that Maven projects depend on the GWT Jars in the
> Maven repo, whereas our plugin expects to always find a GWT SDK library on
> the classpath.
>
> Are my descriptions of these pain points accurate?  If so, one possible
> solution would be for the plugin to allow the definition of an input war
> directory (e.g. src/main/webapp) separate from a launch-time staging
> directory, and for us to relax the requirement that all GWT projects must
> have a GWT SDK library.  So tell me: would these changes adequately reduce
> the friction between Maven and the Google plugin?
>
> Also, are there other problems Maven users are running into when using the
> plugin?
>
> Thanks in advance for all feedback,
>
> Keith, on behalf of the Google Plugin for Eclipse team

-- 
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-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to