You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Colin Sampaleanu <co...@exis.com> on 2003/01/23 21:34:07 UTC
Project inheritance/extension, being allowed to set $basedir would
be helpful
Generally, subprojects which inherit from a parent project do not work
with the same directories and artifacts that the parent project does.
There is however a case where this would be very useful, and for this to
be easy to do, the subproject needs to think it has a different $basedir
than the one the project.xml file is in (although the maven.xml and
project.properties alongside it should still be read).
Consider the 'ear' plugin. It can currently only build an ear file with
artifacts which are already in the remote or local repository (as a
result of an 'install'). However, it would be much more useful if you
could have a project which compiled code, built jars and wars, and then
built the ear. One way to handle this would be to have a project build
up all the artifacts and install them, then call (via the reactor) a
subproject to create the ear file. The important thing is that if the
subproject thought it's basedir was the basedir of the parent project,
then it could reuse all the src artifacts relative to the parent.
Otherwise, any reference to a file (via a property) needs to be
overriden in the child project (consider for example the property which
points to the standard location for the application.xml file, for which
there is a default value in the plugin, or the manifest, etc. Without
being able to override the basedir, these artifacts have to be found
either by overriding all the default properties, or else by actually
placing them in the subproject.
Thoughts?
Colin