http://jira.codehaus.org/browse/MNG-740
Please vote for that jira
On 9/2/06, jiangshachina <[EMAIL PROTECTED]> wrote:
Hello,
I'm newbie in Maven. I make a very simple example for Maven, but meet a
trouble.The example as follows.
The example's direcotry layout is
D:\maven
|-- example
|-- pom.xml
|-- A
|-- pom.xml
|-- B
|-- pom.xml
|-- src
|-- main
|-- java
|-- hello
|--Hello.java
[1]pom.xml at D:\maven\example
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>example</groupId>
<artifactId>example</artifactId>
<packaging>pom</packaging>
<version>1.0</version>
<modules>
<module>A</module>
</modules>
</project>
[2]pom.xml at D:\maven\example\A
<project>
<parent>
<groupId>example</groupId>
<artifactId>example</artifactId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>A</artifactId>
<packaging>pom</packaging>
<modules>
<module>B</module>
</modules>
</project>
[3]pom.xml at D:\maven\example\B
<project>
<parent>
<groupId>example</groupId>
<artifactId>A</artifactId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>B</artifactId>
<packaging>jar</packaging>
</project>
[1]If I run commond mvn compile at dir D:\maven\example\A\B, the source
will
be compiled normally.
[2]If I run commond mvn compile at dir D:\maven\example, the result is as
the same as [1].
[3]If I run commond mvn compile at dir D:\maven\example\A, the run will be
failed.
A part of the output is
"Downloading:
http://repo1.maven.org/maven2/example/example/1.0/example-1.0.pom"
and
"Reason: Cannot find parent: example:example for project: null:A:pom:1.0"
Why the POM in dir D:\maven\exampel\A can't find its parent POM in dir
D:\maven\exampel?
But the POM in dir D:\maven\exampel\A\B can find its parent POM in dir
D:\maven\exampel\A, even its parent's parent POM in dir D:\maven\exampel?
--
View this message in context:
http://www.nabble.com/-M2-Why-can%27t-find-parent-POM--tf2206497.html#a6111024
Sent from the Maven - Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]