geosolutions-it / geobatch

Open Source GeoSpatial Processing Simplified
GNU General Public License v3.0
22 stars 19 forks source link

Make GUI files reusable in customized GeoBatch modules #197

Open etj opened 11 years ago

etj commented 11 years ago

At the moment, when creating a custom GB build, the src/webapp files have to be copied manually in the new module. We need a way to automatically import the original files from geobatch web app module.

etj commented 11 years ago

The idea is to use maven overlays, and then split the main geobatch .war in two:

etj commented 11 years ago

In src/gui there are only the MVC controllers. Would be a good idea to merge this stuff into the core GUI module.

etj commented 11 years ago

Changes committed in this branch: https://github.com/geosolutions-it/geobatch/tree/issue197-web-core-refactor Please test.

etj commented 11 years ago

Some new work on https://github.com/geosolutions-it/geobatch/tree/issue197-web-core-refactor-2, rebased on current master.

Now the produced WAR should be fine, the webapp can be run with

   mvn jetty:run-exploded

and can be run using Start.java both from NB and Eclipse.

Since running Start.java was loading the required libs both from WEB-INF/lib and from the mvn classpath, creating so dup issues, a new ClassLoader has been implemented that skips libs from WEB-INF.

Please note that while NB loads dependant libs from .m2/repository, Eclipse may use the files in the target/ directory of depending projects if they are in the current working set. The implemented solution should work in both cases.