Ivy
  1. Ivy
  2. IVY-334

Add extension for path- and fileset-types to ivy

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 2.3.0-RC1
    • Component/s: Ant
    • Labels:
      None

      Description

      As discussed in some other JIRA issue, it would be a good idea (if technically possible) to add path- en fileset extensions.

      A simple example which would be possible with this:

      <classpath>
      <ivypath file="ivy.xml" conf="compile" />
      <pathelement location="lib/helper.jar"/>
      </classpath>

      regards,
      Maarten

        Activity

        Hide
        Nicolas Lalevée added a comment -

        I have introduce ivy:resources which is a post release task which implements the ResourceCollection interface from Ant

        Show
        Nicolas Lalevée added a comment - I have introduce ivy:resources which is a post release task which implements the ResourceCollection interface from Ant
        Hide
        Jan Matèrne added a comment - - edited

        Ant 1.7 introduces an interface org.apache.tools.ant.types.ResourceCollection, which could be implemented by some of the Ivy tasks.
        E.g.

        IvyCachePath.java
        public class IvyCachePath extends IvyCacheTask implements ResourceCollection {
            String tmpPathId = "_noRealReference_" + System.currentTimeMillis();
            public void init() {
                getProject().getReference(tmpPathId) != null {
                    pathid = tmpPathId;
                    doExecute();
                }
            }
            public isFilesystemOnly() {
                init();
                return true;
            }
            public Iterator iterator() {
                return ((Path)getProject().getReference()).iterator();
            }
            public int size() {
                init();
                return ((Path)getProject().getReference()).size();
            }
            ...
        }
        
        Show
        Jan Matèrne added a comment - - edited Ant 1.7 introduces an interface org.apache.tools.ant.types.ResourceCollection, which could be implemented by some of the Ivy tasks. E.g. IvyCachePath.java public class IvyCachePath extends IvyCacheTask implements ResourceCollection { String tmpPathId = "_noRealReference_" + System .currentTimeMillis(); public void init() { getProject().getReference(tmpPathId) != null { pathid = tmpPathId; doExecute(); } } public isFilesystemOnly() { init(); return true ; } public Iterator iterator() { return ((Path)getProject().getReference()).iterator(); } public int size() { init(); return ((Path)getProject().getReference()).size(); } ... }

          People

          • Assignee:
            Nicolas Lalevée
            Reporter:
            Maarten Coene
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:
              Resolved:

              Development