Closed GoogleCodeExporter closed 9 years ago
I'm not a maven expert so correct me if I'm wrong.
mvp4g dependency to GWT is set as "provided", which means that adding mvp4g to
your dependencies, doesn't add gwt. You need to add it manualy.
Could your issue be fixed by adding GWT 2.4.0 dependency to your project?
Original comment by plcoir...@gmail.com
on 6 Oct 2011 at 2:42
"mvp4g dependency to GWT is set as provided"
is not true as for as if found in mvp4g POM.xml as found in maven central.
This request is actually to update the POM.xml to do exactly what you say, to
have "GWT version dependency" specified by my project rather than being
hard-coded into the mvp4g lib POM.
Take a look at the mvp4g 1.3.1 POM.xml which has been uploaded to maven central.
Setting the gwt version property to 2.4.0 on my project POM does not override
the version 2.2.0 GWT jars that would get pulled in to my project. My project
ends up with having both GWT 2.2.0 jars and 2.4.0 jars.
Original comment by BlessedGeek
on 6 Oct 2011 at 7:19
I doubled check but the dependency is set as provided:
http://search.maven.org/remotecontent?filepath=com/googlecode/mvp4g/mvp4g/1.3.1/
mvp4g-1.3.1.pom
Could something be wrong with the pom you downloaded?
Original comment by plcoir...@gmail.com
on 7 Oct 2011 at 2:13
http://search.maven.org/remotecontent?filepath=com/googlecode/mvp4g/mvp4g/1.3.1/mvp4g-1.3.1.pom has the line which forces dependency on gwt2.2.0.
<properties>
<gwt.version>2.2.0</gwt.version>
</properties>
My project wants gwt 2.4.0. So now I have both 2.2.0 jars and 2.4.0 jars, which
confuses my gwt compilation.
Original comment by BlessedGeek
on 7 Oct 2011 at 2:11
Further down that POM is dependency on hard-coded property ${gwt.version}
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.gwt.inject</groupId>
<artifactId>gin</artifactId>
<version>1.5.0</version>
</dependency>
</dependencies>
Original comment by BlessedGeek
on 7 Oct 2011 at 6:28
The property is just an easy way to set all gwt dependency to the same version.
In the pom, gwt-user and gwt-dev dependencies are set as 'provided'. According
to the
[http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanis
m.html#Dependency_Scope maven documentation], your project has to set its own
gwt jars.
Original comment by plcoir...@gmail.com
on 7 Oct 2011 at 8:41
Why does it happen so that when I have mvp4g on maven, I encounter gwt
compilation error - where it complains I might have forgotten to include an
inheritance or class not found eror.
But when, without change of code, I disabled maven dependency in my eclipse
project but depended on the jars directly - I compiled without errors?
Original comment by BlessedGeek
on 9 Oct 2011 at 1:59
sorry for the late reply.
Inside your maven pom configuration file, did you set the gwt version to the
same value as the eclipse plugin?
When you say, you have compilation error, is it inside eclipse?
Original comment by plcoir...@gmail.com
on 11 Oct 2011 at 10:04
In my project pom:
<properties>
<gwt.version>2.4.0</gwt.version>
</properties>
Do you think that would override gwt.version in mvp4g's pom? It did not seem to.
Original comment by BlessedGeek
on 14 Oct 2011 at 7:49
This change will not affect mvp4g pom.
Do you have GWT dependencies in your project pom?
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>2.4.0</version>
</dependency>
Original comment by plcoir...@gmail.com
on 17 Oct 2011 at 9:22
I've finally got this issue resolved ...
The effective maven hierarchy kept pulling in gwt-servlet 2.2.0 not directly
due to mvp4g but due to gin 1.5.0 hard-specifying gwt-servlet 2.2.0.
I had to specifically place a maven dependency
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwt.version}</version>
</dependency>
Otherwise, my client was interpreting RPC thro 2.4.0 while my server was
emitting encoding thro 2.2.0 causing some unserializable exceptions.
Original comment by BlessedGeek
on 9 Feb 2012 at 2:28
Thanks for the feedback. I'll close the issue.
Original comment by plcoir...@gmail.com
on 10 Feb 2012 at 3:37
Original issue reported on code.google.com by
BlessedGeek
on 6 Oct 2011 at 1:37