This repository has been archived by the owner on Oct 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
65 lines (65 loc) · 3.05 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
<project name="l-system" default="packaging" basedir=".">
<property name="project.sources.dir" value="src"/>
<property name="project.bin.dir" value="bin"/>
<property name="project.lib.dir" value="lib"/>
<property name="project.resources.dir" value="resources"/>
<property name="project.test.dir" value="test"/>
<path id="project.classpath">
<fileset dir="${project.lib.dir}">
<include name="*/*.jar"/>
</fileset>
<pathelement location="${project.bin.dir}"/>
</path>
<target name="compile" description="Compilation des classes" depends="init">
<javac srcdir="${project.sources.dir}" encoding="utf8" destdir="${project.bin.dir}" debug="on" optimize="on" deprecation="on" includeantruntime="false">
<classpath refid="project.classpath"/>
</javac>
<javac srcdir="${project.test.dir}" encoding="utf8" destdir="${project.bin.dir}" optimize="on" includeantruntime="false">
<classpath refid="project.classpath"/>
</javac>
<copy todir="${basedir}/${project.bin.dir}">
<fileset dir="${basedir}/${project.resources.dir}">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="init">
<echo message="Initialisation de ${ant.project.name}"/>
<mkdir dir="${basedir}/${project.bin.dir}"/>
</target>
<target name="run" description="execution" depends="compile">
<java classname="lsystem.Main" fork="true">
<jvmarg value="-ea"/>
<jvmarg value="-Dfile.encoding=UTF-8"/>
<jvmarg value="-XX:+UseG1GC"/>
<jvmarg value="-XX:+ParallelRefProcEnabled"/>
<classpath refid="project.classpath"/>
</java>
</target>
<target description="génération de la javadoc" name="javadoc">
<javadoc sourcepath="src" destdir="doc" access="private" encoding="utf8" overview="overview.html" >
<fileset dir="src" defaultexcludes="yes">
<include name="**"/>
</fileset>
<classpath refid="project.classpath"/>
</javadoc>
</target>
<target name="packaging" depends="compile">
<mkdir dir="${project.bin.dir}/META-INF" />
<mkdir dir="build"/>
<manifest file="${project.bin.dir}/META-INF/MANIFEST.MF">
<attribute name="Class-Path" value="." />
<attribute name="Main-Class" value="lsystem.Main" />
<attribute name="Built-By" value="${user.name} with Apache Ant"/>
</manifest>
<jar jarfile="build/l-system.jar" basedir="${project.bin.dir}" manifest="${project.bin.dir}/META-INF/MANIFEST.MF"/>
</target>
<target name="tests" depends="compile">
<junit printsummary="true" haltonerror="no" haltonfailure="no" showoutput="true">
<classpath refid="project.classpath"/>
<formatter type="plain"/>
<test fork="true" name="lsystem.TestLSystem" outfile="test1" />
<test fork="true" name="lsystem.StressTest" outfile="test2" />
</junit>
</target>
</project>