-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
75 lines (67 loc) · 2.5 KB
/
build.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="CSRR" default="test" basedir=".">
<description>
Build file do projeto CSRR
</description>
<!-- set global properties for this build -->
<property name="src" location="src/main/java" />
<property name="src.tests" location="src/test/java" />
<property name="build.root" location="target" />
<property name="build" location="target/classes" />
<property name="build.tests" location="target/testClasses" />
<property name="report.tests" location="target/reports/tests" />
<property name="dist" location="dist" />
<property name="project" value="csrr" />
<target name="init">
<!-- Create the time stamp -->
<tstamp />
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}" />
</target>
<target name="compile" depends="init" description="compile the source ">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}" />
</target>
<target name="dist" depends="compile" description="generate the distribution">
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib" />
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/lib/${project}-${DSTAMP}.jar" basedir="${build}" />
</target>
<target name="clean" description="clean up">
<!-- Delete the ${build.root} and ${dist} directory trees -->
<delete dir="${build.root}" />
<delete dir="${dist}" />
</target>
<target name="test" description="execute all the tests of the project" depends="dist">
<mkdir dir="${build.tests}" />
<mkdir dir="${report.tests}" />
<javac srcdir="${src.tests}" destdir="${build.tests}">
<classpath>
<pathelement path="${java.class.path}" />
<pathelement location="${build}" />
<fileset dir="lib">
<include name="**/*.jar" />
<exclude name="**/*-sources.jar" />
</fileset>
</classpath>
</javac>
<junit printsummary="withOutAndErr" haltonfailure="yes">
<classpath>
<pathelement location="${build}" />
<pathelement location="${build.tests}" />
<pathelement path="${java.class.path}" />
<fileset dir="lib">
<include name="**/*.jar" />
<exclude name="**/*-sources.jar" />
</fileset>
</classpath>
<formatter type="plain" />
<batchtest fork="yes" todir="${report.tests}">
<fileset dir="${build.tests}">
<include name="**/Teste*.class" />
</fileset>
</batchtest>
</junit>
</target>
</project>