building a GWT project with fails due to dependency on GWT 2.4.0 (at least 2.5.0-rc1 required)

1,126 views
Skip to first unread message

koma

unread,
Aug 31, 2012, 3:03:23 PM8/31/12
to google-we...@googlegroups.com
Hi

I am trying to build a GWT project that is on github with maven, but I run into an error saying that the maven plugin requires at least 2.5.0-rc1 ... is that so ?


Can somebody shed some light on what might be going wrong locally for me, the project owner does not suffer from this problem.

My environment :

Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: /home/koen/apache-maven-3.0.4
Java version: 1.6.0_31, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/jdk1.6.0_31/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-29-generic", arch: "amd64", family: "unix"

This is the error that maven spits out :

[WARNING] You're project declares dependency on gwt-user 2.4.0. This plugin is designed for at least gwt version 2.5.0-rc1
[WARNING] Don't declare gwt-dev as a project dependency. This may introduce complex dependency conflicts
[WARNING] You're project declares dependency on gwt-user 2.4.0. This plugin is designed for at least gwt version 2.5.0-rc1
[ERROR] Unknown argument: -XfragmentCount
[ERROR] Google Web Toolkit 2.4.0
[ERROR] Compiler [-logLevel level] [-workDir dir] [-gen dir] [-style style] [-ea] [-XdisableClassMetadata] [-XdisableCastChecking] [-validateOnly] [-draftCompile] [-optimize level] [-compileReport] [-strict] [-localWorkers count] [-war dir] [-deploy dir] [-extra dir] module[s] 

PS: did I mention I hate maven for always being so self righteous...?

koma

unread,
Aug 31, 2012, 3:13:58 PM8/31/12
to google-we...@googlegroups.com
I can see I have two mvn plugins in my .m2 repo :

./org/codehaus/mojo/gwt-maven-plugin/2.4.0
 and
./org/codehaus/mojo/gwt-maven-plugin/2.5.0-rc1

How do I tell maven from taken the correct one ?
I guess that is just basic maven usage knowledge but ant never troubled me with this kind of @#!! (dirty words).

koma

unread,
Aug 31, 2012, 3:25:08 PM8/31/12
to google-we...@googlegroups.com
adding this :

<plugin>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.4.0</version>
</plugin>

to the plugin section, does not help.

Still seeing this :

[INFO] --- gwt-maven-plugin:2.5.0-rc1:compile (default) @ chosen-sample ---


MFG !!! (you do not want to know what that acronym means !)

Hilco Wijbenga

unread,
Aug 31, 2012, 3:36:17 PM8/31/12
to google-we...@googlegroups.com
On 31 August 2012 12:13, koma <ko...@koma.be> wrote:
> I can see I have two mvn plugins in my .m2 repo :
>
> ./org/codehaus/mojo/gwt-maven-plugin/2.4.0
> and
> ./org/codehaus/mojo/gwt-maven-plugin/2.5.0-rc1
>
> How do I tell maven from taken the correct one ?

The plugin version for the GWT Maven plugin isn't properly locked down
in the POM. In fact, nothing has been locked down. Without locking
down versions these are the problems you get.

Hilco Wijbenga

unread,
Aug 31, 2012, 3:37:30 PM8/31/12
to google-we...@googlegroups.com
On 31 August 2012 12:25, koma <ko...@koma.be> wrote:
> adding this :
>
> <plugin>
> <artifactId>gwt-maven-plugin</artifactId>
> <version>2.4.0</version>
> </plugin>
>
> to the plugin section, does not help.

Add the groupId?

koma

unread,
Aug 31, 2012, 3:40:58 PM8/31/12
to google-we...@googlegroups.com
Hi Hilco,

thx for the advice ...

I am anything but a maven expert, this is a 3rd party project I am trying to include.

Can you give me some pointers on how to do that ?

or a sample of a GWT maven project done right ?

Abraham Lin

unread,
Aug 31, 2012, 4:28:40 PM8/31/12
to google-we...@googlegroups.com
In sample/pom.xml, add the following after line 34 (after "<artifactId>gwt-maven-plugin</artifactId>"):

<version>${gwtversion}</version>

Then add the following between "</plugins>" and "</build>" (following line 71 after the first step):

<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</pluginManagement>

These are problems with the POM and should be fixed in the original project.

-Abraham

koma

unread,
Sep 1, 2012, 4:28:50 AM9/1/12
to google-we...@googlegroups.com
@abraham, @hilco

Thx guys, that did the trick !!
Reply all
Reply to author
Forward
0 new messages