-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
90 lines (78 loc) · 3.15 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?xml version="1.0"?>
<project name="plp" default="compile" basedir=".">
<property name="src" value="src" />
<property name="build" value="bin" />
<property name="src.tests" value="test" />
<property name="build.tests" value="tmp" />
<property name="reports.tests" value="tmp" />
<property name="html" value="html" />
<property name="applet" value="applet" />
<target name="init">
<mkdir dir="${build}" />
<mkdir dir="${build.tests}" />
<mkdir dir="${reports.tests}" />
</target>
<target name="applet" depends="compile">
<loadproperties srcfile="${applet}/applet.version" />
<buildnumber id="build.number" file="${applet}/applet.build" />
<property name="version" value="${version.number}.${build.number}" />
<echo message="Versão: ${version}" />
<jar destfile="${applet}/applet.jar" basedir="${build}">
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Main-Class" value="plp.AppletInterpretadorPLP" />
<attribute name="Implementation-Version" value="${version}" />
</manifest>
</jar>
</target>
<target name="javacc" depends="init">
<java classpath="lib/javacc.jar" classname="javacc">
<arg value="-OUTPUT_DIRECTORY=${src}/plp/expressions1/parser" />
<arg value="${src}/plp/expressions1/parser/Expressoes1.jj" />
</java>
<java classpath="lib/javacc.jar" classname="javacc">
<arg value="-OUTPUT_DIRECTORY=${src}/plp/expressions2/parser" />
<arg value="${src}/plp/expressions2/parser/Expressoes2.jj" />
</java>
<java classpath="lib/javacc.jar" classname="javacc">
<arg value="-OUTPUT_DIRECTORY=${src}/plp/functional1/parser" />
<arg value="${src}/plp/functional1/parser/Functional1.jj" />
</java>
<java classpath="lib/javacc.jar" classname="javacc">
<arg value="-OUTPUT_DIRECTORY=${src}/plp/functional2/parser" />
<arg value="${src}/plp/functional2/parser/Funcional2.jj" />
</java>
<java classpath="lib/javacc.jar" classname="javacc">
<arg value="-OUTPUT_DIRECTORY=${src}/plp/functional3/parser" />
<arg value="${src}/plp/functional3/parser/Funcional3.jj" />
</java>
</target>
<target name="compile" depends="init">
<!-- Compile the java code -->
<javac srcdir="${src}" destdir="${build}" />
<javac srcdir="${src.tests}" destdir="${build.tests}" encoding="cp1252">
<classpath>
<pathelement location="${build}" />
</classpath>
</javac>
<junit printsummary="yes" haltonfailure="no">
<classpath>
<pathelement location="${build}" />
<pathelement location="${build.tests}" />
</classpath>
<formatter type="plain" />
<batchtest fork="yes" todir="${reports.tests}">
<fileset dir="${src.tests}">
<!--
<include name="**/*Test*.java"/>
<exclude name="**/AllTests.java"/>
-->
</fileset>
</batchtest>
</junit>
</target>
<target name="java2html" description="Converte o codigo para html para facilitar a visualizacao na aula">
<taskdef name="java2html" classname="de.java2html.anttasks.Java2HtmlTask" classpath="lib/java2html.jar" />
<java2html srcdir="${src}" destdir="${html}" includes="**/*.java" style="eclipse" showLineNumbers="true" showFileName="true" />
</target>
</project>