2.0-beta22 Released (new version of M2 plugin, all kinds of new/updated stuff)

7 views
Skip to first unread message

Charlie Collins

unread,
Sep 7, 2008, 6:33:46 AM9/7/08
to gwt-maven
New version, with a lot of refactoring, and fixes for many issues, is
now available in the repo:
http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/com/totsp/gwt/maven-googlewebtoolkit2-plugin/2.0-beta22/

This version
1. Works with GWT 1.5.2 from central repo
2. Does the "automatic" mode processing differently, using the
dependency plugin
3. Has rewritten GWTTestCase support (which does script writing like
other mojos)
4. Has I18N support
5. Was refactored to remove a lot of duplicated code and use a few
interfaces and abstract classes and such so it is easier to understand
and work with when you are looking at the source
6. Addresses about 15 or so issues from the tracker
7. Does NOT supoort the bean generation stuff anymore (there were too
many issues, and we no longer have a maintainer for that - so it is
gone until further notice - if the maintainer comes back, or someone
else wants to volunteer - and we address all the issues [see tracker]
then it will be back).

This version was based on all the work and input done in the recent
refactoring branch: http://groups.google.com/group/gwt-maven/browse_thread/thread/83664ca88a1211e8.
Thanks to Mirko and Arthur, and others for help and testing, etc.

Check out the docs: http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/index.html.
(I am pretty proud of the docs ;) - we now have some that use the
Maven standard, with all goals and properties, source xref, javadocs,
and from there we expand on what it provides a bit.)

Also the samples are updated to use the new version:
http://gwt-maven.googlecode.com/svn/trunk/maven-googlewebtoolkit2-plugin/simplesample/
http://gwt-maven.googlecode.com/svn/trunk/maven-googlewebtoolkit2-sample/

If you find issues, please note them here and via the tracker.

thanks

Mirko Nasato

unread,
Sep 7, 2008, 10:04:17 AM9/7/08
to gwt-...@googlegroups.com
Great news!  So tomorrow I can switch our projects back to use an official gwt-maven release, rather than the snapshot I deployed internally as a temporary measure. ;-)

2008/9/7 Charlie Collins <charlie...@gmail.com>

Charlie Collins

unread,
Sep 7, 2008, 8:00:55 PM9/7/08
to gwt-maven
Yep, let's put this one through the paces. After some time of using
this one I am hoping we will find out it's pretty stable, and then we
will make a non beta release (hopefully). Once that happens, I will
then push to get GWT-Maven itself in the central repo.

As usual, please report any issues - and patches are welcome ;).

(One last thing I should have noted before, 2.0-beta22 is NOT backward
compatible, you will have to update your POMs to use it - I know Mirko
know this, I am just adding it for general info for everyone else.)

On Sep 7, 10:04 am, "Mirko Nasato" <mirko.nas...@gmail.com> wrote:
> Great news!  So tomorrow I can switch our projects back to use an official
> gwt-maven release, rather than the snapshot I deployed internally as a
> temporary measure. ;-)
>
> 2008/9/7 Charlie Collins <charlie.coll...@gmail.com>
>
>
>
> > New version, with a lot of refactoring, and fixes for many issues, is
> > now available in the repo:
>
> >http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/com/totsp/gwt/mav...
>
> > This version
> > 1. Works with GWT 1.5.2 from central repo
> > 2. Does the "automatic" mode processing differently, using the
> > dependency plugin
> > 3. Has rewritten GWTTestCase support (which does script writing like
> > other mojos)
> > 4. Has I18N support
> > 5. Was refactored to remove a lot of duplicated code and use a few
> > interfaces and abstract classes and such so it is easier to understand
> > and work with when you are looking at the source
> > 6. Addresses about 15 or so issues from the tracker
> > 7. Does NOT supoort the bean generation stuff anymore (there were too
> > many issues, and we no longer have a maintainer for that - so it is
> > gone until further notice - if the maintainer comes back, or someone
> > else wants to volunteer - and we address all the issues [see tracker]
> > then it will be back).
>
> > This version was based on all the work and input done in the recent
> > refactoring branch:
> >http://groups.google.com/group/gwt-maven/browse_thread/thread/83664ca...
> > .
> > Thanks to Mirko and Arthur, and others for help and testing, etc.
>
> > Check out the docs:
> >http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plug...
> > .
> > (I am pretty proud of the docs ;) - we now have some that use the
> > Maven standard, with all goals and properties, source xref, javadocs,
> > and from there we expand on what it provides a bit.)
>
> > Also the samples are updated to use the new version:
>
> >http://gwt-maven.googlecode.com/svn/trunk/maven-googlewebtoolkit2-plu...
> >http://gwt-maven.googlecode.com/svn/trunk/maven-googlewebtoolkit2-sam...

jens....@googlemail.com

unread,
Sep 8, 2008, 8:05:31 AM9/8/08
to gwt-maven
hi guys,

first of all great work!! :)

today i switched from 2.0-beta-20 to beta-22, but have some strange
issues... but now anyhing works - especially the GwtTestCase (thats
really great)

i found some little mistakes in the new documentation

on the page:

http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/setup.html

you write "<gwtVersion>1.5.1</gwtVersion>" on any other page it is
<gwtVersion>${gwtVersion}</gwtVersion>

i know you spend a lot of time to create the, really nice, new
documentation.... but i think a migration-guide from version to
version would also be a nice thing - i have searched hours to find a
failure in my pom

in beta-20 the compileTarget option is named

<compileTargets>
<param>_module_path_</param>
</compileTargets>

and in beta-22 it is names

<compileTargets>
<value>_module_path_</value>
</compileTargets>

the strange thing is, if i start the simplesample application with
"mvn gwt:gwt" and then start my own app with "mvn gwt:gwt" anything
works, but if i clean up my local repository and start my own app i
get an NullPointerException

and on the same page in the automatic setup section you write

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>package</phase>
........
</plugin>

but in the simplesample it is

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>compile</phase>
........
</plugin>

if i use the <phase>package</phase> option i also get an nullpointer
exception :/


but how i mentioned before now anythings works and am going on to use
the beta-22 - with GwtTestCases - WOHOO!!! :D

jens

Charlie Collins

unread,
Sep 8, 2008, 9:49:31 AM9/8/08
to gwt-maven
I didn't know about the <param> vs <value> thing, I will look into
that.

As for the unpacking phase, yes, it should be compile (I originally
had it unpack, and ran into errors myself) - I will update the
documentation ASAP.
I will also update the other doc inconsistency you noted.

On Sep 8, 8:05 am, "jens.me...@googlemail.com"
<jens.me...@googlemail.com> wrote:
> hi guys,
>
> first of all great work!! :)
>
> today i switched from 2.0-beta-20 to beta-22, but have some strange
> issues... but now anyhing works - especially the GwtTestCase (thats
> really great)
>
> i found some little mistakes in the new documentation
>
> on the page:
>
> http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plug...

Charlie Collins

unread,
Sep 8, 2008, 10:04:13 AM9/8/08
to gwt-maven
Docs updated in source, will get them republished later today (the big
one there is the "compile" phase for the dependency plugin, that's
essential).

Mirko Nasato

unread,
Sep 8, 2008, 10:43:34 AM9/8/08
to gwt-...@googlegroups.com
Hi Charlie,

In the sample configuration

  http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/examples.html

don't we need a <pluginRepositories> in addition to <repositories>? I had to add it to my pom.xml.

Also is the java.net repository really needed? At least gwt:compile works fine without it.

Thanks

Mirko


2008/9/8 Charlie Collins <charlie...@gmail.com>

Mirko Nasato

unread,
Sep 8, 2008, 10:52:13 AM9/8/08
to gwt-...@googlegroups.com
2008/9/8 Charlie Collins <charlie...@gmail.com>

I didn't know about the <param> vs <value> thing, I will look into
that.

I'm using <param> as before and it works fine.  Since the compileTargets property is a String[] I think Maven just expects some children inside <compileTargets>, the name is not important.  So either <param> or <value>, or <target> or even <foo> should work!

Cheers

Mirko

 

Charlie Collins

unread,
Sep 8, 2008, 3:21:57 PM9/8/08
to gwt-maven
AS to plugin repositories, yes, we probably do. I haven't cleared out
(or moved) my entire repo in a while, I will do that on a few
platforms to test.

I will also check if the java.net one is still needed. At one time it
was, due to some transitive dependency from the support jar or
something - but that may no longer be the case. On the other hand we
may need to ADD one for JDOM 1.1, last I checked (which was a few
weeks back), it still wasn't in central.

I am adding an issue for this, and will handle it when I can.

On Sep 8, 10:43 am, "Mirko Nasato" <mirko.nas...@gmail.com> wrote:
> Hi Charlie,
>
> In the sample configuration
>
> http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plug...
>
> don't we need a <pluginRepositories> in addition to <repositories>? I had to
> add it to my pom.xml.
>
> Also is the java.net repository really needed? At least gwt:compile works
> fine without it.
>
> Thanks
>
> Mirko
>
> 2008/9/8 Charlie Collins <charlie.coll...@gmail.com>

Charlie Collins

unread,
Sep 8, 2008, 3:23:29 PM9/8/08
to gwt-maven
I figured that any <thing> would work inside compile targets, just
thought I would check though based on the report here.

On Sep 8, 10:52 am, "Mirko Nasato" <mirko.nas...@gmail.com> wrote:
> 2008/9/8 Charlie Collins <charlie.coll...@gmail.com>

Charlie Collins

unread,
Sep 8, 2008, 7:17:24 PM9/8/08
to gwt-maven
Ok, after clearing out my local repo (renaming it) on a few machines
and trying from scratch I ran into a few serious issues.

I get a NullPointerException from the merge web xml stuff in the maven-
googlewebtoolkit2-sample project (the one with inheritance, not the
simplesample, actually the war sub-project specifically).

If I switch back my repo things work again, so something is missing
from a clean slate for the non simple sample - bad news. I tried to
troubleshoot it, but as usual with Maven, it's a nightmare. With the -
e and -X and so on I can see that the problem is ultimately this:

Caused by: java.lang.NullPointerException
at
org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:
296)
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:
194)
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:
73)
at
com.totsp.mavenplugin.gwt.util.BuildClasspathUtil.injectGwtDepsFromRepo(BuildClasspathUtil.java:
173)
at
com.totsp.mavenplugin.gwt.util.BuildClasspathUtil.buildClasspathList(BuildClasspathUtil.java:
75)
at
com.totsp.mavenplugin.gwt.AbstractGWTMojo.fixThreadClasspath(AbstractGWTMojo.java:
321)


But, I changed out the behavior of injectGwtDepsFromRepo a few times,
and verified in it that gwtDev and gwtUser are NOT null, and neither
is localRepository or resolver, and I still get the NPE from other
areas, back to DefaultWagonManager. Then if I look carefully at my X
output I see that I am using maven-artifact-plugin 2.0 - NOT 2.0.9 or
2.0.4 or whatever. Yet, I can't find a src xref for plain 2.0. All I
can get to is this:
http://maven.apache.org/ref/current/maven-artifact-manager/xref/org/apache/maven/artifact/manager/DefaultWagonManager.html.
It says "// TODO [BP]: The exception handling here needs some work" in
the neighborhood, but I can't really tell exactly what the error is,
yet. Don't get me wrong, I am sure it's something stupid I AM DOING,
somewhere, but I Maven just makes me want to stab a pencil in my eye
sometimes when it comes to chasing things down.

When I get a chance I will compare what's different between the repos
and try to figure it out more - and run Maven in a debugger. For now,
FYI - the new version does have some issues in some scenarios.

Charlie Collins

unread,
Sep 8, 2008, 7:51:38 PM9/8/08
to gwt-maven
I found my missing dependency issue, and it was my own stupidity - too
bad Maven isn't smart enough to just tell me HOW I am being
stupid ;).

The deal is thus, if you get strange NPEs, make sure your gwtVersion
in the maven-googlewebtoolkit2-plugin configuration MATCHES what your
dependencies are. In the sample project gwtVersion was NOT SET AT
ALL, and the DEFAULT is 1.5.1. The deps were set to 1.5.2. This
caused the injection mechanism to find the 1.5.2,s but somehow cause
an NPE deep inside of Maven during the resolve phase (I am checking
all sorts of ways to determine if dep is not there and send a useful
error message, etc, dep IS there, long story).

So, for now, I am updating the site docs and so on (along with the
other fixes to docs noted in this thread). MAKE SURE your gwtVersion
that you pass to plugin config matches the version you use for the
deps, or bad things happen. In this case all I had to do was add a
gwtVersion section to the plugin config for 1.5.2, and it worked.

In the future I will try to make the error handling more robust (tell
you what's missing), but I think this one is more on the Maven side
than the GWT-Maven side.

The good news is, nothing is really broken with the plugin itself
(and, I also updated the default version to 1.5.2 in source, so next
rev will have that).

I will be publishing new docs later tonight.
> can get to is this:http://maven.apache.org/ref/current/maven-artifact-manager/xref/org/a....
> ...
>
> read more »

jens.meiss

unread,
Sep 9, 2008, 10:23:43 AM9/9/08
to gwt-maven
hi i found another two verry simple issues :)

i think there should be a space between "gwt-dev-1.5.2-windows-
libs.zip" and "to" in this message:

[INFO] Unpacking .../com/google/gwt/gwt-dev/1.5.2/gwt-dev-1.5.2-
windows-libs.zipto
..../com/google/gwt/gwt-dev/1.5.2

and is it really needed that the gwt-dev-windows files are
<activeByDefault>true</activeByDefault> ?? or is this just another
mistake in the documentation?? :)

i found this on the setup page, in the "Automatic Mode Setup" section,
where you describe the profile configuration

http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/setup.html

jens
> ...
>
> Erfahren Sie mehr »

Charlie Collins

unread,
Sep 9, 2008, 12:54:25 PM9/9/08
to gwt-maven
I noticed that mistake with the "to" also - but thats the dependency
plugin doing all that work, nothing to do with GWT-Maven.

As for the windows being active by default, nope, doesn't have to be,
but one of them can be, I just picked windows because I figured most
people use that (I use Linux and OS X, and it works fine, even when
windows is the default - the idea is the activation will establish the
correct one as needed, regardless of which is active "by default").

On Sep 9, 10:23 am, "jens.meiss" <jens.me...@googlemail.com> wrote:
> hi i found another two verry simple issues :)
>
> i think there should be a space between "gwt-dev-1.5.2-windows-
> libs.zip" and "to" in this message:
>
> [INFO] Unpacking .../com/google/gwt/gwt-dev/1.5.2/gwt-dev-1.5.2-
> windows-libs.zipto
>  ..../com/google/gwt/gwt-dev/1.5.2
>
> and is it really needed that the gwt-dev-windows files are
> <activeByDefault>true</activeByDefault> ?? or is this just another
> mistake in the documentation?? :)
>
> i found this on the setup page, in the "Automatic Mode Setup" section,
> where you describe the profile configuration
>
> http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plug...
> ...
>
> read more »

Jeff Bowman

unread,
Sep 9, 2008, 2:22:49 PM9/9/08
to gwt-maven
Does this include an updated version of the archetype?

On Sep 7, 5:33 am, Charlie Collins <charlie.coll...@gmail.com> wrote:
> New version, with a lot of refactoring, and fixes for many issues, is
> now available in the repo:http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/com/totsp/gwt/mav...
>
> This version
> 1. Works with GWT 1.5.2 from central repo
> 2. Does the "automatic" mode processing differently, using the
> dependency plugin
> 3. Has rewritten GWTTestCase support (which does script writing like
> other mojos)
> 4. Has I18N support
> 5. Was refactored to remove a lot of duplicated code and use a few
> interfaces and abstract classes and such so it is easier to understand
> and work with when you are looking at the source
> 6. Addresses about 15 or so issues from the tracker
> 7. Does NOT supoort the bean generation stuff anymore (there were too
> many issues, and we no longer have a maintainer for that - so it is
> gone until further notice - if the maintainer comes back, or someone
> else wants to volunteer - and we address all the issues [see tracker]
> then it will be back).
>
> This version was based on all the work and input done in the recent
> refactoring branch:http://groups.google.com/group/gwt-maven/browse_thread/thread/83664ca....
> Thanks to Mirko and Arthur, and others for help and testing, etc.
>
> Check out the docs:http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plug....
> (I am pretty proud of the docs ;) - we now have some that use the
> Maven standard, with all goals and properties, source xref, javadocs,
> and from there we expand on what it provides a bit.)
>
> Also the samples are updated to use the new version:http://gwt-maven.googlecode.com/svn/trunk/maven-googlewebtoolkit2-plu...http://gwt-maven.googlecode.com/svn/trunk/maven-googlewebtoolkit2-sam...

Charlie Collins

unread,
Sep 9, 2008, 4:37:11 PM9/9/08
to gwt-maven
Nope, it does not. The archetype has been ancient for quite some
time, but there is an issue in the tracker to update it (just haven't
gotten to it). Contributors and patches, etc, are welcome.
> > Also the samples are updated to use the new version:http://gwt-maven.googlecode.com/svn/trunk/maven-googlewebtoolkit2-plu......

Arthur Kalmenson

unread,
Sep 10, 2008, 9:25:30 AM9/10/08
to gwt-maven
Will there be separation between GWT code and regular Java code right?
This separation should especially be in the test cases.

There are a number of use cases where you have code that runs both on
the client and on the server (domain objects is one example). There
are also other use cases where there is client side code that is not
directly tied to GWT widgets (for example, following the MVC pattern
on the client side would only see GWT code in the View, but the
Controller and Model will be reusable).

In these cases, a separation between GWTTestCases and regular test
cases is a must. I frequently use TestNG, EasyMock and other testing
tools to test client side business logic that does not directly use
GWT widgets. If there is no separation between them in the archetype,
the GWT compiler will try to compile the non GWTTestCase code and
fail.

I don't know if I'm being very clear, let me know if it's confusing. I
can post this comment on the issue tracker as well (and maybe help out
too :P).

Regards,
Arthur Kalmenson

On Sep 9, 4:37 pm, Charlie Collins <charlie.coll...@gmail.com> wrote:

Charlie Collins

unread,
Sep 10, 2008, 12:41:07 PM9/10/08
to gwt-maven
There is a separation on test cases, if that is what you mean?

http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/testing.html

The GWTTestCase ones, which are only relative to CLIENT SIDE /
translatable model and controller (not even UI frankly, but that is a
point of debate with some), whether or not shared, use the "gwtFilter"
property to be separated - the default is prefix "GwtTest*". Standard
test cases use suffix *Test".

Not sure if that's what you mean, but that is how the testing support
differentiates.

Arthur Kalmenson

unread,
Sep 11, 2008, 8:46:16 AM9/11/08
to gwt-maven
Yep, that's what I meant. This is great! I'm starting several new
projects and I look forward to using gwt-maven to its full potential.
Thanks Charlie!

Regards,
Arthur Kalmenson

On Sep 10, 12:41 pm, Charlie Collins <charlie.coll...@gmail.com>
wrote:
> There is a separation on test cases, if that is what you mean?
>
> http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plug...
Reply all
Reply to author
Forward
0 new messages