You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mikael Petterson <mi...@ericsson.com> on 2008/06/26 15:37:23 UTC

Inherit dependencies problem

Hi,

We have been using maven 2 ( 2.0.8 )for a while with love and hate :-)

And now we want to make our child pom.xml:s a bit cleaner in terms of
dependencies.

We have the following structure in Eclipse 3.3.0:

src
 |
 |---services
 |         |
 |         |-------alarm
 |                  |
 |                  |--------pom.xml (child)
 |
 |------pom.xml (master)


In my master POM I have the following:

<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.4</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.jmock</groupId>
				<artifactId>jmock-junit4</artifactId>
				<version>2.4.0</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>sailfin</groupId>
				<artifactId>javaee</artifactId>
				<version>0.22</version>
				<scope>provided</scope>
			</dependency>
</dependencyManagement>


<modules>
		
   <module>services/alarm</module>
		
</modules>


In my child POM I have the following:

       <parent>
		<groupId>com.mycompany.project</groupId>
		<artifactId>dtx</artifactId>
		<version>1</version>
		<relativePath>../../pom.xml</relativePath>
	</parent>

When I run 'mvn clean install' from the command line maven complains
that it cannot find the dependencies in my master pom.

Any ideas what I am doing wrong. By the way everything has been working
fine until I tried this.

cheers,

//mike
	   

Re: Inherit dependencies problem

Posted by Julien Simon <ka...@gmail.com>.
Hi,

Maybe this is just a "copy and paste" error but the end tag </dependencies>
is missing.


Julien Simon.