Uploaded image for project: 'Maven Ant Tasks (RETIRED)'
  1. Maven Ant Tasks (RETIRED)
  2. MANTTASKS-227

Dependencies task should implement Ant's ResourceCollection interface in a similar manner to ivy's resources task.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Auto Closed
    • 2.1.3
    • None
    • dependencies task
    • None

    Description

      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:

      <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>
      

      I propose that this could become:

      <import>
         <artifact:dependencies>
            <dependency groupId="my-groupid" artifactId="common-macros" version="0.0.1-SNAPSHOT" type="xml" />
         </artifact:dependencies>
      </import>
      

      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:

      <import>
            <artifact:dependency groupId="my-groupid" artifactId="common-macros" version="0.0.1-SNAPSHOT" type="xml" />
      </import>
      

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pgpx Paul Martin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: