You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Markus Jostock <ma...@softwareag.com> on 2009/06/11 14:17:01 UTC
dependency management in sub-sub-module
Dear all
I have module structure with two levels of sub-modules.
The root level pom defines a dependency managment section which is
working fine for sub-modules. But for a deeper level, the dependency
management section of the root pom apparently is not available any more ...
root
+- module1 <-- working fine
+- module2 <-- working fine
+- clients
+- client1 <-- compile errors ...
+- client2 <-- compile errors ...
During build, the system does not complain about unsatisfied
dependencies, but in the compile phase the compiler cannot find the symbols.
Would anyone have an idea what I could be doing wrong here? Any advice
would be gratefully appreciated ...
Many, many thanks!
Markus
root-pom:
===========
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>my.groupid</groupId>
<artifactId>root</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>My Project</name>
<modules>
<module>module1</module>
<module>module2</module>
<module>clients</module>
</modules>
<dependencyManagement>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.8.0</version>
<scope>compile</scope>
</dependency>
...
</dependencyManagement>
</project>
clients-pom:
============
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>root</artifactId>
<groupId>my.groupid</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>clients</artifactId>
<name>My Clients</name>
<packaging>pom</packaging>
<modules>
<module>client1</module>
<module>client2</module>
</modules>
</project>
client1-pom:
============
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>clients</artifactId>
<groupId>my.groupId</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>client1</artifactId>
<name>My Client 1</name>
<dependencies>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<scope>compile</scope>
</dependency>
...
</dependencies>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: dependency management in sub-sub-module
Posted by Robert Glover <ro...@yahoo.com>.
I'm new to Maven so take this with a grain of salt, but I don't see why you can't just do:
...snip...
<modules>
<module>module1</module>
<module>module2</module>
<module>client1</module>
<module>client2</module>
</modules>
...snip...
________________________________
From: Markus Jostock <ma...@softwareag.com>
To: Maven Users List <us...@maven.apache.org>
Sent: Thursday, June 11, 2009 8:17:01 AM
Subject: dependency management in sub-sub-module
Dear all
I have module structure with two levels of sub-modules.
The root level pom defines a dependency managment section which is working fine for sub-modules. But for a deeper level, the dependency management section of the root pom apparently is not available any more ...
root
+- module1 <-- working fine
+- module2 <-- working fine
+- clients
+- client1 <-- compile errors ...
+- client2 <-- compile errors ...
During build, the system does not complain about unsatisfied dependencies, but in the compile phase the compiler cannot find the symbols.
Would anyone have an idea what I could be doing wrong here? Any advice would be gratefully appreciated ...
Many, many thanks!
Markus
root-pom:
===========
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>my.groupid</groupId>
<artifactId>root</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>My Project</name>
<modules>
<module>module1</module>
<module>module2</module>
<module>clients</module>
</modules>
<dependencyManagement>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.8.0</version>
<scope>compile</scope>
</dependency>
...
</dependencyManagement>
</project>
clients-pom:
============
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>root</artifactId>
<groupId>my.groupid</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>clients</artifactId>
<name>My Clients</name>
<packaging>pom</packaging>
<modules>
<module>client1</module>
<module>client2</module>
</modules>
</project>
client1-pom:
============
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>clients</artifactId>
<groupId>my.groupId</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>client1</artifactId>
<name>My Client 1</name>
<dependencies>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<scope>compile</scope>
</dependency>
...
</dependencies>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org