代码拉取完成,页面将自动刷新
<?xml version="1.0" encoding="UTF-8"?>
<project name="simpledb" default="dist" basedir=".">
<property name="src" location="src"/>
<property name="testd" location="test"/>
<property name="build" location="bin"/>
<property name="build.src" location="${build}/src"/>
<property name="build.test" location="${build}/test"/>
<property name="depcache" location="${build}/depcache"/>
<property name="lib" location="lib"/>
<property name="doc" location="javadoc"/>
<property name="dist" location="dist"/>
<property name="jarfile" location="${dist}/${ant.project.name}.jar"/>
<property name="compile.debug" value="true"/>
<property name="test.reports" location="testreport"/>
<property name="sourceversion" value="1.8"/>
<path id="classpath.base">
<pathelement location="${build.src}"/>
<pathelement location="${lib}/zql.jar"/>
<pathelement location="${lib}/jline-0.9.94.jar"/>
<pathelement location="${lib}/mina-core-2.0.4.jar"/>
<pathelement location="${lib}/mina-filter-compression-2.0.4.jar"/>
<pathelement location="${lib}/slf4j-api-1.6.1.jar"/>
<pathelement location="${lib}/slf4j-log4j12-1.6.1.jar"/>
<pathelement location="${lib}/log4j-1.2.17.jar"/>
<pathelement location="${lib}/jzlib-1.0.7.jar"/>
</path>
<path id="classpath.test">
<path refid="classpath.base"/>
<pathelement location="${build.test}"/>
<pathelement location="${lib}/junit-4.13.1.jar"/>
<pathelement location="${lib}/hamcrest-core-1.3.jar"/>
<pathelement location="${lib}/javassist-3.27.0-GA.jar"/>
</path>
<!-- Common macro for compiling Java source -->
<macrodef name="Compile">
<attribute name="srcdir"/>
<attribute name="destdir"/>
<element name="compileoptions" implicit="true" optional="true"/>
<sequential>
<mkdir dir="@{destdir}"/>
<!-- avoids needing ant clean when changing interfaces -->
<depend srcdir="@{srcdir}" destdir="@{destdir}" cache="${depcache}"/>
<javac srcdir="@{srcdir}" destdir="@{destdir}" includeAntRuntime="no"
debug="${compile.debug}" source="${sourceversion}">
<compilerarg value="-Xlint:unchecked" />
<!--<compilerarg value="-Xlint:deprecation" />-->
<compileoptions/>
</javac>
</sequential>
</macrodef>
<!-- Common macro for running junit tests in both the test and runtest targets -->
<macrodef name="RunJunit">
<attribute name="haltonfailure" default="yes" />
<element name="testspecification" implicit="yes" />
<sequential>
<!-- timeout at 10.5 minutes, since TransactionTest is limited to 10 minutes. -->
<junit printsummary="on" fork="yes" timeout="630000" haltonfailure="@{haltonfailure}" maxmemory="128M" failureproperty="junit.failed">
<classpath refid="classpath.test" />
<formatter type="plain" usefile="false"/>
<assertions><enable/></assertions>
<testspecification/>
</junit>
</sequential>
</macrodef>
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="lib/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<target name="eclipse" description="Make current directory an eclipse
project">
<echo file=".project" append="false"><?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>simpledb</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription></echo>
<echo file=".classpath" append="false"><?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="bin/src" path="src/java"/>
<classpathentry kind="src" output="bin/test" path="test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin/src"/>
</echo>
<if> <available file="${lib}/junit-4.13.1.jar" /> <then>
<echo file=".classpath" append="true">
<classpathentry kind="lib" path="lib/junit-4.13.1.jar"/>
</echo>
</then>
</if>
<if> <available file="${lib}/hamcrest-core-1.3.jar" /> <then>
<echo file=".classpath" append="true">
<classpathentry kind="lib" path="lib/hamcrest-core-1.3.jar"/>
</echo>
</then>
</if>
<if> <available file="${lib}/jline-0.9.94.jar" /> <then>
<echo file=".classpath" append="true">
<classpathentry kind="lib" path="lib/jline-0.9.94.jar"/>
</echo>
</then>
</if>
<if> <available file="${lib}/zql.jar" /> <then>
<echo file=".classpath" append="true">
<classpathentry kind="lib" path="lib/zql.jar"/>
</echo>
</then>
</if>
<if> <available file="${lib}/mina-core-2.0.4.jar" /> <then>
<echo file=".classpath" append="true">
<classpathentry kind="lib" path="lib/mina-core-2.0.4.jar"/>
</echo>
</then>
</if>
<if> <available file="${lib}/mina-filter-compression-2.0.4.jar" /> <then>
<echo file=".classpath" append="true">
<classpathentry kind="lib" path="lib/mina-filter-compression-2.0.4.jar"/>
</echo>
</then>
</if>
<if> <available file="${lib}/jzlib-1.0.7.jar" /> <then>
<echo file=".classpath" append="true">
<classpathentry kind="lib" path="lib/jzlib-1.0.7.jar"/>
</echo>
</then>
</if>
<if> <available file="${lib}/slf4j-api-1.6.1.jar" /> <then>
<echo file=".classpath" append="true">
<classpathentry kind="lib" path="lib/slf4j-api-1.6.1.jar"/>
</echo>
</then>
</if>
<if> <available file="${lib}/slf4j-log4j12-1.6.1.jar" /> <then>
<echo file=".classpath" append="true">
<classpathentry kind="lib" path="lib/slf4j-log4j12-1.6.1.jar"/>
</echo>
</then>
</if>
<if> <available file="${lib}/log4j-1.2.17.jar" /> <then>
<echo file=".classpath" append="true">
<classpathentry kind="lib" path="lib/log4j-1.2.17.jar"/>
</echo>
</then>
</if>
<if> <available file="${lib}/javassist-3.27.0-GA.jar" /> <then>
<echo file=".classpath" append="true">
<classpathentry kind="lib" path="lib/javassist-3.27.0-GA.jar"/>
</echo>
</then>
</if>
<echo file=".classpath" append="true">
</classpath>
</echo>
</target>
<target name="compile" description="Compile code">
<Compile srcdir="${src}/java" destdir="${build.src}">
<classpath refid="classpath.base"/>
</Compile>
<copy todir="${build}" flatten="true">
<fileset dir="${src}">
<include name="bin/*.sh"/>
</fileset>
</copy>
</target>
<target name="javadocs" description="Build javadoc documentation">
<javadoc destdir="${doc}" access="private" failonerror="true" source="${sourceversion}" additionalparam="-Xdoclint:none">
<classpath refid="classpath.base" />
<fileset dir="src/java" defaultexcludes="yes">
<include name="simpledb/**/*.java"/>
</fileset>
</javadoc>
</target>
<target name="dist" depends="compile" description="Build jar">
<mkdir dir="${dist}"/>
<jar jarfile="${jarfile}" basedir="${build.src}">
<manifest>
<attribute name="Main-Class" value="simpledb.SimpleDb"/>
<attribute name="Class-Path" value="../lib/zql.jar ../lib/jline-0.9.94.jar ../lib/jzlib-1.0.7.jar ../lib/mina-core-2.0.4.jar ../lib/mina-filter-compression-2.0.4.jar ../lib/slf4j-api-1.6.1.jar ../lib/slf4j-log4j12-1.6.1.jar ../lib/log4j-1.2.17.jar "/>
</manifest>
<!-- Merge library jars into final jar file -->
<!--<zipgroupfileset refid="lib.jars"/>-->
</jar>
</target>
<target name="clean" description="Remove build and dist directories">
<delete dir="${build}"/>
<delete dir="${dist}"/>
<delete dir="${doc}"/>
<delete dir="${test.reports}"/>
</target>
<target name="testcompile" depends="compile" description="Compile all unit and system tests">
<Compile srcdir="${testd}" destdir="${build.test}">
<classpath refid="classpath.test"/>
</Compile>
</target>
<target name="test" depends="testcompile" description="Run all unit tests">
<RunJunit>
<batchtest>
<fileset dir="${build.test}">
<include name="**/*Test.class"/>
<exclude name="**/*$*.class"/>
<exclude name="simpledb/systemtest/*.class"/>
</fileset>
</batchtest>
</RunJunit>
</target>
<target name="systemtest" depends="testcompile" description="Run all system tests">
<RunJunit>
<batchtest>
<fileset dir="${build.test}">
<include name="simpledb/systemtest/*Test.class"/>
</fileset>
</batchtest>
</RunJunit>
</target>
<target name="runtest" depends="testcompile"
description="Runs the test you specify on the command line with -Dtest=">
<!-- Check for -Dtest command line argument -->
<fail unless="test" message="You must run this target with -Dtest=TestName"/>
<!-- Check if the class exists -->
<available property="test.exists" classname="simpledb.${test}">
<classpath refid="classpath.test" />
</available>
<fail unless="test.exists" message="Test ${test} could not be found"/>
<RunJunit>
<test name="simpledb.${test}"/>
</RunJunit>
</target>
<target name="runsystest" depends="testcompile"
description="Runs the system test you specify on the command line with -Dtest=">
<!-- Check for -Dtest command line argument -->
<fail unless="test" message="You must run this target with -Dtest=TestName"/>
<!-- Check if the class exists -->
<available property="test.exists" classname="simpledb.systemtest.${test}">
<classpath refid="classpath.test" />
</available>
<fail unless="test.exists" message="Test ${test} could not be found"/>
<RunJunit>
<test name="simpledb.systemtest.${test}"/>
</RunJunit>
</target>
<!-- The following target is used for automated grading. -->
<target name="test-report" depends="testcompile"
description="Generates HTML test reports in ${test.reports}">
<mkdir dir="${test.reports}"/>
<!-- do not halt on failure so we always produce HTML reports. -->
<RunJunit haltonfailure="no">
<formatter type="xml"/>
<formatter type="plain" usefile="true"/>
<batchtest todir="${test.reports}" >
<fileset dir="${build.test}">
<include name="**/*Test.class"/>
<exclude name="**/*$*.class"/>
</fileset>
</batchtest>
</RunJunit>
<junitreport todir="${test.reports}">
<fileset dir="${test.reports}">
<include name="TEST-*.xml" />
</fileset>
<report todir="${test.reports}" />
</junitreport>
<!-- Fail here if the junit tests failed. -->
<fail if="junit.failed" message="Some JUnit tests failed"/>
</target>
<target name="handin" depends="clean"
description="Create a tarball of your code to hand in">
<tar destfile="lab-handin.tar.bz2" compression="bzip2"
basedir="." />
<echo message="Tarball created! Please submit 'lab-handin.tar.bz2' per the instructions in the lab document." />
<subant target="dist">
<fileset dir="." includes="build.xml"/>
</subant>
</target>
<target name="test-and-handin" depends="test,systemtest,handin"
description="Run all the tests and system tests; if they succeed, create a tarball of the source code to submit" />
</project>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。