pombreda / gwt-maven

Automatically exported from code.google.com/p/gwt-maven
0 stars 1 forks source link

gwt goal does not support runtime dependencies #206

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Is this Maven 1 or Maven 2?
Maven2

What steps will reproduce the problem?
1. Add a dependency to your project that is only needed at runtime. (e.g. 
com.mysql.jdbc.Driver)
2. mvn googlewebtoolkit2:gwt
3. started server can not connect to database now.
Of course because the GWTMojo has compile dependency resolution defined.
This should be changed to runtime.

Index: src/main/java/com/totsp/mavenplugin/gwt/GWTMojo.java
===================================================================
--- src/main/java/com/totsp/mavenplugin/gwt/GWTMojo.java    (revision 
1020)
+++ src/main/java/com/totsp/mavenplugin/gwt/GWTMojo.java    (working 
copy)
@@ -32,13 +32,13 @@
 /**
  * Runs the the project in the GWTShell for development.
  * 
- * Note that this goal is intended to be explicitly run from the command 
line 
- * (execute phase=), whereas other GWT-Maven goals are not (others happen 
as 
+ * Note that this goal is intended to be explicitly run from the command 
line
+ * (execute phase=), whereas other GWT-Maven goals are not (others happen 
as
  * part of the standard Maven life-cycle 
phases: "compile" "test" "install").
  * 
  * @goal gwt
  * @execute phase=install
- * @requiresDependencyResolution compile
+ * @requiresDependencyResolution runtime
  * @description Runs the the project in the GWTShell for development.
  * 
  * @author ccollins

What version of the product are you using? On what operating system?
com.totsp.gwt:maven-googlewebtoolkit2-plugin:2.0-beta26

Original issue reported on code.google.com by rlink7...@googlemail.com on 30 Apr 2009 at 12:54

GoogleCodeExporter commented 9 years ago
This is intentional in 2.0-beta26 and there was a lot of discussion (we went 
back and
forth on this). 

http://groups.google.com/group/gwt-maven/browse_thread/thread/11ec1f405cdb5883/f
2427351faee0df1?lnk=gst&q=2.0-beta24#f2427351faee0df1

Use provided and it should work (which is what a JDBC driver really is, not 
compile).
 As for future fix to add ALL provided/compile/runtime to the shell, we aren't making
any more changes to this plugin. 

See the Codehaus plugin and try it, if it doesn't work please report an issue 
there. 

http://mojo.codehaus.org/gwt-maven-plugin/1.0/

Original comment by charlie....@gmail.com on 1 May 2009 at 3:24