-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
100 lines (100 loc) · 3.6 KB
/
build.xml
File metadata and controls
100 lines (100 loc) · 3.6 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
<project name="Finance-project" basedir=".">
<target name="clean">
<delete dir="build"/>
<delete dir="test"/>
<delete dir="metricsReports"/>
<delete dir="bugs"/>
</target>
<path id="pitest.path">
<pathelement location="lib/pitest-1.9.3.jar"/>
<pathelement location="lib/pitest-ant-1.9.3.jar"/>
<pathelement location="lib/pitest-entry-1.9.3.jar"/>
</path>
<path id="test.path">
<pathelement location="lib/junit-4.13.2.jar"/>
<pathelement location="lib/hamcrest-all-1.3.jar"/>
<pathelement location="test"/>
<pathelement location="build/class"/>
</path>
<path id="mutation.path">
<path refid="pitest.path"/>
<path refid="test.path"/>
</path>
<target name="compile">
<mkdir dir="build/class"/>
<javac srcdir="src" destdir="build/class" includeantruntime="false" debug="true" debuglevel="source,lines">
<classpath>
<path refid="mutation.path"/>
</classpath>
</javac>
</target>
<target name="jar" depends="compile">
<mkdir dir="build/jar"/>
<jar destfile="build/jar/Finance.jar" basedir="build/class">
<manifest>
<attribute name="Main-Class" value="Finance"/>
</manifest>
</jar>
</target>
<target name="run" depends="jar">
<java jar="build/jar/Finance.jar" fork="true"/>
</target>
<target name="junit" depends="compile">
<mkdir dir="test/reports"/>
<junit printsummary="true">
<classpath>
<path refid="test.path"/>
</classpath>
<formatter type="xml"/>
<batchtest fork="yes" todir="test/reports">
<fileset dir="src/Test_java">
<include name="**/*Test*.java" />
</fileset>
</batchtest>
</junit>
</target>
<target name="junitreport" depends="junit">
<junitreport todir="test/reports">
<fileset dir="test/reports" includes="TEST-*.xml" />
<report todir="test/reports" />
</junitreport>
</target>
<taskdef name="pitest" classname="org.pitest.ant.PitestTask" classpathref="pitest.path" />
<target name="mutation_test" depends="junit">
<pitest features="+EXPORT"
pitClasspath="pitest.path"
threads="2"
classPath="mutation.path"
targetTests="Finance_Test"
targetClasses="Finance_Test"
reportDir="test/pitReports"
sourceDir="src"
/>
</target>
<taskdef
resource="edu/umd/cs/findbugs/anttask/tasks.properties"
classpath="C:/Users/heloi/Documents/allemagne/Syse/apache-ant-1.9.16/lib/spotbugs-ant.jar" />
<property name="spotbugs.home" value="C:\Users\heloi\Documents\allemagne\Syse\spotbugs-4.8.3" />
<target name="spotbugs" depends="jar">
<mkdir dir="bugs"/>
<spotbugs home="${spotbugs.home}"
output="html"
outputFile="bugs/FinanceBugs.html" >
<sourcePath path="src/Finance.java" />
<class location="build/jar/Finance.jar" />
</spotbugs>
</target>
<target name="metrics">
<mkdir dir="metricsReports"/>
<exec executable="scc">
<arg value="--by-file"/>
<arg value="--exclude-dir=bugs" />
<arg value="--exclude-dir=build" />
<arg value="--exclude-dir=test" />
<arg value="-f" />
<arg value="html" />
<arg value="-o" />
<arg value="metricsReports/output.html" />
</exec>
</target>
</project>