I am looking at the documentation that ships with Apache Ant version 1.8.0 and cannot find where the class paths, path and patch are documented. I found a page that describes paths as structures, but does not list valid attributes or nested elements for them. Another thing I cannot find in the documentation is a description of the relationship between the file list, the set of files, the template and the outline and how to convert them back and forth. For example, there should be an easier way to compile only those classes in one package while removing all class dependencies on package classes and upgrade documentation.
<fileset id = "java.source.set" dir = "${src}"> <include name = "**/Package/*.java" /> </fileset> <pathconvert property = "java.source.list" refid = "java.source.set" pathsep = ","> <globmapper from = "${src}/*.@{src.extent}" to = "*.class" /> </pathconvert> <depend srcdir = "${src}" destdir = "${build}" includes = "${java.source.list}" closure = "yes" /> <fileset id = "class.uptodate.set" dir = "${build}"> <include name = "**/*.class" /> </fileset> <pathconvert property = "java.uptodate.list" refid = "class.uptodate.set" pathsep = ","> <globmapper from="${build}/*.class" to="*.java" /> </pathconvert> <javac srcdir = "${src}" destdir = "${build}" classpathref = "compile.classpath" includes = "${java.source.list}" excludes = "${java.uptodate.list}"/> <path id = "class.dirs.path"> <dirset dir = "${build}" includes = "class.dir.list" /> </path> <jdepend outputfile = "${docs}/jdepend-report.txt"> <classpath refid = "compile.classpath" /> <classpath location = "${build}" /> <classespath> <path refid = "class.dirs.path" /> </classespath> <exclude name = "java.*" /> <exclude name = "javax.*" /> </jdepend>
Note the number of conversions between file sets, paths, and a comma-separated list to get the correct type needed for different Ant tasks. Is there a way to simplify this when processing the smallest files in a complex directory structure?
Robert Menteer Mar 26 2018-10-21T00: 00Z
source share