maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Dare <robert.d...@gmail.com>
Subject Re: Maven 3 Flat Multi-Module Project
Date Wed, 16 Mar 2011 18:52:44 GMT
I found that if I add this:

<relativePath>../myparent</relativePath>

...to the child's <parent> element, everything works fine.

So, my previous believe that <relativePath> defaulted to
../parent.artifactId was false...



On Wed, Mar 16, 2011 at 2:35 PM, Robert Dare <robert.dare@gmail.com> wrote:

> I was recently upgraded to Maven 3.0.2 and found that it can not build my
> Maven 2 projects.  My projects are flat, multi-module projects where the
> parent is a sibling project to the other modules.
>
> In the parent's pom, I define the other modules as such:
>
> <modules>
>   <module>../module1</module>
>   <module>../module2</module>
> </module>
>
> The child modules link to the parent:
>
> <parent>
>   <groupId>group</groupId>
>   <artifactId>myparent</artifactId>
>   <version>1.0-SNAPSHOT</version>
> </parent>
>
> When I try do do a "mvn package" from the parent directory, I get an error
> saying that module1 can not find the parent.
>
> [ERROR]   The project group:module1:1.0-SNAPSHOT
> (/pathProjects/demo/flat/module1/pom.xml) has 1 error
> [ERROR]     Non-resolvable parent POM: Could not find artifact
> group:myparent:pom:1.0-SNAPSHOT and 'parent.relativePath' points at wrong
> local POM @ line 12, column 10 -> [Help 2]
>
>
> Maven3 was supposed to be backwards compatible?  Is it no longer allowed to
> have flat, multi-module projects, or am I doing something else wrong?
>
> Many regards,
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message