You must specify the version of the parent (can't use a property). However, you don't have to specify the version of the project, it will then use the version specified for the parent.
/Anders On Fri, Jan 7, 2011 at 23:48, Thomas Sundberg <[email protected]> wrote: > Hi! > > I'm trying to set up up a multi module project. > > My simple approach is this: > > <?xml version="1.0" encoding="UTF-8"?> > <project> > <modelVersion>4.0.0</modelVersion> > <groupId>se.sigma</groupId> > <artifactId>aggregation</artifactId> > <version>1.0</version> > <packaging>pom</packaging> > <modules> > <module>foo</module> > <module>bar</module> > </modules> > </project> > > ./foo: > <?xml version="1.0" encoding="UTF-8"?> > <project> > <modelVersion>4.0.0</modelVersion> > <parent> > <groupId>se.sigma</groupId> > <artifactId>aggregation</artifactId> > <version>${project.version}</version> > </parent> > <artifactId>foo</artifactId> > <packaging>jar</packaging> > </project> > > > ./bar: > <?xml version="1.0" encoding="UTF-8"?> > <project> > <modelVersion>4.0.0</modelVersion> > <parent> > <groupId>se.sigma</groupId> > <artifactId>aggregation</artifactId> > <version>1.0</version> > </parent> > <artifactId>bar</artifactId> > <packaging>jar</packaging> > </project> > > Setting up a module like bar works fine. Refering to the parent as I > do i foo fails with the following error: > > Non-resolvable parent POM: Failure to find > se.sigma:aggregation:pom:${project.version} > > Does anybody have any suggestion on how I can refer to a parent with a > property for the version? The version of the module should be the same > as the version of the parent. > > /Thomas > > -- > Thomas Sundberg > M. Sc. in Computer Science > > Mobile: +46 70 767 33 15 > Blog: http://thomassundberg.wordpress.com/ > Twitter: @thomassundberg > > Better software through faster feedback > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
