forked from wbuecke/codec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
51 lines (44 loc) · 1.79 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
44
45
46
47
48
49
50
51
<project name="codec" default="all">
<property name="build.dir" location="build" />
<property name="artifacts.dir" location="bin" />
<fileset id="runtime.libs" dir="lib" includes="*.jar" excludes="*-source.jar" />
<target name="all" depends="clean,dist" />
<target name="clean">
<delete dir="${artifacts.dir}" includes="**" includeemptydirs="true" />
<delete dir="${build.dir}" includes="**" includeemptydirs="true" />
</target>
<target name="compile" depends="license">
<mkdir dir="${build.dir}" />
<javac destdir="${build.dir}" encoding="US-ASCII" includeantruntime="false" srcdir="src" source="1.8" target="1.8">
<classpath>
<fileset refid="runtime.libs" />
<fileset dir="${java.home}/lib" includes="jfxrt.jar"/>
</classpath>
</javac>
</target>
<target name="dist" depends="compile">
<jar basedir="${build.dir}" destfile="${artifacts.dir}/codec.jar">
<fileset dir="${build.dir}" includes="*.class" />
<manifest>
<attribute name="JavaFX-Application-Class" value="de.wbuecke.codec.CodecApplication"/>
<attribute name="JavaFX-Version" value="2.0+"/>
<attribute name="Class-Path" value="commons-lang3.jar" />
<attribute name="Main-Class" value="de.wbuecke.codec.CodecApplication"/>
</manifest>
</jar>
<copy todir="${artifacts.dir}">
<fileset refid="runtime.libs" />
</copy>
</target>
<target name="run" depends="dist">
<java jar="${artifacts.dir}/codec.jar" fork="true" />
</target>
<target name="license" description="Updates the license headers in the source files.">
<loadfile property="javaheader" srcFile="javaheader.txt"/>
<replaceregexp match="(/\*.*\*/.*)??^package " flags="sm" replace="${javaheader}${line.separator}package ">
<fileset dir=".">
<include name="src/**/*.java"/>
</fileset>
</replaceregexp>
</target>
</project>