-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi there,
Geoffrey wrote: > I have a parent pom.xml like this: > > <groupId>y</groupId> > <artifactId>x</artifactId> > <packaging>pom</packaging> > <version>0.0.1-SNAPSHOT</version> > > <modules> > <module>thot-model</module> > <module>thot-serviceapi</module> > </modules> > > <dependencyManagement> > <dependencies> > <dependency> > <groupId>y</groupId> > <artifactId>x-model</artifactId> > <version>0.0.1-SNAPSHOT</version> > </dependency> > <dependency> > <groupId>y</groupId> > <artifactId>x-serviceapi</artifactId> > <version>0.0.1-SNAPSHOT</version> > </dependency> > </dependencies> > </dependencyManagement> > > And each child pom.xml like: > > <parent> > <groupId>y</groupId> > <artifactId>x-serviceapi</artifactId> > <version>0.0.1-SNAPSHOT</version> > </parent> > > <dependencies> > <dependency> > <groupId>y</groupId> > <artifactId>x-model</artifactId> > </dependency> > </dependencies> > > 1) Is there a way to minimize the number of times I need to specify the > version "0.0.1-SNAPSHOT" of my multiproject? > Ideally it should only use it on one spot: in the parent pom.xml > In dependencyManagement I can lower it by using ${pom.version}, > but for referencing the parent pom this does not look like an option. I prefer that each (sub-)project has its own versioning cycle. Anyways this is a very common issue. If you have eclipse 3.1 all subprojects (internal plugins, etc.) also have 3.1 as version. However I do not know how to solve your Issue. > > 2) Why do I need to add my modules as dependencies in the first place? > It would be nice if the parent pom is smart enough to add all it's > modules as possible dependencies automatically. Actually this was done in maven-1 and it sucked as I think! 1. you have to configure where to find your sub-projects anyways because one does put them on toplevel, another one want to have a folder subprojects where the subprojects resist, etc. 2. with maven-1 you do not have the ability to determine what subprojects exists just from the pom. 3. with maven-1 you can not build your project (e.g. site) if you have a subproject that is currently not compiling - maybe it is a subproject that has just started and is not officially part of the project. Regards Jörg -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDj2npmPuec2Dcv/8RAhT2AJ4p6Ejsh+wa0ky+mgpn+9GJ6kHzGwCgmP82 rS4sR43KbjCiEb67ZXRRnxo= =uRKn -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]