-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
77 lines (77 loc) · 2.35 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
<project name="TrabalhoProg3_2020_E" default="compile" basedir=".">
<description>Arquivo de build do trabalho de Prog3, 2020/E.</description>
<!-- Propriedades do build. -->
<property name="src" location="" />
<property name="bin" location="bin" />
<property name="mainClass" value="com.github.stefaniojr.prog3.project.Main" />
<!-- Inicialização. -->
<target name="init" description="Inicializa as estruturas necessárias.">
<tstamp/>
<mkdir dir="${bin}" />
</target>
<!-- Compilação. -->
<target name="compile" depends="init" description="Compila o código-fonte.">
<javac encoding="UTF-8" includeantruntime="false" srcdir="${src}" destdir="${bin}" />
</target>
<!-- Execução normal. -->
<target name="run" depends="compile" description="Executa o programa principal, normal.">
<java classname="${mainClass}">
<arg value="-p" />
<arg value="periodos.csv" />
<arg value="-d" />
<arg value="docentes.csv" />
<arg value="-o" />
<arg value="disciplinas.csv" />
<arg value="-e" />
<arg value="estudantes.csv" />
<arg value="-m" />
<arg value="matriculas.csv" />
<arg value="-a" />
<arg value="atividades.csv" />
<arg value="-n" />
<arg value="avaliacoes.csv" />
<classpath>
<pathelement path="${bin}" />
</classpath>
</java>
</target>
<!-- Execução somente leitura. -->
<target name="run-read-only" depends="compile" description="Executa em modo leitura.">
<java classname="${mainClass}">
<arg value="-p" />
<arg value="periodos.csv" />
<arg value="-d" />
<arg value="docentes.csv" />
<arg value="-o" />
<arg value="disciplinas.csv" />
<arg value="-e" />
<arg value="estudantes.csv" />
<arg value="-m" />
<arg value="matriculas.csv" />
<arg value="-a" />
<arg value="atividades.csv" />
<arg value="-n" />
<arg value="avaliacoes.csv" />
<arg value="--read-only" />
<classpath>
<pathelement path="${bin}" />
</classpath>
</java>
</target>
<!-- Execução somente escrita. -->
<target name="run-write-only" depends="compile" description="Executa em modo escrita.">
<java classname="${mainClass}">
<arg value="--write-only" />
<classpath>
<pathelement path="${bin}" />
</classpath>
</java>
</target>
<!-- Limpeza. -->
<target name="clean" description="Limpa o projeto, deixando apenas o código-fonte." >
<delete dir="${bin}"/>
<delete><fileset dir="." includes="*.txt"/></delete>
<delete><fileset dir="." includes="*.csv"/></delete>
<delete><fileset dir="." includes="*.dat"/></delete>
</target>
</project>