forked from edescourtis/actor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
34 lines (34 loc) · 1.57 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="actor.create_library" default="create_library" basedir=".">
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<available file=".git" type="dir" property="git.present"/>
<target name="git.revision" description="Store git revision in ${repository.version}" if="git.present">
<exec executable="git" outputproperty="git.revision" failifexecutionfails="false" errorproperty="">
<arg value="describe"/>
<arg value="--tags"/>
<arg value="--always"/>
<arg value="HEAD"/>
</exec>
<condition property="repository.version" value="${git.revision}" else="unknown">
<and>
<isset property="git.revision"/>
<length string="${git.revision}" trim="yes" length="0" when="greater"/>
</and>
</condition>
</target>
<target name="compile" description="compile the source">
<mkdir dir="${build}"/>
<javac destdir="${build}" includeantruntime="false">
<src path="${src}" />
<classpath>
<pathelement location="lib/junit-4.8.1.jar"/>
<pathelement path="${classpath}"/>
</classpath>
</javac>
</target>
<target name="create_library" description="Create a library jar for the actor project" depends="git.revision,compile">
<jar destfile="dist/actor-${repository.version}.jar" includes="**/*.class" basedir="${build}"/>
</target>
</project>