overleaf/services/git-bridge/build.xml

282 lines
No EOL
12 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project name="writelatex-git-bridge" default="all">
<property file="writelatex-git-bridge.properties"/>
<!-- Uncomment the following property if no tests compilation is needed -->
<!--
<property name="skip.tests" value="true"/>
-->
<!-- Compiler options -->
<property name="compiler.debug" value="on"/>
<property name="compiler.generate.no.warnings" value="off"/>
<property name="compiler.args" value=""/>
<property name="compiler.max.memory" value="700m"/>
<patternset id="ignored.files">
<exclude name="**/CVS/**"/>
<exclude name="**/SCCS/**"/>
<exclude name="**/RCS/**"/>
<exclude name="**/rcs/**"/>
<exclude name="**/.DS_Store/**"/>
<exclude name="**/.svn/**"/>
<exclude name="**/.pyc/**"/>
<exclude name="**/.pyo/**"/>
<exclude name="**/*.pyc/**"/>
<exclude name="**/*.pyo/**"/>
<exclude name="**/.git/**"/>
<exclude name="**/*.hprof/**"/>
<exclude name="**/_svn/**"/>
<exclude name="**/.hg/**"/>
<exclude name="**/*.lib/**"/>
<exclude name="**/*~/**"/>
<exclude name="**/__pycache__/**"/>
<exclude name="**/.bundle/**"/>
<exclude name="**/*.rbc/**"/>
</patternset>
<patternset id="library.patterns">
<include name="*.zip"/>
<include name="*.apk"/>
<include name="*.war"/>
<include name="*.egg"/>
<include name="*.ear"/>
<include name="*.ane"/>
<include name="*.swc"/>
<include name="*.jar"/>
</patternset>
<patternset id="compiler.resources">
<exclude name="**/?*.java"/>
<exclude name="**/?*.form"/>
<exclude name="**/?*.class"/>
<exclude name="**/?*.groovy"/>
<exclude name="**/?*.scala"/>
<exclude name="**/?*.flex"/>
<exclude name="**/?*.kt"/>
<exclude name="**/?*.clj"/>
</patternset>
<!-- JDK definitions -->
<property name="jdk.bin.1.7" value="${jdk.home.1.7}/bin"/>
<path id="jdk.classpath.1.7">
<fileset dir="${jdk.home.1.7}">
<include name="lib/ant-javafx.jar"/>
<include name="lib/dt.jar"/>
<include name="lib/javafx-doclet.jar"/>
<include name="lib/javafx-mx.jar"/>
<include name="lib/jconsole.jar"/>
<include name="lib/sa-jdi.jar"/>
<include name="lib/tools.jar"/>
<include name="jre/lib/charsets.jar"/>
<include name="jre/lib/deploy.jar"/>
<include name="jre/lib/htmlconverter.jar"/>
<include name="jre/lib/javaws.jar"/>
<include name="jre/lib/jce.jar"/>
<include name="jre/lib/jfr.jar"/>
<include name="jre/lib/jfxrt.jar"/>
<include name="jre/lib/jsse.jar"/>
<include name="jre/lib/management-agent.jar"/>
<include name="jre/lib/plugin.jar"/>
<include name="jre/lib/resources.jar"/>
<include name="jre/lib/rt.jar"/>
<include name="jre/lib/ext/dnsns.jar"/>
<include name="jre/lib/ext/localedata.jar"/>
<include name="jre/lib/ext/sunec.jar"/>
<include name="jre/lib/ext/sunjce_provider.jar"/>
<include name="jre/lib/ext/sunpkcs11.jar"/>
<include name="jre/lib/ext/zipfs.jar"/>
</fileset>
</path>
<property name="project.jdk.home" value="${jdk.home.1.7}"/>
<property name="project.jdk.bin" value="${jdk.bin.1.7}"/>
<property name="project.jdk.classpath" value="jdk.classpath.1.7"/>
<!-- Project Libraries -->
<path id="library.hamcrest-core-1.3.classpath">
<pathelement location="${basedir}/libs/hamcrest-core-1.3.jar"/>
</path>
<path id="library.hamcrest-library-1.3.classpath">
<pathelement location="${basedir}/libs/hamcrest-library-1.3.jar"/>
</path>
<path id="library.javax.servlet-api-3.1.0.classpath">
<pathelement location="${basedir}/libs/javax.servlet-api-3.1.0.jar"/>
</path>
<path id="library.jetty-all-9.2.3.v20140905.classpath">
<pathelement location="${basedir}/libs/jetty-all-9.2.3.v20140905.jar"/>
</path>
<path id="library.junit-4.11.classpath">
<pathelement location="${basedir}/libs/junit-4.11.jar"/>
</path>
<path id="library.org.eclipse.jgit-3.5.1.201410131835-r.classpath">
<pathelement location="${basedir}/libs/org.eclipse.jgit-3.5.1.201410131835-r.jar"/>
</path>
<path id="library.org.eclipse.jgit.http.server-3.5.1.201410131835-r.classpath">
<pathelement location="${basedir}/libs/org.eclipse.jgit.http.server-3.5.1.201410131835-r.jar"/>
</path>
<!-- Modules -->
<!-- Module writelatex-git-bridge -->
<dirname property="module.writelatex-git-bridge.basedir" file="${ant.file}"/>
<property name="module.jdk.home.writelatex-git-bridge" value="${project.jdk.home}"/>
<property name="module.jdk.bin.writelatex-git-bridge" value="${project.jdk.bin}"/>
<property name="module.jdk.classpath.writelatex-git-bridge" value="${project.jdk.classpath}"/>
<property name="compiler.args.writelatex-git-bridge" value="-encoding UTF-8 -source 1.6 ${compiler.args}"/>
<property name="writelatex-git-bridge.output.dir" value="${module.writelatex-git-bridge.basedir}/out/production/writelatex-git-bridge"/>
<property name="writelatex-git-bridge.testoutput.dir" value="${module.writelatex-git-bridge.basedir}/out/test/writelatex-git-bridge"/>
<path id="writelatex-git-bridge.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="writelatex-git-bridge.module.production.classpath">
<path refid="${module.jdk.classpath.writelatex-git-bridge}"/>
<path refid="library.org.eclipse.jgit-3.5.1.201410131835-r.classpath"/>
<path refid="library.org.eclipse.jgit.http.server-3.5.1.201410131835-r.classpath"/>
<path refid="library.javax.servlet-api-3.1.0.classpath"/>
<path refid="library.jetty-all-9.2.3.v20140905.classpath"/>
<path refid="library.hamcrest-core-1.3.classpath"/>
<path refid="library.hamcrest-library-1.3.classpath"/>
<path refid="library.junit-4.11.classpath"/>
</path>
<path id="writelatex-git-bridge.runtime.production.module.classpath">
<pathelement location="${writelatex-git-bridge.output.dir}"/>
<path refid="library.org.eclipse.jgit-3.5.1.201410131835-r.classpath"/>
<path refid="library.org.eclipse.jgit.http.server-3.5.1.201410131835-r.classpath"/>
<path refid="library.javax.servlet-api-3.1.0.classpath"/>
<path refid="library.jetty-all-9.2.3.v20140905.classpath"/>
<path refid="library.hamcrest-core-1.3.classpath"/>
<path refid="library.hamcrest-library-1.3.classpath"/>
<path refid="library.junit-4.11.classpath"/>
</path>
<path id="writelatex-git-bridge.module.classpath">
<path refid="${module.jdk.classpath.writelatex-git-bridge}"/>
<pathelement location="${writelatex-git-bridge.output.dir}"/>
<path refid="library.org.eclipse.jgit-3.5.1.201410131835-r.classpath"/>
<path refid="library.org.eclipse.jgit.http.server-3.5.1.201410131835-r.classpath"/>
<path refid="library.javax.servlet-api-3.1.0.classpath"/>
<path refid="library.jetty-all-9.2.3.v20140905.classpath"/>
<path refid="library.hamcrest-core-1.3.classpath"/>
<path refid="library.hamcrest-library-1.3.classpath"/>
<path refid="library.junit-4.11.classpath"/>
</path>
<path id="writelatex-git-bridge.runtime.module.classpath">
<pathelement location="${writelatex-git-bridge.testoutput.dir}"/>
<pathelement location="${writelatex-git-bridge.output.dir}"/>
<path refid="library.org.eclipse.jgit-3.5.1.201410131835-r.classpath"/>
<path refid="library.org.eclipse.jgit.http.server-3.5.1.201410131835-r.classpath"/>
<path refid="library.javax.servlet-api-3.1.0.classpath"/>
<path refid="library.jetty-all-9.2.3.v20140905.classpath"/>
<path refid="library.hamcrest-core-1.3.classpath"/>
<path refid="library.hamcrest-library-1.3.classpath"/>
<path refid="library.junit-4.11.classpath"/>
</path>
<patternset id="excluded.from.module.writelatex-git-bridge">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.writelatex-git-bridge">
<patternset refid="excluded.from.module.writelatex-git-bridge"/>
</patternset>
<path id="writelatex-git-bridge.module.sourcepath">
<dirset dir="${module.writelatex-git-bridge.basedir}">
<include name="src"/>
</dirset>
</path>
<path id="writelatex-git-bridge.module.test.sourcepath">
<dirset dir="${module.writelatex-git-bridge.basedir}">
<include name="test"/>
</dirset>
</path>
<target name="compile.module.writelatex-git-bridge" depends="compile.module.writelatex-git-bridge.production,compile.module.writelatex-git-bridge.tests" description="Compile module writelatex-git-bridge"/>
<target name="compile.module.writelatex-git-bridge.production" description="Compile module writelatex-git-bridge; production classes">
<mkdir dir="${writelatex-git-bridge.output.dir}"/>
<javac destdir="${writelatex-git-bridge.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.writelatex-git-bridge}/javac">
<compilerarg line="${compiler.args.writelatex-git-bridge}"/>
<bootclasspath refid="writelatex-git-bridge.module.bootclasspath"/>
<classpath refid="writelatex-git-bridge.module.production.classpath"/>
<src refid="writelatex-git-bridge.module.sourcepath"/>
<patternset refid="excluded.from.compilation.writelatex-git-bridge"/>
</javac>
<copy todir="${writelatex-git-bridge.output.dir}">
<fileset dir="${module.writelatex-git-bridge.basedir}/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.writelatex-git-bridge.tests" depends="compile.module.writelatex-git-bridge.production" description="compile module writelatex-git-bridge; test classes" unless="skip.tests">
<mkdir dir="${writelatex-git-bridge.testoutput.dir}"/>
<javac destdir="${writelatex-git-bridge.testoutput.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.writelatex-git-bridge}/javac">
<compilerarg line="${compiler.args.writelatex-git-bridge}"/>
<bootclasspath refid="writelatex-git-bridge.module.bootclasspath"/>
<classpath refid="writelatex-git-bridge.module.classpath"/>
<src refid="writelatex-git-bridge.module.test.sourcepath"/>
<patternset refid="excluded.from.compilation.writelatex-git-bridge"/>
</javac>
<copy todir="${writelatex-git-bridge.testoutput.dir}">
<fileset dir="${module.writelatex-git-bridge.basedir}/test">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="clean.module.writelatex-git-bridge" description="cleanup module">
<delete dir="${writelatex-git-bridge.output.dir}"/>
<delete dir="${writelatex-git-bridge.testoutput.dir}"/>
</target>
<target name="init" description="Build initialization">
<!-- Perform any build initialization in this target -->
</target>
<target name="test" depends="compile.module.writelatex-git-bridge.tests">
<junit>
<classpath>
<path refid="writelatex-git-bridge.module.classpath"/>
<pathelement location="${writelatex-git-bridge.testoutput.dir}"/>
</classpath>
<batchtest>
<fileset dir="${writelatex-git-bridge.testoutput.dir}">
</fileset>
</batchtest>
<formatter type="brief" usefile="false"/>
</junit>
</target>
<target name="clean" depends="clean.module.writelatex-git-bridge" description="cleanup all"/>
<target name="build.modules" depends="init, clean, compile.module.writelatex-git-bridge" description="build all modules"/>
<target name="all" depends="build.modules" description="build all"/>
</project>