| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291 |
- <?xml version="1.0" encoding="UTF-8"?>
- <project name="writelatex-git-bridge" default="all">
- <!-- 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>
-
-
- <!-- 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="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="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">
- <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">
- <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">
- <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="clean.modules" depends="clean.module.writelatex-git-bridge">
- <delete dir="${module.writelatex-git-bridge.basedir}/out" />
- </target>
-
- <target name="init" description="Build initialization">
- <!-- Perform any build initialization in this target -->
- </target>
-
- <target name="clean" depends="clean.modules" description="cleanup all">
- <delete dir="${module.writelatex-git-bridge.basedir}/bin" />
- </target>
-
- <target name="build.modules" depends="init, clean, compile.module.writelatex-git-bridge" description="build all modules"/>
-
- <target name="init.artifacts">
- <property name="artifacts.temp.dir" value="${basedir}/__artifacts_temp"/>
- <property name="artifact.output.writelatex-git-bridge:jar" value="${basedir}/out/artifacts/writelatex_git_bridge_jar"/>
- <mkdir dir="${artifacts.temp.dir}"/>
- <property name="temp.jar.path.writelatex-git-bridge.jar" value="${artifacts.temp.dir}/writelatex-git-bridge.jar"/>
- </target>
-
- <target name="artifact.writelatex-git-bridge:jar" depends="init.artifacts, compile.module.writelatex-git-bridge, compile.module.writelatex-git-bridge" description="Build 'writelatex-git-bridge:jar' artifact">
- <property name="artifact.temp.output.writelatex-git-bridge:jar" value="${artifacts.temp.dir}/writelatex_git_bridge_jar"/>
- <mkdir dir="${artifact.temp.output.writelatex-git-bridge:jar}"/>
- <jar destfile="${temp.jar.path.writelatex-git-bridge.jar}" duplicate="preserve" filesetmanifest="mergewithoutmain">
- <zipfileset dir="${writelatex-git-bridge.output.dir}"/>
- <zipfileset dir="${writelatex-git-bridge.testoutput.dir}"/>
- <zipfileset excludes="META-INF/**/*" src="${basedir}/libs/org.eclipse.jgit.http.server-3.5.1.201410131835-r.jar"/>
- <zipfileset excludes="META-INF/**/*" src="${basedir}/libs/junit-4.11.jar"/>
- <zipfileset excludes="META-INF/**/*" src="${basedir}/libs/javax.servlet-api-3.1.0.jar"/>
- <zipfileset excludes="META-INF/**/*" src="${basedir}/libs/hamcrest-core-1.3.jar"/>
- <zipfileset excludes="META-INF/**/*" src="${basedir}/libs/org.eclipse.jgit-3.5.1.201410131835-r.jar"/>
- <zipfileset excludes="META-INF/**/*" src="${basedir}/libs/jetty-all-9.2.3.v20140905.jar"/>
- <zipfileset excludes="META-INF/**/*" src="${basedir}/libs/hamcrest-library-1.3.jar"/>
- </jar>
- <copy file="${temp.jar.path.writelatex-git-bridge.jar}" tofile="${artifact.temp.output.writelatex-git-bridge:jar}/writelatex-git-bridge.jar"/>
- </target>
-
- <target name="build.all.artifacts" depends="artifact.writelatex-git-bridge:jar" description="Build all artifacts">
- <mkdir dir="${artifact.output.writelatex-git-bridge:jar}"/>
- <copy todir="${artifact.output.writelatex-git-bridge:jar}">
- <fileset dir="${artifact.temp.output.writelatex-git-bridge:jar}"/>
- </copy>
-
- <!-- Delete temporary files -->
- <delete dir="${artifacts.temp.dir}"/>
- </target>
- <target name="test.unit" 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="test.system" depends="package">
- <property name="executable-full-path"
- location="${module.writelatex-git-bridge.basedir}/test/system"/>
- <exec executable="${executable-full-path}/main.sh" />
- </target>
- <target name="test" depends="test.unit, test.system, clean" />
- <target name="package" depends="build.all.artifacts">
- <mkdir dir="${module.writelatex-git-bridge.basedir}/bin" />
- <copy file="${artifact.output.writelatex-git-bridge:jar}/writelatex-git-bridge.jar" tofile="${module.writelatex-git-bridge.basedir}/bin/writelatex-git-bridge.jar" />
- </target>
-
- <target name="all" depends="build.modules, test.unit, package, clean.modules, test.system" description="build all"/>
- </project>
|