1 <project name="args4j" default="jar" basedir=".">
3 <description>Java command line options parser</description>
5 <property file="local.properties"/>
7 <property name="ant.project.version" value="${pkgver}"/>
9 <property name="src" location="${ant.project.name}-${ant.project.version}/src"/>
10 <property name="src.main" location="${src}"/>
11 <property name="build" location="build"/>
12 <property name="build.output" location="${build}"/>
13 <property name="dist" location="dist"/>
14 <property name="jar.final.name" value="${ant.project.name}-${ant.project.version}"/>
17 <tstamp prefix="touch.time"/>
18 <condition property="java.5.available">
20 <contains string="${java.version}" substring="1.5"/>
21 <contains string="${java.version}" substring="1.6"/>
22 <contains string="${java.version}" substring="1.7"/>
25 <fail message="This package requires Java 5, 6 or 7." unless="java.5.available"/>
26 <condition property="ant.1.7.available">
27 <contains string="${ant.version}" substring="1.7"/>
29 <fail message="This package requires Ant 1.7." unless="ant.1.7.available"/>
30 <mkdir dir="${build.output}"/>
33 <target name="clean" description="Clean the output directories">
34 <delete dir="${build}"/>
35 <delete dir="${dist}"/>
38 <target name="compile" depends="init" description="Compile the code">
39 <javac srcdir="${src.main}" destdir="${build.output}" encoding="ISO-8859-1" optimize="true" target="1.5" source="1.5"/>
42 <target name="jar" depends="clean,compile" description="Create the JAR">
43 <mkdir dir="${build.output}/META-INF"/>
44 <copy file="${ant.project.name}-${ant.project.version}/LICENSE.txt" overwrite="true" preservelastmodified="true" todir="${build.output}/META-INF"/>
45 <copy overwrite="true" todir="${build.output}">
46 <fileset dir="${src.main}" includes="**/*.properties"/>
48 <mkdir dir="${dist}"/>
49 <jar jarfile="${dist}/${ant.project.name}-${ant.project.version}.jar" basedir="${build.output}">
51 <section name="org/kohsuke/args4j">
52 <attribute name="Extension-name" value="org.kohsuke.args4j"/>
53 <attribute name="Specification-Title" value="args4j : Java command line options parser"/>
54 <attribute name="Specification-Vendor" value="Kohsuke Kawaguchi"/>
55 <attribute name="Specification-Version" value="${ant.project.version}"/>
56 <attribute name="Implementation-Title" value="org.kohsuke.args4j"/>
57 <attribute name="Implementation-Vendor" value="Kohsuke Kawaguchi"/>
58 <attribute name="Implementation-Version" value="${ant.project.version}"/>