So I can't see a difference to my test, expecting
<version>${project.version}</version>
I've used
<version>${parent.version}</version>
Can't imagine, that that is a difference, but who knows!
Fredy
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>parent</artifactId>
<groupId>mygroup</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>B</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>A</artifactId>
<version>${project.version}</version>
<type>pom</type>
</dependency>
</dependencies>
</project>
-----Ursprüngliche Nachricht-----
Von: Florian Rampp [mailto:[email protected]]
Gesendet: Freitag, 17. Dezember 2010 13:31
An: Maven Users List
Betreff: AW: AW: Dependency on pom-project not resolved in reactor on
multi-module build
Yes, I have. See my first mail for the content of A/pom.xml and B/pom.xml
Florian
--
Florian Rampp, Software Architect
Phone: +49.89.45 23 47-64
-----Ursprüngliche Nachricht-----
Von: Hauschel Fred Robert [mailto:[email protected]]
Gesendet: Freitag, 17. Dezember 2010 13:12
An: Maven Users List
Betreff: AW: AW: Dependency on pom-project not resolved in reactor on
multi-module build
Hello Florian,
have you defined the <type>pom</type> ??
<dependencies>
<dependency>
<groupId>mygroup</groupId>
<artifactId>A</artifactId>
<version>${parent.version}</version>
<type>pom</type>
</dependency>
Fredy
-----Ursprüngliche Nachricht-----
Von: Florian Rampp [mailto:[email protected]]
Gesendet: Freitag, 17. Dezember 2010 12:42
An: [email protected]
Betreff: Re: AW: Dependency on pom-project not resolved in reactor on
multi-module build
Hello Freddy,
Thanks for your quick reply. I should have mentioned that mvn installs solves
the problem. So Maven resolves the dependency from the local repository. But
this is just a workaround since I expect the dependency to be resolved from the
reactor.
I think the order in which the modules are listed in the parent POM is not
important. If I change the order this does not affect the behavior. Here is the
parent POM:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>mygroup</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>A</module>
<module>B</module>
</modules>
</project>
The reactor build order is correct:
[INFO] Reactor build order:
[INFO] Unnamed - mygroup:parent:pom:1.0-SNAPSHOT
[INFO] Unnamed - mygroup:A:pom:1.0-SNAPSHOT
[INFO] Unnamed - mygroup:B:jar:1.0-SNAPSHOT
It seems to be a bug or at least unexpected behavior in Maven.
Thanks a lot,
Florian
P.S: If this mail does not appear as response on the first thread, I am sorry.
My mistake.
--
jambit Software Development & Management GmbH
Nymphenburger Straße 13-15, D-80335 München
Phone: +49.89.45 23 47-0 Fax: +49.89.45 23 47-70
http://www.jambit.com where innovation works
Geschäftsführer: Peter F. Fellinger, Markus Hartinger
Sitz: München; Registergericht: München, HRB 129139
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]