-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
43 lines (34 loc) · 1.43 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="JarFinder">
<description>JarFinder Build File</description>
<property name="src" location="src"/>
<property name="dist" location="dist"/>
<property name="build" location="build"/>
<property name="install" location="${user.home}/bin"/>
<property name="version" value="0.4"/>
<property name="jarfile" value="${ant.project.name}-${version}.jar"/>
<target name="clean">
<delete dir="${build}" failonerror="false"/>
<delete dir="${dist}" failonerror="false"/>
</target>
<target name="init">
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
</target>
<target name="build" depends="init">
<javac includeantruntime="false" srcdir="${src}" destdir="${build}"/>
</target>
<target name="dist" depends="build">
<jar destfile="${dist}/${jarfile}" basedir="${build}"/>
</target>
<target name="install" depends="dist">
<mkdir dir="${install}"/>
<copy todir="${install}" file="${dist}/${jarfile}"/>
<echo file="${install}/jarfinder" append="false">#!/bin/bash
java -cp ${install}/${jarfile} com.mozilla.jarfinder.JarFinder $@
</echo>
<chmod file="${install}/jarfinder" perm="755"/>
<echo message="${ant.project.name} ${version} installed to ${install}/jarfinder. Add it to your PATH for great convenience!"/>
<echo message=" > export PATH=$PATH:${install}"/>
</target>
</project>