代码拉取完成,页面将自动刷新
<?xml version='1.0'?>
<project name="marauroa" default="dist" basedir="." xmlns:jacoco="antlib:org.jacoco.ant">
<property file="build.ant.properties"/>
<property name="jarname" value="marauroa-${version}.jar"/>
<property name="jarname_client" value="marauroa-client-only-${version}.jar"/>
<path id="compile-classpath">
<pathelement path="${log4j_jar}"/>
<pathelement path="${junit_jar}"/>
<pathelement path="${jnlp_jar}"/>
<pathelement path="${jython_jar}"/>
<fileset dir="${libdir}">
<include name="jetty*.jar"/>
<include name="json-simple*.jar"/>
<include name="servlet*.jar"/>
<include name="websocket*.jar" />
</fileset>
</path>
<path id="compile-tests-classpath">
<path refid="compile-classpath" />
<path location="${build-classes}" />
</path>
<path id="run-tests-classpath">
<path refid="compile-tests-classpath" />
<pathelement location="${h2_jar}"/>
<pathelement path="${build-tests}" />
<pathelement path="."/>
</path>
<!-- Clears the instalation -->
<target name="clean">
<delete dir="${build}"/>
<delete dir="${docs}"/>
<delete dir="${build-archive}"/>
<delete dir="${dist}"/>
</target>
<!-- Create the initial folders for the build -->
<target name="init">
<mkdir dir="${build-archive}" />
<mkdir dir="${build}" />
<mkdir dir="${build-classes}" />
<mkdir dir="${build-tests}" />
<mkdir dir="${build-tests-report}" />
<mkdir dir="${build-coverage}" />
<mkdir dir="${dist}" />
<mkdir dir="${docs}" />
</target>
<!-- Compiles the project -->
<target name="compile" depends="init">
<!-- Exclude python support if jython.jar is not present -->
<condition property="exclude.python" value="**/python/*.*">
<not>
<available file="${jython_jar}"/>
</not>
</condition>
<!-- Exclude junit support if junit is not present -->
<condition property="exclude.junit" value="**/*tests/*.*">
<not>
<available file="${junit_jar}"/>
</not>
</condition>
<!-- exclude.web -->
<condition property="exclude.web" value="**/web/*.*">
<or>
<not>
<available file="${servletapi_jar}"/>
</not>
<not>
<available file="${socketio_jar}"/>
</not>
</or>
</condition>
<!-- Update version number. -->
<replaceregexp file="${src}/marauroa/server/marauroad.java"
match="private static final String VERSION = ".*";"
replace="private static final String VERSION = "${version}";"
byline="true"/>
<!-- Compile it -->
<javac srcdir="${src}" source="8" target="8" destdir="${build-classes}" debug="true" debuglevel="source,lines" includes="**/marauroa/**" excludes="${exclude.python};${exclude.junit};${exclude.web}" includeantruntime="false">
<compilerarg line="-encoding utf-8"/>
<classpath refid="compile-classpath" />
</javac>
<copy todir="${build-classes}/marauroa/server/">
<fileset dir="${src}/marauroa/server">
<include name="*.sql"/>
<include name="*.properties"/>
</fileset>
</copy>
<ant target="compile-js" />
<mkdir dir="${build-classes}/js" />
<copy todir="${build-classes}/js">
<fileset dir="src/js">
<include name="*"/>
</fileset>
</copy>
</target>
<!-- Compiles the client-only library -->
<target name="compile-client">
<delete dir="${build-client}" quiet="true" />
<mkdir dir="${build-client}"/>
<!-- Compile it -->
<javac srcdir="${src}" source="8" target="8" destdir="${build-client}" debug="true" debuglevel="source,lines" includeantruntime="false">
<compilerarg line="-encoding utf-8"/>
<include name="marauroa/client/**"/>
<include name="marauroa/common/**"/>
<classpath>
<pathelement path="${log4j_jar}"/>
<pathelement path="${jnlp_jar}"/>
</classpath>
</javac>
</target>
<!-- Compiles the client-only library -->
<target name="compile-js">
<java jar="buildtools/closure-compiler/compiler.jar" fork="true" failonerror="true" maxmemory="128m">
<arg value="--js"/>
<arg value="src/js/marauroa.js"/>
<arg value="--js"/>
<arg value="src/js/inflate.js"/>
<arg value="--js"/>
<arg value="src/js/encoding.js"/>
<arg value="--js"/>
<arg value="src/js/deserializer.js"/>
<arg value="--js"/>
<arg value="src/js/client-framework.js"/>
<arg value="--js"/>
<arg value="src/js/message-factory.js"/>
<arg value="--js"/>
<arg value="src/js/rpfactory.js"/>
<arg value="--js"/>
<arg value="src/js/perception.js"/>
<arg value="--js_output_file"/>
<arg value="${build-classes}/js/marauroa.compiled.js"/>
<arg value="--compilation_level"/>
<arg value="SIMPLE_OPTIMIZATIONS"/>
</java>
</target>
<!-- Generate Java docs -->
<target name="docs" depends="compile">
<javadoc packagenames="marauroa.*"
defaultexcludes="yes"
destdir="${docs}"
author="true"
version="true"
use="true"
windowtitle="Marauroa API Documentation Version: ${version}">
<classpath refid="compile-classpath" />
<packageset dir="src" defaultexcludes="yes" />
</javadoc>
</target>
<!-- Create jar file for Marauroa -->
<target name="jar-all" depends="compile">
<jar jarfile="${build-archive}/${jarname}" basedir="${build-classes}/">
<manifest>
<attribute name="Main-Class" value="marauroa.server.marauroad"/>
</manifest>
</jar>
<copy tofile="${build-archive}/marauroa.jar" file="${build-archive}/${jarname}"/>
</target>
<!-- Create jar file for Marauroa -->
<target name="jar-client" depends="compile-client">
<jar jarfile="${build-archive}/${jarname_client}" basedir="${build-client}/" />
</target>
<target name="jar" depends="jar-all, jar-client" />
<!-- Prepare the tarball for releases -->
<target name="dist_binary" depends="jar">
<replaceregexp file="${extras}/marauroad.bat"
match="set LOCALCLASSPATH=.*"
replace="set LOCALCLASSPATH=.;marauroa-${version}.jar;${jython_jar};${h2_jar};${connectorJ_jar};${log4j_jar};${servlet_jar};${socketio_jar};${jetty_client_jar};${jetty_continuation_jar};${jetty_http_jar};${jetty_io_jar};${jetty_security_jar};${jetty_server_jar};${jetty_servlet_jar};${jetty_util_jar};${jetty_webapp_jar};${jetty_websocket_jar};${jetty_xml_jar}"
byline="true"/>
<replaceregexp file="${extras}/marauroad"
match="export LOCALCLASSPATH=.*"
replace="export LOCALCLASSPATH=.:libs/marauroa-${version}.jar:${jython_jar}:${h2_jar}:${connectorJ_jar}:${log4j_jar}:${servlet_jar}:${socketio_jar}:${jetty_client_jar}:${jetty_continuation_jar}:${jetty_http_jar}:${jetty_io_jar}:${jetty_security_jar}:${jetty_server_jar}:${jetty_servlet_jar}:${jetty_util_jar}:${jetty_webapp_jar}:${jetty_websocket_jar}:${jetty_xml_jar}"
byline="true"/>
<mkdir dir="marauroa-${version}"/>
<mkdir dir="marauroa-${version}/libs"/>
<copy todir="marauroa-${version}" file="${extras}/marauroad.bat"/>
<copy todir="marauroa-${version}" file="${extras}/marauroad"/>
<copy todir="marauroa-${version}" file="${build-archive}/${jarname}"/>
<copy todir="marauroa-${version}" file="${build-archive}/${jarname_client}"/>
<copy todir="marauroa-${version}/libs">
<fileset dir="${libdir}">
<exclude name="jnlp.jar" />
<exclude name="junit-4.4jar" />
</fileset>
</copy>
<copy todir="marauroa-${version}" file="AUTHORS.txt"/>
<copy todir="marauroa-${version}" file="CHANGES.txt"/>
<copy todir="marauroa-${version}" file="LICENSE.txt"/>
<copy todir="marauroa-${version}" file="README.md"/>
<zip destfile="${dist}/marauroa-${version}.zip" basedir="marauroa-${version}"/>
<delete dir="marauroa-${version}"/>
</target>
<target name="dist_docs" depends="docs">
<mkdir dir="marauroa-${version}"/>
<copy todir="marauroa-${version}/${docs}">
<fileset dir="${docs}"/>
</copy>
<copy todir="marauroa-${version}" file="AUTHORS.txt"/>
<copy todir="marauroa-${version}" file="CHANGES.txt"/>
<copy todir="marauroa-${version}" file="LICENSE.txt"/>
<copy todir="marauroa-${version}" file="README.md"/>
<zip destfile="${dist}/marauroa-${version}-docs.zip" basedir="marauroa-${version}"/>
<delete dir="marauroa-${version}"/>
</target>
<target name="dist_source" depends="docs">
<mkdir dir="marauroa-${version}"/>
<copy todir="marauroa-${version}/src">
<fileset dir="src"/>
</copy>
<copy todir="marauroa-${version}/tests">
<fileset dir="tests"/>
</copy>
<copy todir="marauroa-${version}/functional_tests">
<fileset dir="functional_tests"/>
</copy>
<copy todir="marauroa-${version}/extras">
<fileset dir="extras"/>
</copy>
<copy todir="marauroa-${version}/libs">
<fileset dir="libs"/>
</copy>
<copy todir="marauroa-${version}" file="build.xml"/>
<copy todir="marauroa-${version}" file="build.ant.properties"/>
<copy todir="marauroa-${version}" file="AUTHORS.txt"/>
<copy todir="marauroa-${version}" file="CHANGES.txt"/>
<copy todir="marauroa-${version}" file="LICENSE.txt"/>
<copy todir="marauroa-${version}" file="README.md"/>
<tar destfile="${dist}/marauroa-${version}-src.tar.gz" compression="gzip">
<tarfileset dir="marauroa-${version}" prefix="marauroa-${version}">
<exclude name="**/CVS/**"/>
</tarfileset>
</tar>
<delete dir="marauroa-${version}"/>
</target>
<!-- builds the whole project for releasing -->
<target name="dist" depends="dist_binary, dist_docs, dist_source"/>
<!-- testing targets -->
<target name="compile-tests" depends="compile">
<javac srcdir="${src-test}" source="8" target="8" destdir="${build-tests}" debug="true" debuglevel="source,lines" includes="**/marauroa/**" excludes="${exclude.python};${exclude.junit}" includeantruntime="false">
<compilerarg line="-encoding utf-8"/>
<classpath refid="compile-tests-classpath" />
</javac>
<javac srcdir="functional_tests" source="8" target="8" destdir="${build-tests}" debug="true" debuglevel="source,lines" includes="**/marauroa/**" excludes="${exclude.python};${exclude.junit}" includeantruntime="false">
<compilerarg line="-encoding utf-8"/>
<classpath refid="compile-tests-classpath" />
</javac>
<copy todir="${build-tests}">
<fileset dir="${src-test}">
<include name="**/*.*" />
<exclude name="**/*.java" />
<exclude name="**/*.ini" />
</fileset>
</copy>
<copy file="${test-server-ini}" tofile="./server.ini" />
</target>
<target name="test" depends="compile-tests">
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
<classpath path="buildtools/jacoco/jacocoant.jar"/>
</taskdef>
<jacoco:coverage destfile="build/jacoco.exec" append="false">
<junit printsummary="yes" fork="yes" forkmode="once" haltonerror="true" haltonfailure="true">
<jvmarg value="-Djava.awt.headless=true"/>
<classpath refid="run-tests-classpath" />
<formatter type="plain" usefile="false"/>
<formatter type="xml"/>
<batchtest todir="${build-tests-report}">
<fileset dir="${src-test}">
<include name="**/*Test.java"/>
<include name="**/Test*.java"/>
</fileset>
<fileset dir="functional_tests">
<include name="**/*Test.java"/>
<include name="**/Test*.java"/>
</fileset>
</batchtest>
</junit>
</jacoco:coverage>
<jacoco:report>
<executiondata>
<file file="build/jacoco.exec" />
</executiondata>
<structure name="${ant.project.name}">
<classfiles>
<fileset dir="${build-classes}" />
</classfiles>
<sourcefiles encoding="UTF-8">
<fileset dir="${src}" />
</sourcefiles>
</structure>
<xml destfile="${build-coverage}/jacoco.xml" />
</jacoco:report>
</target>
</project>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。