Find file
Fetching contributors…
Cannot retrieve contributors at this time
72 lines (61 sloc) 1.7 KB
<?xml version="1.0"?>
<project name="wordnik-oss" xmlns:ivy="antlib:org.apache.ivy.ant" default="build" basedir=".">
<target name="build" depends="resolve">
<delete quiet="true" file="build/*.jar" />
<mkdir dir="build" />
<mkdir dir="build/main" />
<mkdir dir="build/main/java" />
<javac srcdir="src/main/java" debug="true" destdir="build/main/java">
<fileset dir="lib">
<include name="*.jar" />
<pathelement location="build/main/java" />
<jar jarfile="build/wordnik-oss.jar">
<fileset dir="build/main/java" />
<target name="clean">
<delete dir="dist"/>
<delete dir="build" quiet="true"/>
<target name="dist" depends="clean,build">
<!-- make dist -->
<delete dir="dist"/>
<mkdir dir="dist"/>
<mkdir dir="dist/lib"/>
<!-- copy all jars -->
<copy todir="dist/lib">
<fileset dir="lib">
<include name="*.jar"/>
<fileset dir="build">
<include name="*.jar"/>
<!-- copy bin files -->
<copy todir="dist/bin">
<fileset dir="bin"/>
<chmod perm="a+x">
<fileset dir="dist/bin">
<include name="*.sh"/>
<!-- clean up old dists -->
<delete quiet="true">
<fileset dir=".">
<include name="wordnik-oss-*.zip"/>
<zip destfile="">
<zipfileset dir="dist" prefix="wordnik-oss" includes="**/*"/>
<!-- copies all dependencies into the lib folder -->
<target name="resolve" description="retreive dependencies with ivy">
<ivy:retrieve pattern="${basedir}/lib/[artifact]-[revision].[ext]" conf="build" />