-
Notifications
You must be signed in to change notification settings - Fork 22
/
build.xml
49 lines (41 loc) · 1.56 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
<project name="bgfinancas" basedir="." default="main">
<property name="dir.src" value="src"/>
<property name="dir.build" value="build"/>
<property name="dir.lib" value="lib"/>
<property name="dir.jar" value="jar"/>
<path id="classpath">
<fileset dir="${dir.lib}" includes="**/*.jar"/>
</path>
<target name="clean">
<delete dir="${dir.build}"/>
<delete dir="${dir.jar}"/>
</target>
<target name="compile" depends="clean">
<mkdir dir="${dir.build}"/>
<javac target="1.8" source="1.8" srcdir="${dir.src}" destdir="${dir.build}" classpathref="classpath" includeantruntime="true"/>
<copy todir="${dir.build}">
<fileset dir="${dir.src}" excludes="**/*.java"/>
</copy>
</target>
<target name="jar">
<mkdir dir="${dir.jar}"/>
<copy todir="${dir.jar}/lib">
<fileset dir="${dir.lib}"/>
</copy>
<jar destfile="${dir.jar}/bgfinancas.jar" basedir="${dir.build}">
<manifest>
<attribute name="Main-Class" value="io.github.badernageral.bgfinancas.principal.Main"/>
<attribute name="Class-Path" value="lib/hsqldb-2.4.0.jar"/>
</manifest>
</jar>
</target>
<target name="run">
<java fork="true" classname="io.github.badernageral.bgfinancas.principal.Main">
<classpath>
<path refid="classpath"/>
<path location="${dir.jar}/bgfinancas.jar"/>
</classpath>
</java>
</target>
<target name="main" depends="compile,jar"/>
</project>