How to be productive in a multimode GWT Maven project

I have a large Maven project with several modules, where the small part is the web GUI created in GWT. I use, but I'm not sure how to make my development effective.

I am currently starting host mode when developing materials that are in the GWT project, and if I change something here, I can instantly see the changes when the page reloads. But if something has changed in the maven modules that contain most of the backend logic, I need to do mvn:install for the entire project structure and do gwt:run to start the placement mode again. A lot of time...

I tried following these instructions: http://mojo.codehaus.org/gwt-maven-plugin/user-guide/project.html#Multi-project_setup , but it does not work properly.

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

+7
source share
4 answers

If you use Eclipse and m2eclipse , you can configure your project to define dependencies from the workspace . To quote from the m2eclipse manual:

You can configure the project to resolve dependencies from the workspace. This leads to a change in the way Maven finds dependency artifacts. If the project is configured to resolve dependencies from the workspace, these artifacts should not be present in your local repository

With this setting, there is no need to call mvn:install for related modules. I used this setting in conjunction with JRebel to get instantly reloading classes in multi-module maven projects for quite some time.

+4
source

Workspace dependency resolution does not work for me.

My solution: manually add backend project dependency on startup configuration.

+1
source

The maven related submodules are library dependencies that should be in the WEB-INF / lib directory. The reason you need to run mvn: install at the top level is because you need to restore the jar when it creates the corresponding submodule, and then copy it to the WEB-INF / lib directory when the war package is being drafted.

If you can come up with a way to make your IDE or some other tool automatically update the JAR in the WEB-INF / lib directory, then you should be fine. You can try to compile your IDE your related project as a disparate JAR structure in the WEB-INF / lib directory. This will depend on your web container, whether it is selected or not. I think Tomcat will probably be okay with this, but I'm not sure about Jetty. I am going to try it myself soon.

0
source

I had the same problem, I created a "proxy" plugin for gwt-maven-plugin.

You can check it here https://github.com/xptdev/modgwt-maven-plugin

0
source

All Articles