diff options
author | pacien | 2017-12-09 18:17:36 +0100 |
---|---|---|
committer | pacien | 2017-12-09 18:17:36 +0100 |
commit | 1a9785dca6f875ecf1c34befc1b5abf7829eb9e5 (patch) | |
tree | ba705f98b68b941875c8c9c9114570c60897c5e1 /build.xml | |
download | wallj-1a9785dca6f875ecf1c34befc1b5abf7829eb9e5.tar.gz |
Bootstrap project
Signed-off-by: pacien <pacien.trangirard@pacien.net>
Diffstat (limited to 'build.xml')
-rw-r--r-- | build.xml | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..8cd9e7e --- /dev/null +++ b/build.xml | |||
@@ -0,0 +1,77 @@ | |||
1 | <project name="Wall-J" default="zip" basedir="."> | ||
2 | |||
3 | <property name="dir.out" value="."/> | ||
4 | <property name="dir.lib" value="lib"/> | ||
5 | <property name="dir.src" value="src"/> | ||
6 | <property name="dir.javasrc" value="${dir.src}/java"/> | ||
7 | <property name="dir.docsrc" value="${dir.src}/docs"/> | ||
8 | <property name="dir.classes" value="classes"/> | ||
9 | <property name="dir.docs" value="docs"/> | ||
10 | <property name="dir.apidoc" value="${dir.docs}/doc"/> | ||
11 | <property name="dir.zipsubdir" value="Naili_Tran-Girard_WallJ.zip"/> | ||
12 | |||
13 | <property name="file.jar" value="${dir.out}/wallj.jar"/> | ||
14 | <property name="file.zip" value="${dir.out}/NailiTran-Girard_WallJ.zip"/> | ||
15 | <property name="file.ant" value="build.xml"/> | ||
16 | <property name="file.readme" value="readme.md"/> | ||
17 | |||
18 | <property name="class.entry" value="fr.umlv.java.wallj.Main"/> | ||
19 | |||
20 | <target name="compile"> | ||
21 | <mkdir dir="${dir.classes}"/> | ||
22 | <javac srcdir="${dir.src}" destdir="${dir.classes}"/> | ||
23 | </target> | ||
24 | |||
25 | <target name="jar" depends="compile"> | ||
26 | <jar jarfile="${file.jar}" basedir="${dir.classes}"> | ||
27 | <manifest> | ||
28 | <attribute name="Main-Class" value="${class.entry}"/> | ||
29 | </manifest> | ||
30 | </jar> | ||
31 | </target> | ||
32 | |||
33 | <target name="javadoc"> | ||
34 | <mkdir dir="${dir.apidoc}"/> | ||
35 | <javadoc sourcepath="${dir.javasrc}" destdir="${dir.apidoc}"/> | ||
36 | </target> | ||
37 | |||
38 | <target name="docs"> | ||
39 | <mkdir dir="${dir.docs}"/> | ||
40 | <apply executable="pandoc" dest="${dir.docs}"> | ||
41 | <arg value="--template"/> | ||
42 | <arg value="${dir.docsrc}/report-template.tex"/> | ||
43 | <arg value="--number-sections"/> | ||
44 | <arg value="--listings"/> | ||
45 | <arg value="--output"/> | ||
46 | <targetfile/> | ||
47 | <srcfile/> | ||
48 | <fileset dir="${dir.docsrc}" includes="*.md"/> | ||
49 | <mapper type="glob" from="*.md" to="*.pdf"/> | ||
50 | </apply> | ||
51 | </target> | ||
52 | |||
53 | <target name="zip" depends="jar,docs"> | ||
54 | <zip destfile="${file.zip}" encoding="UTF-8"> | ||
55 | <zipfileset dir="." excludes="**/*" prefix="${dir.zipsubdir}/${dir.apidoc}"/> | ||
56 | <zipfileset dir="." excludes="**/*" prefix="${dir.zipsubdir}/${dir.classes}"/> | ||
57 | |||
58 | <zipfileset dir="${dir.lib}" includes="*.jar" prefix="${dir.zipsubdir}/${dir.lib}"/> | ||
59 | <zipfileset dir="${dir.javasrc}" includes="**/*.java" prefix="${dir.zipsubdir}/${dir.javasrc}"/> | ||
60 | <zipfileset dir="${dir.docs}" includes="*.pdf" prefix="${dir.zipsubdir}/${dir.docs}"/> | ||
61 | |||
62 | <zipfileset file="${file.ant}" prefix="${dir.zipsubdir}"/> | ||
63 | <zipfileset file="${file.jar}" prefix="${dir.zipsubdir}"/> | ||
64 | <zipfileset file="${file.readme}" prefix="${dir.zipsubdir}"/> | ||
65 | </zip> | ||
66 | </target> | ||
67 | |||
68 | <target name="clean"> | ||
69 | <delete includeEmptyDirs="true" failonerror="false"> | ||
70 | <fileset dir="${dir.classes}"/> | ||
71 | <fileset dir="${dir.docs}"/> | ||
72 | <fileset file="${file.jar}"/> | ||
73 | <fileset file="${file.zip}"/> | ||
74 | </delete> | ||
75 | </target> | ||
76 | |||
77 | </project> | ||