-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
116 lines (89 loc) · 3.52 KB
/
build.xml
File metadata and controls
116 lines (89 loc) · 3.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<project default="all">
<property file="build.properties" />
<!-- classes in ant-lib:
about.jar jce.jar junit-4.7-SNAPSHOT-20090511-2347.jar management-agent.jar rhino.jar
charsets.jar jsse.jar log4j.xml resources.jar rt.jar
-->
<property name="lib.dir" value="../SyncYourSecrets-SWT/contrib/" />
<property name="src.tests" value="test/src" />
<property name="ant-lib" value="../ant-libs" />
<property name="classes.compile" value="${buildDirectory}/classes" />
<property name="reports.tests" value="${buildDirectory}/reports/xml" />
<property name="reports.html" value="${buildDirectory}/reports/html" />
<property name="test.resources" value="${buildDirectory}/test/resources" />
<path id="classpath.ant">
<fileset dir="${ant-lib}" includes="**/*.*" />
<!-- test commit -->
</path>
<path id="classpath.xmlbase">
<fileset file="../SyncYourSecrets-SWT/lib/syncyoursecrets-xmlbase.jar" />
</path>
<path id="classpath.base">
<fileset dir="${lib.dir}" includes="**/*.jar" />
<path refid="classpath.ant" />
<path refid="classpath.xmlbase" />
</path>
<path id="classpath.test.compile">
<path refid="classpath.base" />
<pathelement location="../target/syncyoursecrets-xmlbase/test-classes" />
<pathelement location="../SyncYourSecrets-SWT/lib/syncyoursecrets-pwmodel.jar" />
</path>
<path id="classpath.test.run">
<path refid="classpath.test.compile" />
<pathelement location="${buildDirectory}/test-classes" />
</path>
<path id="testbaseclasspath">
<fileset dir="../SyncYourSecrets-SWT/" includes="**/*.jar" />
</path>
<target name="all" depends="clean,jar,runtest,test-reports">
</target>
<target name="clean">
<delete dir="${buildDirectory}" />
</target>
<target name="compile" depends="init">
<mkdir dir="${buildDirectory}/classes" />
<javac srcdir="src" destdir="${classes.compile}" source="1.6" target="1.6" classpathref="classpath.base" debug="true" debuglevel="lines,vars,source" />
</target>
<target name="testcompile" depends="jar">
<mkdir dir="${buildDirectory}/test-classes" />
<javac srcdir="test/src" destdir="${buildDirectory}/test-classes" source="1.6" target="1.6" classpathref="classpath.test.compile" debug="true" debuglevel="lines,vars,source" />
<copy todir="${buildDirectory}/test-classes">
<fileset dir="test/src" excludes="**/*.java" />
</copy>
<copy todir="${test.resources}">
<fileset dir="test/resources" />
</copy>
</target>
<target name="jar" depends="compile">
<jar destfile="../SyncYourSecrets-SWT/lib/syncyoursecrets-pwmodel.jar" basedir="${classes.compile}">
</jar>
</target>
<target name="init">
<mkdir dir="${buildDirectory}" />
<mkdir dir="${classes.compile}" />
<mkdir dir="${buildDirectory}/reports" />
<mkdir dir="${reports.tests}" />
<mkdir dir="${reports.html}" />
</target>
<target name="runtest" depends="testcompile">
<junit printsummary="yes" haltonfailure="false" dir="../SyncYourSecrets-pwmodel" fork="false">
<formatter type="xml" />
<sysproperty key="test.resources" value="${test.resources}" />
<classpath refid="classpath.test.run" />
<batchtest todir="${reports.tests}">
<fileset dir="${src.tests}">
<include name="**/*Test.java" />
<exclude name="**/*AllTests.java" />
</fileset>
</batchtest>
</junit>
</target>
<target name="test-reports" depends="runtest">
<junitreport>
<fileset dir="${reports.tests}">
<include name="*.xml" />
</fileset>
<report format="frames" todir="${reports.html}" />
</junitreport>
</target>
</project>