-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
38 lines (32 loc) · 1.31 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
<project name="Project Planning" default="run">
<property name="src.dir" location="src/main/java"/>
<property name="resource.dir" location="src/main/resources"/>
<property name="build.dir" location="target"/>
<property name="artifact.dir" location="artifact"/>
<property name="jar.name" value="project-planning.asp.jar"/>
<!-- delete existing build files and jar file-->
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${artifact.dir}"/>
</target>
<!-- make build dir, copy resources, compile java files -->
<target name="compile" depends="clean">
<mkdir dir="${build.dir}"/>
<copy todir="${build.dir}">
<fileset dir="${resource.dir}"/>
</copy>
<javac srcdir="${src.dir}" destdir="${build.dir}" target="1.8" includeAntRuntime="false" fork="true"/>
</target>
<!-- generate executable jar file -->
<target name="jar" depends="compile">
<jar destfile="${artifact.dir}/${jar.name}" basedir="${build.dir}">
<manifest>
<attribute name="Main-Class" value="aspguidp.Main"/>
</manifest>
</jar>
</target>
<!-- run jar file -->
<target name="run" depends="jar">
<java jar="${artifact.dir}/${jar.name}" fork="true"/>
</target>
</project>