You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Martin Lambert <Ma...@denovopharma.com> on 2004/02/20 18:06:29 UTC

pom extends

As part of our current task, we have used the project.xml <extend> functionality
to allow a sub-project to pick up the dependencies of it's parent. This
works fine while on the local file system, i.e.
<extend>${basedir}/../project.xml</extend> in the sub-project's
project.xml correctly references the parent file. 

The sub-project's pom is used elsewhere in our system, in other maven
projects, by the reactor therefore the pom and its parent have been uploaded to our 
remote repository and the dependent projects have the pom on their dependency list. 

When other projects use this pom via the reactor, the task being run fails because the parent
project.xml can't be referenced, giving an error that the parent pom can't be found. Both the 
parent and child poms are downloaded into the local repository. As the parent and child poms 
are in the same group they are located in the same directory in the repository making the extend 
path invalid.

We are working round this problem by altering the value in the sub-project's <extend> tag, on the copy
in the local repository, to point to the parent pom in the same directory (<extend>parent-pom</extend>). 
This is done before using the pom in the reactor and seems to work fine.

What is the suggested solution to this problem.

Thanks,

Martin.

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