The following comment has been added to this issue:
Author: Mike Melia
Created: Thu, 18 Dec 2003 3:58 AM
Body:
I'm not sure I completely understand your comment. I think you agreed that currently
you can only inherit dependencies from one source but you didn't say whether it was a
planned (or required) future feature. If it is desirable then I'll upload a patch.
I'll try to explain more the scenario a bit better this time.
Dependencies can be inherited from the parent but sometimes you want to inherit
dependencies from more than one source - usually to cut down on the duplication of
dependency declaration.
e.g.
if an EJB project declares dependencies on jars A, B and C with the
ejb.manifest.classpath value set to true then the chances are that the EAR project
will declare the same dependencies (A, B and C) with the ear.bundle value set to true.
A third project (the utility jar project) will have dependencies D and E - which,
consequently, will also be ear.bundle dependencies for the EAR project.
The scenario I would prefer would be the following:
Master project.xml defines the usual project properties.
--Util
project.xml extends the Master project.xml and defines the dependencies for the
utility project
--EJB
project.xml extends the Master project.xml and defines the dependencies for the EJB
project
--EAR
project.xml extends the Master project.xml and also indicates that it is inheriting
the dependencies from the Util and EJB project.xml files.
So, the solution would allow inheritance of dependencies from more than one source
which cuts down on duplication. This is a good thing if, like me, you are setting up
project.xml files for 80+ inter-related projects.
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-1084
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MAVEN-1084
Summary: Composition of dependencies from many projects (a route round multiple
inheritance)
Type: New Feature
Status: Unassigned
Priority: Minor
Original Estimate: 4 hours
Time Spent: Unknown
Remaining: 4 hours
Project: maven
Components:
core
Assignee:
Reporter: Mike Melia
Created: Wed, 17 Dec 2003 12:40 AM
Updated: Thu, 18 Dec 2003 3:58 AM
Description:
I have an EAR project that has (mostly) the same dependencies as an EJB project.
The EAR project includes the dependent jars in the EAR artifact.
The EJB project requires the dependent jars for compilation and for them to be
included in the manifest classpath.
I also have another project that builds a utility jar for use by both the EAR and EJB
project.
All projects extend a base project with the usual info defined (developers names
etc.). This single inheritance forces me to duplicate the common dependency
declarations in each subproject.
Ideally I would like an include tag in the dependencies section.
I have coded a workaround which allows for a space separated list of project files in
the <extend> tag. e.g <extend>../project.xml ../common_dependencies.xml</extend>
The first file would be the parent project and the subsequent files would contain
common dependencies. i.e. inherit from the parent and have dependencies composed from
siblings.
I will submit a patch for that functionality as soon as I get away from the corporate
firewall.
Please let me know if this sort of functionality has already been planned. TIA.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]