Paul Martin created MANTTASKS-227:
-------------------------------------
Summary: Dependencies task should implement Ant's
ResourceCollection interface in a similar manner to ivy's resources task.
Key: MANTTASKS-227
URL: https://jira.codehaus.org/browse/MANTTASKS-227
Project: Maven 2.x Ant Tasks
Issue Type: Improvement
Components: dependencies task
Affects Versions: 2.1.3
Reporter: Paul Martin
Priority: Minor
We're trying to store commonly used internal Ant macros in our Maven
repository, so that we can reuse them across projects. The aim of the proposed
changes is just to reduce the amount of boilerplate required to import them.
Therefore it would be nice if the dependencies task could also implement Ant's
ResourceCollection interface (or if there was a separate class that did so),
because it would avoid the need for separate statements to first declare the
dependencies and then use them. For example we currently do the following to
import Ant macros held in a Maven repository:
{code:xml}
<artifact:dependencies filesetid="repo-imports">
<dependency groupId="my-groupid" artifactId="common-macros"
version="0.0.1-SNAPSHOT" type="xml" />
</artifact:dependencies>
<import>
<fileset refId="repo-imports"/>
</import>
{code}
I propose that this could become:
{code:xml}
<import>
<artifact:dependencies>
<dependency groupId="my-groupid" artifactId="common-macros"
version="0.0.1-SNAPSHOT" type="xml" />
</artifact:dependencies>
</import>
{code}
This is the approach taken by Ivy's resources task:
http://ant.apache.org/ivy/history/latest-milestone/use/resources.html
In fact, I think that it would be even nicer if we could also use the
dependency directly, perhaps as:
{code:xml}
<import>
<artifact:dependency groupId="my-groupid" artifactId="common-macros"
version="0.0.1-SNAPSHOT" type="xml" />
</import>
{code}
Ivy does this using the same resources task, but that might over-complicate the
dependencies task?
I can work on a patch if you think this is a worthwhile idea.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira