Hi List,

I'm almost certainly doing things wrong, but I couldn't find what is wrong.

I created a minimal failing example to show the problem.
Imagine 3 pom.xml (and nothing else) aranged in a parent-child relationship:
|-- pom.xml
|-- A
|   `-- pom.xml
`-- B
    `-- pom.xml

Each pom is quite simple:
pom.xml [the root one]:
---------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<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>test</groupId>
  <artifactId>test</artifactId>
  <packaging>pom</packaging>
  <version>1.0-SNAPSHOT</version>
  <modules>
    <module>A</module>
    <module>B</module>
  </modules>
</project>
---------------------------------------------------------------

A/pom.xml:
---------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"; xmlns="http://maven.apache.org/POM/4.0.0";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <artifactId>test</artifactId>
    <groupId>test</groupId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <groupId>test.test</groupId>
  <artifactId>A</artifactId>
  <version>1.0-SNAPSHOT</version>
</project>
---------------------------------------------------------------

B/pom.xml:
---------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"; xmlns="http://maven.apache.org/POM/4.0.0";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <artifactId>test</artifactId>
    <groupId>test</groupId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <groupId>test.test</groupId>
  <artifactId>B</artifactId>
  <version>1.0-SNAPSHOT</version>
  <dependencies>
    <dependency>
      <groupId>test.test</groupId>
        <artifactId>A</artifactId>
        <version>1.0-SNAPSHOT</version>
    </dependency>
  </dependencies>
</project>
---------------------------------------------------------------

As you can see B depends on A.

If I run mvn package in the root folder, everything works fine.
If I run mvn package in A everything is fine aswell
However, if I run mvn package in B, mvn does not know where to find test.test:A

Why is that, how can I solve this (apart from installing A first)?

Thanks
Fabian Kürten

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to