⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 build.xml

📁 经典java书籍《thinking in java(第三版)》的源码
💻 XML
📖 第 1 页 / 共 2 页
字号:
<?xml version="1.0"?>


<project name="Thinking in Java (c11)" default="c11.run" basedir=".">

  <description>
  build.xml for c11 of "Thinking in Java, 3rd Edition"
  by Bruce Eckel
  Available at http://www.MindView.net
  See copyright notice in CopyRight.txt

  Ant must be downloaded from:
  http://jakarta.apache.org/ant

  Options:
  ant
    compiles and runs all examples (if necessary)
  ant test
    compiles and runs all examples
  ant c11.build
    compiles but does not run examples
  ant clean
    removes old class files
  </description>

  <target name="JDK.version.check" unless="JDK.version.ok">
    <javac
      includes="CheckVersion.java"
      srcdir="${basedir}/../com/bruceeckel/tools/"
      classpath="${basedir}/.."
    />
    <java
      taskname="CheckVersion"
      classname="com.bruceeckel.tools.CheckVersion"
      classpath="${basedir}/.."
      fork="true"
      failonerror="true"
    />
    <property name="JDK.version.ok" value="true"/>
  </target>

  <!-- build all dependencies and check to see if tests are up to date -->
  <target name="c11.prepare">
    <condition property="test.run" value="true">
      <or>
        <uptodate>
          <srcfiles dir= "${basedir}" includes="**/*Output.txt"/>
          <mapper type="glob" from="*Output.txt" to="*.class"/>
        </uptodate>
        <available file="failed"/>
      </or>
    </condition>
    <ant
      antfile="${basedir}/../com/build.xml"
      target="com.build"
      dir="${basedir}/../com"
      output="${basedir}/../com/log.txt"
    />
    <ant
      antfile="${basedir}/../c08/build.xml"
      target="c08.build"
      dir="${basedir}/../c08"
      output="${basedir}/../c08/log.txt"
    />
  </target>

  <!-- build all classes in this directory -->
  <target name="c11.build" depends="JDK.version.check,c11.prepare"
    description="Compile all source files">
    <javac
      srcdir="${basedir}"
      classpath="${basedir}/.."
      source="1.4"
    />
  </target>

  <!-- force all tests to be run -->
  <target name="test" description="Compile and test all examples">
    <property name="test.run" value="true"/>
    <antcall target="c11.run"/>
  </target>

  <!-- run all untested examples in this directory -->
  <target name="c11.run" depends="c11.build" if="test.run"
    description="Compile and run untested examples">
    <touch file="failed"/>
    <antcall target="AlphabeticSearch.run"/>
    <antcall target="AlphabeticSorting.run"/>
    <antcall target="ArraySearching.run"/>
    <antcall target="ArraySize.run"/>
    <antcall target="Bits.run"/>
    <antcall target="CanonicalMapping.run"/>
    <antcall target="CatsAndDogs.run"/>
    <antcall target="CatsAndDogs2.run"/>
    <antcall target="Collection1.run"/>
    <antcall target="ComparatorTest.run"/>
    <antcall target="ComparingArrays.run"/>
    <antcall target="CompType.run"/>
    <antcall target="CopyingArrays.run"/>
    <antcall target="CountedString.run"/>
    <antcall target="Enumerations.run"/>
    <antcall target="FailFast.run"/>
    <antcall target="FillingArrays.run"/>
    <antcall target="FillingLists.run"/>
    <antcall target="FillTest.run"/>
    <antcall target="HamsterMaze.run"/>
    <antcall target="IceCream.run"/>
    <antcall target="Iterators2.run"/>
    <antcall target="LinkedHashMapDemo.run"/>
    <antcall target="List1.run"/>
    <antcall target="ListPerformance.run"/>
    <antcall target="ListSortSearch.run"/>
    <antcall target="Map1.run"/>
    <antcall target="MapPerformance.run"/>
    <antcall target="MouseListTest.run"/>
    <antcall target="PrintingContainers.run"/>
    <antcall target="Queue.run"/>
    <antcall target="ReadOnly.run"/>
    <antcall target="References.run"/>
    <antcall target="Reverse.run"/>
    <antcall target="Set1.run"/>
    <antcall target="Set2.run"/>
    <antcall target="SetPerformance.run"/>
    <antcall target="SimpleCollection.run"/>
    <antcall target="SimpleHashMap.run"/>
    <antcall target="SlowMap.run"/>
    <antcall target="SortedMapDemo.run"/>
    <antcall target="SortedSetDemo.run"/>
    <antcall target="SpringDetector.run"/>
    <antcall target="SpringDetector2.run"/>
    <antcall target="StackL.run"/>
    <antcall target="Stacks.run"/>
    <antcall target="Statistics.run"/>
    <antcall target="StringHashCode.run"/>
    <antcall target="StringSorting.run"/>
    <antcall target="Synchronization.run"/>
    <antcall target="TestArrays2.run"/>
    <antcall target="Unsupported.run"/>
    <antcall target="Utilities.run"/>
    <antcall target="WorksAnyway.run"/>
    <echo message="* InfiniteRecursion must be run by hand. *"/>
    <delete file="failed"/>
  </target>

  <target name="AlphabeticSearch.run">
    <java
      taskname="AlphabeticSearch"
      classname="AlphabeticSearch"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"
    />
  </target>

  <target name="AlphabeticSorting.run">
    <java
      taskname="AlphabeticSorting"
      classname="AlphabeticSorting"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"
    />
  </target>

  <target name="ArraySearching.run">
    <java
      taskname="ArraySearching"
      classname="ArraySearching"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"
    />
  </target>

  <target name="ArraySize.run">
    <java
      taskname="ArraySize"
      classname="ArraySize"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"
    />
  </target>

  <target name="Bits.run">
    <java
      taskname="Bits"
      classname="Bits"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"
    />
  </target>

  <target name="CanonicalMapping.run">
    <java
      taskname="CanonicalMapping"
      classname="CanonicalMapping"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"
    />
  </target>

  <target name="CatsAndDogs.run">
    <java
      taskname="CatsAndDogs"
      classname="c11.CatsAndDogs"
      classpath="${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="false"
    />
    <echo message="* Exception was expected *"/>
  </target>

  <target name="CatsAndDogs2.run">
    <java
      taskname="CatsAndDogs2"
      classname="c11.CatsAndDogs2"
      classpath="${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"
    />
  </target>

  <target name="Collection1.run">
    <java
      taskname="Collection1"
      classname="Collection1"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"
    />
  </target>

  <target name="ComparatorTest.run">
    <java
      taskname="ComparatorTest"
      classname="ComparatorTest"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"
    />
  </target>

  <target name="ComparingArrays.run">
    <java
      taskname="ComparingArrays"
      classname="ComparingArrays"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"
    />
  </target>

  <target name="CompType.run">
    <java
      taskname="CompType"
      classname="CompType"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"
    />
  </target>

  <target name="CopyingArrays.run">
    <java
      taskname="CopyingArrays"
      classname="CopyingArrays"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"
    />
  </target>

  <target name="CountedString.run">
    <java
      taskname="CountedString"
      classname="CountedString"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"
    />
  </target>

  <target name="Enumerations.run">
    <java
      taskname="Enumerations"
      classname="Enumerations"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"
    />
  </target>

  <target name="FailFast.run">
    <java
      taskname="FailFast"
      classname="FailFast"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="false"
    />
    <echo message="* Exception was expected *"/>
  </target>

  <target name="FillingArrays.run">
    <java
      taskname="FillingArrays"
      classname="FillingArrays"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"
    />
  </target>

  <target name="FillingLists.run">
    <java
      taskname="FillingLists"
      classname="FillingLists"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"
    />
  </target>

  <target name="FillTest.run">
    <java
      taskname="FillTest"
      classname="FillTest"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"
    />
  </target>

  <target name="HamsterMaze.run">
    <java
      taskname="HamsterMaze"
      classname="HamsterMaze"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"
    />
  </target>

  <target name="IceCream.run">
    <java
      taskname="IceCream"
      classname="IceCream"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"
    />
  </target>

  <target name="Iterators2.run">
    <java
      taskname="Iterators2"
      classname="Iterators2"
      classpath="${basedir};${basedir}/.."
      dir="../c11"
      fork="true"
      failonerror="true"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -