maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arik Kfir" <arikk...@bezeqint.net>
Subject POM extend feature - improvement suggestion
Date Mon, 06 Oct 2003 12:37:10 GMT
Hello,

Maven has a mechanism for project-inheritance via the <extend> tag. This is
a good practice enabling even further standardization and unity between
various project aspects, especially for organizations/corporations
generating more than a small number of projects.

However, I've seen in several Maven-powered projects that the project.xml
file extends other project.xml files by pointing to them in a
filesystem-dependant way. For example, one project.xml file would contain a
statement such as:

    <extend>../project.xml</extend>

This only holds ofcourse if I have the parent project in my local
filesystem. But that breaks the notion of every project standing on its own,
isn't it? or perhaps this wasn't the notion at all to begin with - am I
suppose to download the parent projects as well? (not a retorical question -
I'm really asking what's the standard practice)

I believe a better alternative would be to embed this behaviour through the
dependency mechanism, such that a project "depends" on another project (a
POM artifact perhaps?), but not to receive classpath elements, but rather to
receive its POM metadata. Something like:

    <groupId>commons</groupId>
    <id>util</id>
    <extend>
        <groupId>commons</groupId>
        <id>general</id>
    </extend>

Such that the 'commons' (some virtual 'commons' project) project exists by
itself, producing a single artifact which is an abstract POM model, and a
subproject named 'util' which is under the 'commons' group-id uses that
abstract POM model to extend from.

Ofcourse this could be simplified if needed to specifying a URL to the
abstract POM, or some other mechanism perhaps. But I think the idea is
clear.



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


Mime
View raw message