From: Andrew H. <ahh...@gm...> - 2010-07-05 13:29:21
|
Hey, thanks heaps for looking at it :) The reason for using a multi module project is because it is multi module :) In the case of gwt-openlayers there are conceptually two modules gwt-openlayers and gwt-openlayers-showcase. The two modules have a relationship (hence why they are grouped in one (parent) project). You will find that ./gwt-openlayers-showcase/pom.xml has the following dependency... <http://gwt-openlayers.hg.sourceforge.net/hgweb/gwt-openlayers/gwt-openlayers/file/46f69b5f9bd5/gwt-openlayers-showcase/pom.xml#l14> <dependencies> <http://gwt-openlayers.hg.sourceforge.net/hgweb/gwt-openlayers/gwt-openlayers/file/46f69b5f9bd5/gwt-openlayers-showcase/pom.xml#l15> <dependency> <http://gwt-openlayers.hg.sourceforge.net/hgweb/gwt-openlayers/gwt-openlayers/file/46f69b5f9bd5/gwt-openlayers-showcase/pom.xml#l16> <groupId>${project.groupId}</groupId> <http://gwt-openlayers.hg.sourceforge.net/hgweb/gwt-openlayers/gwt-openlayers/file/46f69b5f9bd5/gwt-openlayers-showcase/pom.xml#l17> <artifactId>gwt-openlayers</artifactId> <http://gwt-openlayers.hg.sourceforge.net/hgweb/gwt-openlayers/gwt-openlayers/file/46f69b5f9bd5/gwt-openlayers-showcase/pom.xml#l18> <version>${project.version}</version> <http://gwt-openlayers.hg.sourceforge.net/hgweb/gwt-openlayers/gwt-openlayers/file/46f69b5f9bd5/gwt-openlayers-showcase/pom.xml#l19> </dependency> The predecessor managed the relationship by copying the jar into ./lib and launching the showcase as an eclipse project. There is no need to maually build and copy something into the lib dir with maven multi module projects. Maven's dependency management and build lifecycle does this for you. There are a few flaws with doing this manually... - You can modify gwt-openlayers and break the showcase unknowingly. - gwt-openlayers and the showcase don't share the same lifecycle - The two projects/modules don't share a recognised configuration standard - Unit tests aren't run on both during a single lifecycle iteration - Releases should occur atomic for both modules/projects (as they are linked) - Documentation should be linked (normally to the release) - The readme, is now deprecated by common practice :) - The gwt-openlayers-showcase now demonstrates how to consume gwt-openlayers in a maven project (but you could argue this to be totally irrelevant). Cheers :) p.s. I still have to get my head around GAE+Maven and SourceForge+Maven site:deploy. On Mon, Jul 5, 2010 at 10:28 PM, Couzic Mikael <mik...@gm...>wrote: > Hi Andrew, > > > I've tried the new structure and it is definitively an improvement ! > > However, I don't understand the use of a multi-module project (I've never > used it myself). Intuitively I pictured 2 different projects, the showcase > depending on the lib. What are the benefits of the multi-module approach ? > > > Mikael Couzic > > > > 2010/6/30 Andrew Hughes <ahh...@gm...> > >> Hi Guys, >> >> I made some rather large changes to the structure of the project to >> support maven multi module structure (including the existing showcase). >> Currently this is committed against a named branch 'trac_ticket_48' which I >> have pushed up the the server. >> >> All appears to work well. If anyone wants to try this out you will need... >> >> swtich to the branch >> >> hg update trac_ticket_48 >> >> Then you should be able to do a complete build from maven.... >> >> mvn install >> >> and run the developer mode showcase... >> >> cd gwt-openlayers-showcase >> mvn gwt:run >> >> >> If you want to work with this in eclipse, then you will need the m2eclipse >> plugin and File -> Import Project -> Maven -> Existing Maven Project. But >> you will no doubt have this setup already for the (now pre-dated) >> gwt-showcase project ;) >> >> >> Please give feedback. >> >> >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Sprint >> What will you do first with EVO, the first 4G phone? >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >> _______________________________________________ >> Gwt-openlayers-devl mailing list >> Gwt...@li... >> https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-devl >> >> > |