Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to be productive in a GWT Maven multi module project

I've got a big multi module Maven project where a small part is a web GUI made in GWT. I'm using but I'm not sure on how to make my development efficient.

Right now I'm running hosted mode when developing stuff that's in the GWT project, and if I change something here it, I'm able to see the changes instantly when reloading the page. But if something is changed in the maven modules that holds most of the backend logic, I need to do mvn:install on the whole project structure, and the do a gwt:run to launch the hosted mode again. Very time consuming...

I've tried to follow the instructions here: http://mojo.codehaus.org/gwt-maven-plugin/user-guide/project.html#Multi-project_setup but it doesn't work as expected.

Is it possible to instantly see the changes made in dependent maven modules, and if so - how should the pom files be written?

like image 699
thorseye Avatar asked Mar 08 '11 17:03

thorseye


2 Answers

If you are using Eclipse and m2eclipse you can configure your project to resolve dependencies from workspace. To quote from the m2eclipse manual:

You can configure a project to resolve dependencies from a workspace. This has the effect of altering the way that Maven locates dependency artifacts. If a project is configured to resolve dependencies from the workspace, these artifacts do not need to be present in your local repository

With this setup it there is no need to call mvn:install on related modules. I have been using this setup in combination with JRebel to get instant reloading of classes across multi-module maven projects for quite a while now.

like image 175
Thomas Avatar answered Oct 23 '22 14:10

Thomas


Resolving dependencies from the workspace doesnt work for me.

My solution : manually add the backend project dependency to the run configuration.

like image 21
averet Avatar answered Oct 23 '22 13:10

averet