123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <project name="RestIRC" default="dist" basedir=".">
- <description>REST-ful API to access IRC</description>
-
- <import file="build-ivy.xml"/>
-
- <property name="src" location="src"/>
- <property name="build" location="build"/>
- <property name="dist" location="dist"/>
-
- <target name="init" depends="-init-dependencies">
- <mkdir dir="${build}"/>
- </target>
-
- <target name="compile" depends="init,-get-version" description="compile the source">
- <path id="compile-classpath">
- <fileset dir="lib">
- <include name="**/*.jar"/>
- </fileset>
- </path>
-
- <javac srcdir="${src}" destdir="${build}" includeantruntime="false" classpathref="compile-classpath"/>
- <echo file="${build}/name/smithc/chris/version">${version}</echo>
- </target>
-
- <target name="-init-version">
- <path id="jgit-classpath">
- <fileset dir="lib">
- <include name="**/*.jar"/>
- </fileset>
- </path>
- <taskdef name="git-describe" classname="org.mdonoughe.JGitDescribeTask" classpathref="jgit-classpath"/>
- </target>
-
- <target name="-get-version" depends="-init-version">
- <git-describe dir=".git" property="version" />
- </target>
-
- <target name="dist" depends="compile,-get-version" description="generate the distribution">
- <mkdir dir="${dist}"/>
-
- <jar jarfile="${dist}/RestIRC-${version}.jar" basedir="${build}"/>
- </target>
-
- <target name="clean" description="clean up">
- <delete dir="${build}"/>
- <delete dir="${dist}"/>
- </target>
-
- <target name="run" depends="compile">
- <path id="run-classpath">
- <pathelement path="${build}"/>
- <fileset dir="lib">
- <include name="**/*.jar"/>
- </fileset>
- <pathelement path="etc"/>
- </path>
-
- <java classpathref="run-classpath" classname="name.smith.chris.restirc.RestIrc"/>
- </target>
- </project>
|