-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
90 lines (78 loc) · 2.82 KB
/
build.xml
File metadata and controls
90 lines (78 loc) · 2.82 KB
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" encoding="UTF-8"?>
<project name="ssouza-core" default="develop-dist" basedir=".">
<property file="build/build.properties" />
<property name="tmp.dir" value="tmp" />
<property name="tmp.src.dir" value="${tmp.dir}/src" />
<property name="tmp.build.dir" value="${tmp.dir}/classes" />
<property name="output.dir" value="${tmp.dir}" />
<property name="libs.dir" value="lib" />
<property name="dist.dir" value="dist" />
<property name="src.dir" value="src/java" />
<property name="file.jar.name" value="${application.name}-${application.version}.jar" />
<property name="file.src.name" value="${application.name}-${application.version}-src.zip" />
<defaultexcludes add="**/.svn" />
<defaultexcludes add="**/.svn/**" />
<defaultexcludes add="**/_svn" />
<defaultexcludes add="**/_svn/**" />
<!--
****************************
** Compile and build jar **
****************************
-->
<target name="create-dist">
<echo>Criando diretório dist...</echo>
<mkdir dir="${dist.dir}" />
</target>
<target name="create-tmp">
<echo>Criando diretório tmp...</echo>
<mkdir dir="${tmp.dir}" />
<mkdir dir="${tmp.src.dir}" />
<mkdir dir="${tmp.build.dir}" />
</target>
<target name="delete-tmp">
<echo>Apagando o diretório tmp...</echo>
<delete dir="${tmp.dir}" failonerror="no" includeemptydirs="true" />
</target>
<target name="clean-dist">
<echo>Limpando o diretório dist...</echo>
<delete includeemptydirs="true" verbose="false" failonerror="no">
<fileset dir="${dist.dir}" includes="**/*" />
</delete>
</target>
<target name="dist-jar">
<antcall target="create-tmp" />
<antcall target="create-dist" />
<echo>Compilando o código fonte...</echo>
<javac srcdir="${src.dir}" destdir="${tmp.build.dir}" debug="true" optimize="true" failonerror="false" encoding="ISO-8859-1" target="1.6" verbose="false" source="1.6">
<classpath>
<fileset dir="${libs.dir}" includes="*" />
</classpath>
</javac>
<copy todir="${tmp.build.dir}">
<fileset dir="${src.dir}">
<exclude name="**/*.java" />
<exclude name="**/*.jrxml" />
</fileset>
</copy>
<echo>Criando o ${file.jar.name} no dist...</echo>
<jar destfile="${dist.dir}/${file.jar.name}">
<fileset dir="${tmp.build.dir}" />
</jar>
</target>
<target name="dist-src-zip">
<echo>Copiando o código fonte...</echo>
<copy todir="${tmp.src.dir}">
<fileset dir="${src.dir}" />
</copy>
<echo>Criando o ${file.src.name} no dist...</echo>
<zip destfile="${dist.dir}/${file.src.name}">
<fileset dir="${tmp.src.dir}" />
</zip>
</target>
<target name="develop-dist">
<antcall target="clean-dist" />
<antcall target="dist-jar" />
<antcall target="dist-src-zip" />
<antcall target="delete-tmp" />
</target>
</project>