= Maven = || '''Date''' || 2010/03/25 || || '''Contact(s)''' || Mathieu, Francois || || '''Last edited''' || [[Timestamp]] || || '''Status''' || Draft || || '''Assigned to release''' || || || '''Resources''' || || || '''Ticket''' || || == Overview == At the Bolsena hacking event 2009, we decided to move from ant build to maven. [[PageOutline]] === Maven structure === GeoNetwork is divided in the following modules : [[Image(maven.png)]] === Major changes === * GeoServer : no more embedded in GeoNetwork (should be a dependency). * CSW client : removed * Jetty : removed and started using Maven (see Run the application) * Installer : TODO (Ant or assembly ?) * OAI-PMH dependencies * GAST : * GAST was using only the application path to load both resources and libs (from WEB-INF/lib). Added a libPath and an appPath. * Remove jetty and mckoi startup and init (see Open issues) * Current status : GAST could be used to create db (not mckoi ones) and load data once the catalogue is started. === Maven build === ==== Build the application ==== {{{ mvn clean install }}} ==== Packaging the application ==== GeoNetwork is distributed as WAR files (intermap.war and geonetwork.war) packaged by maven process. Assembly plugin is used to create a ZIP file with 2 required WAR files. {{{ mvn assembly:assembly }}} Assembly configuration is in release package. ==== Run the application ==== Maven plugins for Jetty or Cargo allows to quickly start the application after build. ===== War files ===== Publish war files created by maven to your favorite webapp directory (Tomcat, Jetty). ===== Maven plugin / Cargo ===== Cargo looks to be the best option to run the application (easily start more than one webapp). See : http://cargo.codehaus.org/ {{{ mvn cargo:start mvn cargo:stop }}} ===== Maven plugin / Jetty ===== {{{ mvn jetty:run }}} Current issue with jetty plugin is that we cannot run more than one application at a time (only geonetwork.war is started, not intermap.war). ==== Deploy the application ==== Deploy mechanism has been setup and tested with an scp connection to a remote server. We need to define where to create GeoNetwork repositories. {{{ maven deploy }}} ==== Create an eclipse workspace ==== {{{ mvn eclipse:eclipse }}} TODO : multiple project setup === Open issues === * GAST : * FIXME / hardcoded classpath in MANIFEST * What to do with GAST ? === Proposal Type === * '''Type''': Architecture * '''App''': !GeoNetwork * '''Module''': All === Links === * '''Email discussions''': * http://n2.nabble.com/Re-switch-to-maven-tp4569552p4569552.html * http://n2.nabble.com/Maven-tp4009861p4009861.html * '''IRC discussions''': === Voting History === * == Backwards Compatibility Issues == See open issues. == Risks == == Participants == * Francois * Mathieu * Maven experts very welcomed !