<?xml version="1.0" encoding="UTF-8"?>

<project default="jar" name="opml" basedir=".">
  <import file="../../build.xml"/>
  <property name="classdir" location="target/classes" />
  <property name="srcdir" location="src" />

  <target name="jar" description="Create the jar" depends="get-deps,compile,prepare">
    <jar jarfile="opml-0.1.jar" excludes="**/package.html" basedir="${classdir}" />
  </target>

  <target name="compile" description="Compile all sources.">
    <mkdir dir="${classdir}" />
    <javac srcdir="${srcdir}" destdir="${classdir}" excludes="**/test/**" />
  </target>

  <target name="prepare" description="Copy rome properties">
    <copy file="${srcdir}/conf/rome.properties" todir="${classdir}" />
  </target>
  
  <target name="get-deps" depends="rome.get-deps">
    <get dest="${libdir}/rome-1.0.jar" usetimestamp="true" ignoreerrors="true" src="https://rome.dev.java.net/dist/rome-1.0.jar" />
    <get dest="${libdir}/servletapi-2.3.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/servletapi/jars/servletapi-2.3.jar" />
    <get dest="${libdir}/jetty-4.2.12.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/jetty/jars/jetty-4.2.12.jar" />
    <get dest="${libdir}/commons-httpclient-3.0.1.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-httpclient/jars/commons-httpclient-3.0.1.jar" />
    <get dest="${libdir}/commons-logging-1.0.4.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.0.4.jar" />
  </target>

  <target name="clean">
    <delete dir="${classdir}" />
  </target>
</project>

