forked from vivekvenkris/Nepenthes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprojectBuilder.xml
65 lines (53 loc) · 1.94 KB
/
projectBuilder.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?xml version="1.0" encoding="UTF-8"?>
<project name="nepenthes" default="install" basedir=".">
<property name="source.dir" value="src" />
<property name="lib.dir" value="lib" />
<property name="class.dir" value="bin" />
<property name="jar.dir" value="dist" />
<property name="main-class" value="Nepenthes" />
<property name="jar.file" value="${jar.dir}/${ant.project.name}.jar" />
<property name = "install.dir" value="/home/vivek/SMIRF/jars/"></property>
<path id="libraries.path">
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
</path>
<target name="clean" description="delete old files">
<delete dir="${class.dir}" />
<delete dir="${jar.dir}" />
</target>
<target name="compile" description="build class files" depends="clean">
<mkdir dir="${class.dir}" />
<javac srcdir="${source.dir}" destdir="${class.dir}" debug="on">
<classpath refid="libraries.path"></classpath>
</javac>
</target>
<target name="jar" description="Create a jar for the Nepenthes project"
depends="compile">
<mkdir dir="${jar.dir}" />
<mkdir dir="${class.dir}/${lib.dir}" />
<copy todir="${class.dir}/${lib.dir}" flatten="true">
<path refid="libraries.path" />
</copy>
<manifestclasspath property="manifest.classpath"
jarfile="${jar.file}">
<classpath refid="libraries.path" />
</manifestclasspath>
<jar destfile="${jar.file}" basedir="${class.dir}">
<manifest>
<attribute name="Main-Class" value="${main-class}" />
<attribute name="Class-Path" value="${manifest.classpath}" />
</manifest>
<fileset dir="${class.dir}" includes="**/.class"></fileset>
<zipgroupfileset dir="${lib.dir}" includes="**/*.jar"></zipgroupfileset>
</jar>
</target>
<target name="install" >
<copy file="${jar.file}" todir="${install.dir}"></copy>
<copy todir="${install.dir}" verbose="yes" failonerror="yes">
<fileset dir="${jar.dir}">
<include name="${jar.file}"/>
</fileset>
</copy>
</target>
</project>