I would anticipate that Maven should permit inheritance of the three files
below (project.xml, project.properties, maven.xml), and in this case there
is true inheritance...all properties defined by the child override the
parent definition.  

But I would suggest it is the aggregete of the properties for each project
that are inheritable (and overridable), not each individual file/artifact.
What I mean is everytime Maven parses a project.xml file and builds the
context (MavenSession), it should first check if the <extend> tag exists.
If so it gets the parent project and builds a complete MavenSession, where
context from that project was built according to the context building rules.
e.g. ${user.home}/build.properties < ${basedir}/build.properties <
${basedir}/project.properties etc. etc.

Then the complete parent context is used by the child context as it's basis
for determining the child context.  The child loads up it's property map and
does the mergeMap(Map1, Map2) to get it's own set of properties.  Then it
goes and attains goals.

This is opposed to the child ${user.home}/build.properties overriding the
parent ${user.home}/build.properties, the child POM overriding the parent
POM, etc.

In my opinion every single property should be overridable.  With perhaps the
exception being ${basedir} - that should be set for each project since path
resolution is uniquely dependent on that.  And exclude <id> too for obvious
reasons (it's an id!).

Does this make sense?  What do you think?  This is actually one of the areas
that I have a keen interest in, but it looks like several other people do as
well.

-- Steve  

-----Original Message-----
From: Nathan Coast
To: Maven Dev
Sent: 9/28/2003 7:42 PM
Subject: project inheritence

Hi,

I'd just like to clarify what the current state of play is with project 
inheritence and where the eventual goal is.

I think there are 3 artifacts which could sensibly be inherited.

project.xml / POM
project.properties
maven.xml

I remember reading in a post from Jason that eventually all three will
inherit 
fully with each subproject having the ability to override anything set
in the 
parent artifact  - can't find the post.  AFAICT the current state of
play is 
that only project.xml inherits (with build dependencies being additive).
Is 
this right?

I know everyone is pretty busy working towards RC1.  What sort of
priority is 
this work?

there are also a number of relevant issues in Jira
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-301
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-611
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-356
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-37
and probably quite a few more

cheers
Nathan





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to