-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
46 lines (42 loc) · 1.72 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
<project name="Projecto Monster Portal para a faculdade Pentágono">
<!--<path id="JUnit 4.libraryclasspath">
<pathelement location="${JUNIT_HOME}/junit.jar"/>
<pathelement location="${JUNIT_HOME}/hamcrest-core.jar"/>
</path>
<path id="projectname.classpath">
<pathelement location="your_bin_folder"/>
<path refid="JUnit 4.libraryclasspath"/>
</path>
in your javac task include the classpath
<javac debug="true" debuglevel="${debuglevel}" destdir="your_bin_folder" source="${source}" target="${target}">
<src path="src"/>
<classpath refid="projectname.classpath"/>
</javac> -->
<path id="tests.classpath" path=".">
<fileset dir="lib/">
<include name="*.jar" />
</fileset>
<pathelement path="target/classes/" />
</path>
<target name="compile">
<mkdir dir="target/classes/"/>
<mkdir dir="target/classes-test/"/>
<javac destdir="target/classes/" srcdir="src" debug="true" encoding="UTF-8" />
<javac destdir="target/classes-test/" srcdir="src/test/java/" classpathref="tests.classpath" debug="true" encoding="UTF-8" />
</target>
<target name="test" depends="compile">
<junit fork="yes" forkmode="once" printsummary="true" showoutput="true" failureproperty="failed-test" haltonfailure="true" >
<formatter type="plain" usefile="false" />
<classpath location="target/classes-test/" />
<classpath refid="tests.classpath" />
<batchtest fork="yes" todir="${artifacts.dir}/reports">
<fileset dir="target/classes-test/" >
<include name="**/*Test*.class" />
</fileset>
</batchtest>
</junit>
</target>
<target name="jar" depends="test">
<jar destfile="target/monster-portal.jar" basedir="target/classes/" />
</target>
</project>