1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <project basedir="." default="build" name="cacert-gigi">
3 <property environment="env"/>
4 <property name="junit.output.dir" value="junit"/>
5 <property name="debuglevel" value="source,lines,vars"/>
6 <property name="target" value="1.8"/>
7 <property name="source" value="1.8"/>
8 <property name="mysqlconnector" value="mysql-connector-java-5.1.31-bin.jar"/>
9 <property name="juintexec" value="."/>
10 <path id="JUnit 4.libraryclasspath">
11 <pathelement location="${juintexec}/junit.jar"/>
12 <pathelement location="${juintexec}/org.hamcrest.core.jar"/>
14 <path id="cacert-gigi.classpath">
15 <pathelement location="bin"/>
16 <pathelement location="${mysqlconnector}"/>
18 <path id="cacert-gigi.test.classpath">
19 <pathelement location="bin"/>
20 <pathelement location="bintest"/>
21 <path refid="JUnit 4.libraryclasspath"/>
22 <pathelement location="${mysqlconnector}"/>
26 <mkdir dir="bintest"/>
28 <copy includeemptydirs="false" todir="bin">
29 <fileset dir="lib/servlet-api">
30 <exclude name="**/*.launch"/>
31 <exclude name="**/*.java"/>
34 <copy includeemptydirs="false" todir="bin">
35 <fileset dir="lib/jetty">
36 <exclude name="**/*.launch"/>
37 <exclude name="**/*.java"/>
40 <copy includeemptydirs="false" todir="bin">
42 <exclude name="**/*.launch"/>
43 <exclude name="**/*.java"/>
46 <copy includeemptydirs="false" todir="bin">
48 <exclude name="**/*.launch"/>
49 <exclude name="**/*.java"/>
52 <copy includeemptydirs="false" todir="bintest">
54 <exclude name="**/*.launch"/>
55 <exclude name="**/*.java"/>
62 <target depends="clean" name="cleanall"/>
63 <target depends="build-subprojects,build-project" name="build"/>
64 <target name="build-subprojects"/>
65 <target depends="init" name="build-project">
66 <echo message="${ant.project.name}: ${ant.file}"/>
67 <javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}">
68 <src path="lib/servlet-api"/>
69 <src path="lib/jetty"/>
70 <src path="lib/jtar"/>
73 <classpath refid="cacert-gigi.classpath"/>
76 <target depends="init" name="build-project-test">
77 <echo message="${ant.project.name}: ${ant.file}"/>
78 <javac debug="true" debuglevel="${debuglevel}" destdir="bintest" includeantruntime="false" source="${source}" target="${target}">
80 <classpath refid="cacert-gigi.test.classpath"/>
83 <target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
84 <target name="FetchLocales">
85 <java classname="org.cacert.gigi.util.FetchLocales" failonerror="true" fork="yes">
86 <classpath refid="cacert-gigi.classpath"/>
89 <target name="Launcher">
90 <java classname="org.cacert.gigi.Launcher" failonerror="true" fork="yes">
91 <classpath refid="cacert-gigi.classpath"/>
95 <target name="check-generateKeys">
96 <available file="config/keystore.pkcs12" property="keystore.present"/>
98 <target name="generateKeys" depends="check-generateKeys" unless="keystore.present">
99 <exec executable="./generateKeys.sh" dir="doc/scripts"/>
100 <exec executable="./generateTruststore.sh" dir="doc/scripts">
101 <arg value="-noprompt"/>
104 <target name="test" depends="build-project-test,generateKeys,FetchLocales">
105 <mkdir dir="${junit.output.dir}"/>
106 <junit fork="yes" printsummary="withOutAndErr">
107 <formatter type="xml"/>
108 <test name="org.cacert.gigi.TestSSL" todir="${junit.output.dir}"/>
109 <test name="org.cacert.gigi.LoginTest" todir="${junit.output.dir}"/>
110 <test name="org.cacert.gigi.pages.main.RegisterPageTest" todir="${junit.output.dir}"/>
111 <test name="org.cacert.gigi.pages.wot.TestAssurance" todir="${junit.output.dir}"/>
112 <classpath refid="cacert-gigi.test.classpath"/>
115 <target name="junitreport">
116 <junitreport todir="${junit.output.dir}">
117 <fileset dir="${junit.output.dir}">
118 <include name="TEST-*.xml"/>
120 <report format="frames" todir="${junit.output.dir}"/>