gwt-maven-plugin woes

216 views
Skip to first unread message

cri

unread,
Apr 21, 2011, 12:39:35 PM4/21/11
to Google Web Toolkit
I'm trying to use gwt project generated by using the gwt-maven-plugin
archetype but don't very far. I feel I must be making a simple
mistake.

It would be great if maven support was provided directly by GWT.

Here is are the steps I followed with gwt-maven-plugin (from the gwt-
maven-plugin documentation):

1) Generate a gwt project as described here:
http://mojo.codehaus.org/gwt-maven-plugin/user-guide/archetype.html.
2) Import the project into eclipse using eclipse command "Import ->
Existing Maven Project". (I'm not sure that this is correct. There is
also an eclipse command "Import -> Existing Projects into Workspace.
Which is the correct command?)
3) Configure project to use GPE by checking checkbox at "Properties ->
Google -> Web Toolkit -> Use Google Web Toolkit".
4) Create a launch file running "gwt:eclipse". This creates a launch
file and copy it to ".metadata/.plugins/
org.eclipse.debug.core/.launches. as described here
http://mojo.codehaus.org/gwt-maven-plugin/user-guide/comfortable_debugging.html.
5) Restart eclipse.
6) Right click on the launch file created in step 4 and invoke "Debug
As.... -> <launch file name>".

At this point the launch fails with the info below.
It would be great if someone could help me get through this. Its
probably something simple that I'm not experienced enough to
recognize.

Launch failure info:

Missing required argument 'module[s]'
Google Web Toolkit 2.2.0
DevMode [-noserver] [-port port-number | "auto"] [-whitelist whitelist-
string] [-blacklist blacklist-string] [-logdir directory] [-logLevel
level] [-gen dir] [-bindAddress host-name-or-address] [-codeServerPort
port-number | "auto"] [-server servletContainerLauncher[:args]] [-
startupUrl url] [-war dir] [-deploy dir] [-extra dir] [-workDir dir]
module[s]

where
-noserver Prevents the embedded web server from running
-port Specifies the TCP port for the embedded web server
(defaults to 8888)
-whitelist Allows the user to browse URLs that match the
specified regexes (comma or space separated)
-blacklist Prevents the user browsing URLs that match the
specified regexes (comma or space separated)
-logdir Logs to a file in the given directory, as well as
graphically
-logLevel The level of logging detail: ERROR, WARN, INFO,
TRACE, DEBUG, SPAM, or ALL
-gen Debugging: causes normally-transient generated
types to be saved in the specified directory
-bindAddress Specifies the bind address for the code server and
web server (defaults to 127.0.0.1)
-codeServerPort Specifies the TCP port for the code server
(defaults to 9997)
-server Specify a different embedded web server to run
(must implement ServletContainerLauncher)
-startupUrl Automatically launches the specified URL
-war The directory into which deployable output files
will be written (defaults to 'war')
-deploy The directory into which deployable but not
servable output files will be written (defaults to 'WEB-INF/deploy'
under the -war directory/jar, and may be the same as the -extra
directory/jar)
-extra The directory into which extra files, not intended
for deployment, will be written
-workDir The compiler's working directory for internal use
(must be writeable; defaults to a system temp dir)
and
module[s] Specifies the name(s) of the module(s) to host
Reply
Forward

-sowdri-

unread,
Apr 23, 2011, 10:21:14 AM4/23/11
to google-we...@googlegroups.com
Steps to  create a new GWT project using Maven and GPE:
  1. Create new maven project using eclipse.
  2. User gwt-maven-plugin artifact while creating. 
  3. Now manually enable GWT (and GAE) for your project. 
Now you can use google development mode and compile options as usual, similar to your default ant project.  I've been using this for quite sometime and the integration is seamless. 

Thanks,
-sowdri-

cri

unread,
Apr 24, 2011, 12:52:10 PM4/24/11
to Google Web Toolkit
Update:

The problem was that the launch configuration created by the gwt-maven-
plugin was missing the module specification. Once I added this, the
app did come up when invoking "Run As/Web Application".

The current problem that I'm working on is that my app compiled for
web mode isn't coming up. Instead I get a dialog box saying the module
may need to be recompiled. Its looking like there are files missing
from the war file.

Wish me luck. Obviously, GPE/Eclipse functionality hasn't been very
well tested by the plugin developers.

On Apr 21, 11:39 am, cri <chuck.irvine...@gmail.com> wrote:
> I'm trying to use gwt project generated by using the gwt-maven-plugin
> archetype but don't very far. I feel I must be making a simple
> mistake.
>
> It would be great ifmavensupport was provided directly by GWT.
>
> Here is are the steps I followed with gwt-maven-plugin (from the gwt-maven-plugin documentation):
>
> 1) Generate a gwt project as described here:http://mojo.codehaus.org/gwt-maven-plugin/user-guide/archetype.html.
> 2) Import the project into eclipse using eclipse command "Import ->
> ExistingMavenProject". (I'm not sure that this is correct. There is
> also an eclipse command "Import -> Existing Projects into Workspace.
> Which is the correct command?)
> 3) Configure project to use GPE by checking checkbox at "Properties ->
> Google -> Web Toolkit -> Use Google Web Toolkit".
> 4) Create a launch file running "gwt:eclipse". This creates a launch
> file and copy it to ".metadata/.plugins/
> org.eclipse.debug.core/.launches. as described herehttp://mojo.codehaus.org/gwt-maven-plugin/user-guide/comfortable_debu....

cri

unread,
Apr 24, 2011, 5:46:44 PM4/24/11
to Google Web Toolkit
Update (final one I hope!):

After creating the initial project with the gwt-maven-plugin
archetype, it appears that you should not use "import... -> existing
maven projects" (which comes from m2eclipse I think). Instead, you
should use eclipse's native "import... -> existing projects into
workspace". In the latter case, the module specification will *not*
get left off program arguments when launching in debug mode.

mgira

unread,
Apr 23, 2011, 11:28:02 AM4/23/11
to Google Web Toolkit
It is quite simple,

just open the run configuration, change to the "Arguments" tab and
append the full path to module definition(s) to the "Program
arguments" field, omitting the .gwt.xml extension.

On 21 Apr., 18:39, cri <chuck.irvine...@gmail.com> wrote:
> I'm trying to use gwt project generated by using the gwt-maven-plugin
> archetype but don't very far. I feel I must be making a simple
> mistake.
>
> It would be great if maven support was provided directly by GWT.
>
> Here is are the steps I followed with gwt-maven-plugin (from the gwt-
> maven-plugin documentation):
>
> 1) Generate a gwt project as described here:http://mojo.codehaus.org/gwt-maven-plugin/user-guide/archetype.html.
> 2) Import the project into eclipse using eclipse command "Import ->
> Existing Maven Project". (I'm not sure that this is correct. There is
> also an eclipse command "Import -> Existing Projects into Workspace.
> Which is the correct command?)
> 3) Configure project to use GPE by checking checkbox at "Properties ->
> Google -> Web Toolkit -> Use Google Web Toolkit".
> 4) Create a launch file running "gwt:eclipse". This creates a launch
> file and copy it to ".metadata/.plugins/
> org.eclipse.debug.core/.launches. as described herehttp://mojo.codehaus.org/gwt-maven-plugin/user-guide/comfortable_debu....
Reply all
Reply to author
Forward
0 new messages