Ant Paths(II)

1 March 2008

Further, one or more Resource Collections can be specified as a nested elements. These must consist of file-type resources only. Certain resource collection types such as fileset, dirset and files are undefined in terms of order.

    <classpath>
      <pathelement path="${classpath}"/>
      <fileset dir="lib">
        <include name="**/*.jar"/>
      </fileset>
      <pathelement location="classes"/>
      <dirset dir="${build.dir}">
        <include name="apps/**/classes"/>
        <exclude name="apps/**/*Test*"/>
      </dirset>
      <filelist refid="third-party_jars"/>
    </classpath>

This builds a path that has the value of ${classpath}, followed by all jar files in the lib directory, the classes directory, all directories named classes under the apps subdirectory of ${build.dir}, except those that have the text Test in their name, and the files specified in the referenced FileList.

If you want to use the same path-like structure for mutiple tasks, you can define them with a element at the same level as targets, and reference them via their id attribute.

Follow the next post on this topic.

Related Posts:

  • No related posts
del.icio.us:Ant Paths(II)  digg:Ant Paths(II)  spurl:Ant Paths(II)  wists:Ant Paths(II)  simpy:Ant Paths(II)  newsvine:Ant Paths(II)  blinklist:Ant Paths(II)  furl:Ant Paths(II)  reddit:Ant Paths(II)  fark:Ant Paths(II)  blogmarks:Ant Paths(II)  Y!:Ant Paths(II)  smarking:Ant Paths(II)  magnolia:Ant Paths(II)  segnalo:Ant Paths(II)  gifttagging:Ant Paths(II)

Top Of Page | Trackback

If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.

It will look like this: Ant Paths(II)

Leave a Reply