> I have to wonder whether inheritance is really a better way to go over
> composition of the project definition.  OOP went down the path of
> inheritance for a long time, but it is now generally recognised that you
> can get yourself into a horrible horrible mess with deep inheritance
> hierarchies.   Witness component driven design which typically uses
> composition to acquire behaviour.  I am not suggesting that having
> project "fragments" would be a good idea, just that it might be an idea.

Needless to say, I completely agree ;-) Although supporting more than 1
level of pom inheritance sounds like a good idea, I am not convinced that it
really helps solve some of the more complex use cases. We already use
jelly-driven pom composition quite a bit throughout our build framework so
that we can share common declarations and definitions and ease our
maintainence load. I previously mentioned how our demo projects
automatically append the dependencies of their parent library/app project.
Each of our projects also has an optional project-tests.xml and
project-benches.xml pom. These poms contain additional dependencies and
other info needed to specifically run our unit tests and benchmarks,
respectively. Admittedly, some of this behavior could now be implemented
using user-defined properties that can now be assigned to dependencies. But,
adding this info back into the main project.xml and attaching special flag
properties means that we would have to override almost all of the standard
goals to ignore dependencies that are only relevant for testing and running
benchmarks. With our current implementation, it is actually much simpler
because we only have to override the test goals so that they parse the
additional pom and extract the info needed.

We have not really experimented with the OASIS XMLCatalog capability that is
now built into Ant. I am not an expert, but it sounds like it might be a
"freebie" feature that comes with the xml-commons and only needs to be
exposed somehow to the user. Maybe providing support for xmlcatalogs within
Maven would be a first step towards defining sharable libraries of XML pom
fragments.

> Just a thought for the new year.

Just my thoughts for the new year as well... :-)

--------------------------------------
David Zeleznik
Principal Architect
ILOG - Changing the rules of business
mailto:[EMAIL PROTECTED]
http://www.ilog.com
--------------------------------------


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

Reply via email to