forked from govind45/JavaApplication
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
83 lines (75 loc) · 2.61 KB
/
build.xml
File metadata and controls
83 lines (75 loc) · 2.61 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
<?xml version="1.0"?>
<!--
hello hi
-->
<project name="java-junit-template-project" default="run" basedir=".">
<property name="version" value="31.0.0"/>
<property name="main.build.dir" value="build/main" />
<property name="main.src.dir" value="src" />
<property name="test.build.dir" value="build/test" />
<property name="test.src.dir" value="ServerEnvTestCases" />
<path id="classpath.base" >
<pathelement location="lib/mysql-connector-java-5.1.38-bin.jar"/>
</path>
<path id="classpath.test">
<pathelement location="lib/junit-4.10.jar" />
<pathelement location="build/jar/Project.jar"/>
<pathelement location="lib/mysql-connector-java-5.1.38-bin.jar"/>
<path refid="classpath.base" />
</path>
<target name="test" depends="clean, run" />
<target name="Jar" depends="compile">
<mkdir dir="./build/jar"/>
<jar destfile="./build/jar/Project.jar" basedir="${main.build.dir}">
<zipgroupfileset dir="./lib" includes="*.jar"/>
<manifest>
<attribute name="Main-Class" value="com.netenrich.Main"/>
<attribute name="Implementation-Version" value="${version}"/>
</manifest>
</jar>
</target>
<target name="compile" depends="clean">
<mkdir dir="${main.build.dir}"/>
<javac srcdir="${main.src.dir}" destdir="${main.build.dir}" includeantruntime="false">
<classpath refid="classpath.base"/>
</javac>
</target>
<target name="build" depends="Jar">
<!--
<mkdir dir="${test.build.dir}"/>
<javac srcdir="${test.src.dir}" destdir="${test.build.dir}" includeantruntime="false">
<classpath refid="classpath.test"/>
</javac>
-->
<echo message="Build done" />
</target>
<!-- Test and build all files -->
<!-- To run this: use "ant" (default) or "ant run" -->
<target name="run" depends="build">
<!--
<junit printsummary="on" haltonfailure="no">
<classpath>
<path refid="classpath.test" />
<pathelement location="${test.build.dir}"/>
</classpath>
<formatter type="brief" usefile="false" />
<formatter type="xml"/>
<formatter type="plain"/>
<batchtest>
<fileset dir="${test.src.dir}" includes="**/*Test*.java" />
</batchtest>
</junit>
<delete dir="${test.src.dir}"/>
-->
<echo message="Done" />
</target>
<!-- delete all class files -->
<!-- To run this: use "ant clean" -->
<target name="clean">
<delete>
<fileset dir="${basedir}" includes="**/*.class" />
</delete>
<delete dir="./build"/>
<echo message="clean done" />
</target>
</project>