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:44:07 UTC

Inheritance problem in maven

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:

<groupId>com.mycompany.project</groupId>
<artifactId>dtx</artifactId>
<version>1</version>


<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: Inheritance problem in maven

Posted by Ladislav Božek <la...@emds-ag.sk>.
Hi, 

What will happen, when you specify:

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

in your master pom.xml?

regards,

Ladislav

-----Original Message-----
From: Mikael Petterson [mailto:mikael.petterson@ericsson.com] 
Sent: Thursday, June 26, 2008 3:44 PM
To: users@maven.apache.org
Subject: Inheritance problem in maven

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:

<groupId>com.mycompany.project</groupId>
<artifactId>dtx</artifactId>
<version>1</version>


<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




__________ Informacia od ESET Smart Security, verzia databazy 3221
(20080626) __________

Tuto spravu preveril ESET Smart Security.

http://www.eset.sk
 

__________ Informacia od ESET Smart Security, verzia databazy 3221
(20080626) __________

Tuto spravu preveril ESET Smart Security.

http://www.eset.sk
 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org