1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <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>
- </path>
-
- <java classpathref="run-classpath" classname="name.smith.chris.restirc.RestIrc"/>
- </target>
- </project>
|