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

📄 build.xml

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


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

  <description>
  build.xml for c12 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 c12.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="c12.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"
    />
  </target>

  <!-- build all classes in this directory -->
  <target name="c12.build" depends="JDK.version.check,c12.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="c12.run"/>
  </target>

  <!-- run all untested examples in this directory -->
  <target name="c12.run" depends="c12.build" if="test.run"
    description="Compile and run untested examples">
    <touch file="failed"/>
    <antcall target="AnalyzeSentence.run"/>
    <antcall target="AvailableCharSets.run"/>
    <antcall target="Blip3.run"/>
    <antcall target="Blips.run"/>
    <antcall target="BufferEquality.run"/>
    <antcall target="BufferToText.run"/>
    <antcall target="CADState.run"/>
    <antcall target="ChangeSystemOut.run"/>
    <antcall target="ChannelCopy.run"/>
    <antcall target="DirList.run"/>
    <antcall target="DirList2.run"/>
    <antcall target="DirList3.run"/>
    <antcall target="EncodeDecode.run"/>
    <antcall target="Endians.run"/>
    <antcall target="FileLocking.run"/>
    <antcall target="FindDemo.run"/>
    <antcall target="FreezeAlien.run"/>
    <antcall target="GetChannel.run"/>
    <antcall target="GetData.run"/>
    <antcall target="Groups.run"/>
    <antcall target="GZIPcompress.run"/>
    <antcall target="IntBufferDemo.run"/>
    <antcall target="JGrep.run"/>
    <antcall target="Logon.run"/>
    <antcall target="MakeDirectories.run"/>
    <antcall target="MappedFile.run"/>
    <antcall target="MappedIO.run"/>
    <antcall target="MappedReader.run"/>
    <antcall target="MyWorld.run"/>
    <antcall target="PreferencesDemo.run"/>
    <antcall target="Redirecting.run"/>
    <antcall target="ReFlags.run"/>
    <antcall target="ReplacingStringTokenizer.run"/>
    <antcall target="Resetting.run"/>
    <antcall target="SerialCtl.run"/>
    <antcall target="SplitDemo.run"/>
    <antcall target="StartEnd.run"/>
    <antcall target="TestEOF.run"/>
    <antcall target="TestRegularExpression.run"/>
    <antcall target="TheReplacements.run"/>
    <antcall target="TransferTo.run"/>
    <antcall target="UsingBuffers.run"/>
    <antcall target="ViewBuffers.run"/>
    <antcall target="WordCount.run"/>
    <antcall target="Worm.run"/>
    <antcall target="ZipCompress.run"/>
    <antcall target="ThawAlien.run"/>
    <echo message="* Echo must be run by hand. *"/>
    <echo message="* IOStreamDemo must be run by hand. *"/>
    <echo message="* LargeMappedFiles must be run by hand. *"/>
    <echo message="* LockingMappedFiles must be run by hand. *"/>
    <delete file="failed"/>
  </target>

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

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

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

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

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

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

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

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

  <target name="ChannelCopy.run">
    <java
      taskname="ChannelCopy"
      classname="ChannelCopy"
      classpath="${basedir};${basedir}/.."
      dir="../c12"
      fork="true"
      failonerror="true"
    >
      <arg line=' ChannelCopy.java test.txt'/>
    </java>
  </target>

  <target name="DirList.run">
    <java
      taskname="DirList"
      classname="DirList"
      classpath="${basedir};${basedir}/.."
      dir="../c12"
      fork="true"
      failonerror="true"
    >
      <arg line=' "D.*\.java"'/>
    </java>
  </target>

  <target name="DirList2.run">
    <java
      taskname="DirList2"
      classname="DirList2"
      classpath="${basedir};${basedir}/.."
      dir="../c12"
      fork="true"
      failonerror="true"
    >
      <arg line=' "D.*\.java"'/>
    </java>
  </target>

  <target name="DirList3.run">
    <java
      taskname="DirList3"
      classname="DirList3"
      classpath="${basedir};${basedir}/.."
      dir="../c12"
      fork="true"
      failonerror="true"
    >
      <arg line=' "D.*\.java"'/>
    </java>
  </target>

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

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

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

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

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

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

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

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

⌨️ 快捷键说明

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