哪里的类路径,路径和pathelement在蚂蚁版本1.8.0记录? [英] Where are classpath, path and pathelement documented in Ant version 1.8.0?

查看:147
本文介绍了哪里的类路径,路径和pathelement在蚂蚁版本1.8.0记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要找随Apache Ant的版本1.8.0,并不能找到类路径在哪里,路径和pathelement都记录在文档上。我发现,描述样结构路径的页面,但它并没有列出这些有效的属性或嵌套元素。我不能在文档中发现的另一件事情是文件列表,文件集,patternset和路径以及如何将它们来回转换之间的关系的描述。例如,必须有只编译那些类在一个包中,而在包中的类和更新文档删除所有类依赖性更简单的方法。

I'm looking over the documentation that comes with Apache Ant version 1.8.0 and can't find where classpath, path and pathelement are documented. I've found a page that describes path like structures but it doesn't list the valid attributes or nested elements for these. Another thing I can't find in the documentation is a description of the relationships between filelist, fileset, patternset and path and how to convert them back and forth. For instance there has to be an easier way to compile only those classes in one package while removing all class dependencies on the package classes and update documentation.

<!-- Get list of files in which we're interested. -->
<fileset id = "java.source.set"
    dir     = "${src}">
  <include name = "**/Package/*.java" />
</fileset>

<!-- Get a COMMA separated list of classes to compile. -->
<pathconvert property = "java.source.list"
    refid             = "java.source.set"
    pathsep           = ",">
  <globmapper from = "${src}/*.@{src.extent}"
      to           = "*.class" />
</pathconvert>

<!-- Remove ALL dependencies on package classes. -->
<depend srcdir = "${src}"
    destdir    = "${build}"
    includes   = "${java.source.list}"
    closure    = "yes" />

<!-- Get a list of up to date classes. -->
<fileset id = "class.uptodate.set"
    dir     = "${build}">
  <include name = "**/*.class" />
</fileset>

<!-- Get list of source files for up to date classes. -->
<pathconvert property = "java.uptodate.list"
    refid             = "class.uptodate.set"
    pathsep           = ",">
  <globmapper from="${build}/*.class" to="*.java" />
</pathconvert>

<!-- Compile only those classes in package that are not up to date. -->
<javac srcdir    = "${src}"
    destdir      = "${build}"
    classpathref = "compile.classpath"
    includes     = "${java.source.list}"
    excludes     = "${java.uptodate.list}"/>

<!-- Get list of directories of class files for package. --:
<pathconvert property = "class.dir.list"
    refid             = "java.source.set"
    pathsep           = ",">
  <globmapper from = "${src}/*.java"
      to           = "${build}*" />
</pathconvert>

<!-- Convert directory list to path. -->
<path id  = "class.dirs.path">
  <dirset dir  = "${build}"
      includes = "class.dir.list" />
</path>

<!-- Update package documentation. -->
<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>

注意有一些文件集,路径和逗号之间的转换分隔的列表只是为了获得不同的蚂蚁任务所需的正确的类型。有没有办法来简化这一点的同时仍在处理在一个复杂的目录结构的文件最少?

Notice there's a number of conversions between filesets, paths and comma separated list just to get the proper 'type' required for the different ant tasks. Is there a way to simplify this while still processing the fewest files in a complex directory structure?

推荐答案

这是我能找到在类路径中的文档最接近的一次。

This is the closest I could find to documentation on classpath.

<一个href=\"http://ant.apache.org/manual/using.html#path\">http://ant.apache.org/manual/using.html#path

这篇关于哪里的类路径,路径和pathelement在蚂蚁版本1.8.0记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆