blob: f380031de3caf885f515d917020ef0fb6952d711 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--build.xml generated by maven from project.xml version 1.0
on date October 21 2006, time 1233-->
<project default="jar" name="commons-vfs" basedir=".">
<!--Load local and user build preferences-->
<property file="build.properties">
</property>
<property file="${user.home}/build.properties">
</property>
<!--Build properties-->
<property name="defaulttargetdir" value="${basedir}/target">
</property>
<property name="libdir" value="${user.home}/.maven/repository">
</property>
<property name="classesdir" value="${basedir}/target/classes">
</property>
<property name="testclassesdir" value="${basedir}/target/test-classes">
</property>
<property name="testreportdir" value="${basedir}/target/test-reports">
</property>
<property name="distdir" value="${basedir}/dist">
</property>
<property name="javadocdir" value="${basedir}/dist/docs/api">
</property>
<property name="final.name" value="commons-vfs-1.0">
</property>
<property name="proxy.host" value="">
</property>
<property name="proxy.port" value="">
</property>
<property name="proxy.username" value="">
</property>
<property name="proxy.password" value="">
</property>
<path id="build.classpath">
<pathelement location="${libdir}/ant/jars/ant-1.6.2.jar">
</pathelement>
<pathelement location="${libdir}/commons-net/jars/commons-net-1.4.1.jar">
</pathelement>
<pathelement location="${libdir}/commons-logging/jars/commons-logging-1.0.4.jar">
</pathelement>
<pathelement location="${libdir}/commons-collections/jars/commons-collections-3.1.jar">
</pathelement>
<pathelement location="${libdir}/jcifs/jars/jcifs-0.8.3.jar">
</pathelement>
<pathelement location="${libdir}/slide/jars/jakarta-slide-webdavlib-20050629.161100.jar">
</pathelement>
<pathelement location="${libdir}/jdom/jars/jdom-1.0.jar">
</pathelement>
<pathelement location="${libdir}/commons-httpclient/jars/commons-httpclient-2.0.2.jar">
</pathelement>
<pathelement location="${libdir}/com.jcraft/jars/jsch-0.1.23.jar">
</pathelement>
<pathelement location="${libdir}/xml-apis/jars/xml-apis-1.0.b2.jar">
</pathelement>
<pathelement location="${libdir}/oro/jars/oro-2.0.8.jar">
</pathelement>
<pathelement location="${libdir}/maven/plugins/maven-xdoc-plugin-1.9.2.jar">
</pathelement>
</path>
<target name="init" description="o Initializes some properties">
<mkdir dir="${libdir}">
</mkdir>
<condition property="noget">
<equals arg2="only" arg1="${build.sysclasspath}">
</equals>
</condition>
<!--Test if JUNIT is present in ANT classpath-->
<available property="Junit.present" classname="junit.framework.Test">
</available>
<!--Test if user defined a proxy-->
<condition property="useProxy">
<and>
<isset property="proxy.host">
</isset>
<not>
<equals trim="true" arg2="" arg1="${proxy.host}">
</equals>
</not>
</and>
</condition>
</target>
<target name="compile" description="o Compile the code" depends="get-deps">
<mkdir dir="${classesdir}">
</mkdir>
<javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
<src>
<pathelement location="${basedir}/core/src/main/java">
</pathelement>
</src>
<classpath refid="build.classpath">
</classpath>
</javac>
<copy todir="${classesdir}">
<fileset dir="${basedir}/core/src/main/java">
<include name="**/*.properties">
</include>
<include name="**/*.xml">
</include>
</fileset>
</copy>
<mkdir dir="${classesdir}/META-INF">
</mkdir>
<copy todir="${classesdir}/META-INF">
<fileset dir="${basedir}/.">
<include name="NOTICE.txt">
</include>
<include name="LICENSE.txt">
</include>
</fileset>
</copy>
</target>
<target name="jar" description="o Create the jar" depends="compile,test">
<jar jarfile="${defaulttargetdir}/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}">
</jar>
</target>
<target name="clean" description="o Clean up the generated directories">
<delete dir="${defaulttargetdir}">
</delete>
<delete dir="${distdir}">
</delete>
</target>
<target name="dist" description="o Create a distribution" depends="jar, javadoc">
<mkdir dir="dist">
</mkdir>
<copy todir="dist">
<fileset dir="${defaulttargetdir}" includes="*.jar">
</fileset>
<fileset dir="${basedir}" includes="LICENSE*, README*">
</fileset>
</copy>
</target>
<target name="test" description="o Run the test cases" if="test.failure" depends="internal-test">
<fail message="There were test failures.">
</fail>
</target>
<target name="internal-test" if="Junit.present" depends="junit-present,compile-tests">
<mkdir dir="${testreportdir}">
</mkdir>
<junit dir="${basedir}" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="true">
<sysproperty key="basedir" value=".">
</sysproperty>
<formatter type="xml">
</formatter>
<formatter usefile="false" type="plain">
</formatter>
<classpath>
<path refid="build.classpath">
</path>
<pathelement path="${testclassesdir}">
</pathelement>
<pathelement path="${classesdir}">
</pathelement>
</classpath>
<batchtest todir="${testreportdir}">
<fileset dir="${basedir}/core/src/test/java">
<include name="**/test/*TestCase.java">
</include>
<exclude name="**/test/Abstract*TestCase.java">
</exclude>
<exclude name="**/*.java">
</exclude>
</fileset>
</batchtest>
</junit>
</target>
<target name="junit-present" unless="Junit.present" depends="init">
<echo>================================= WARNING ================================</echo>
<echo>Junit isn't present in your ${ANT_HOME}/lib directory. Tests not executed.</echo>
<echo>==========================================================================</echo>
</target>
<target name="compile-tests" if="Junit.present" depends="junit-present,compile">
<mkdir dir="${testclassesdir}">
</mkdir>
<javac destdir="${testclassesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
<src>
<pathelement location="${basedir}/core/src/test/java">
</pathelement>
</src>
<classpath>
<path refid="build.classpath">
</path>
<pathelement path="${classesdir}">
</pathelement>
</classpath>
</javac>
</target>
<target name="javadoc" description="o Generate javadoc" depends="get-deps">
<mkdir dir="${javadocdir}">
</mkdir>
<tstamp>
<format pattern="2002-yyyy" property="year">
</format>
</tstamp>
<property name="copyright" value="Copyright &amp;copy; The Apache Software Foundation. All Rights Reserved.">
</property>
<property name="title" value="Commons VFS 1.0 API">
</property>
<javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="${basedir}/core/src/main/java" packagenames="org.apache.commons.vfs.*">
<classpath>
<path refid="build.classpath">
</path>
</classpath>
</javadoc>
</target>
<target name="get-dep-ant.jar" description="o Download the dependency : ant.jar" unless="ant.jar" depends="init,setProxy,noProxy,get-custom-dep-ant.jar">
<mkdir dir="${libdir}/ant/jars/">
</mkdir>
<get dest="${libdir}/ant/jars/ant-1.6.2.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/ant/jars/ant-1.6.2.jar">
</get>
<get dest="${libdir}/ant/jars/ant-1.6.2.jar" usetimestamp="true" ignoreerrors="true" src="http://people.apache.org/repository/ant/jars/ant-1.6.2.jar">
</get>
</target>
<target name="get-custom-dep-ant.jar" if="ant.jar" depends="init,setProxy,noProxy">
<mkdir dir="${libdir}/ant/jars/">
</mkdir>
<get dest="${libdir}/ant/jars/ant-1.6.2.jar" usetimestamp="true" ignoreerrors="true" src="${ant.jar}">
</get>
</target>
<target name="get-dep-commons-net.jar" description="o Download the dependency : commons-net.jar" unless="commons-net.jar" depends="init,setProxy,noProxy,get-custom-dep-commons-net.jar">
<mkdir dir="${libdir}/commons-net/jars/">
</mkdir>
<get dest="${libdir}/commons-net/jars/commons-net-1.4.1.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-net/jars/commons-net-1.4.1.jar">
</get>
<get dest="${libdir}/commons-net/jars/commons-net-1.4.1.jar" usetimestamp="true" ignoreerrors="true" src="http://people.apache.org/repository/commons-net/jars/commons-net-1.4.1.jar">
</get>
</target>
<target name="get-custom-dep-commons-net.jar" if="commons-net.jar" depends="init,setProxy,noProxy">
<mkdir dir="${libdir}/commons-net/jars/">
</mkdir>
<get dest="${libdir}/commons-net/jars/commons-net-1.4.1.jar" usetimestamp="true" ignoreerrors="true" src="${commons-net.jar}">
</get>
</target>
<target name="get-dep-commons-logging.jar" description="o Download the dependency : commons-logging.jar" unless="commons-logging.jar" depends="init,setProxy,noProxy,get-custom-dep-commons-logging.jar">
<mkdir dir="${libdir}/commons-logging/jars/">
</mkdir>
<get dest="${libdir}/commons-logging/jars/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">
</get>
<get dest="${libdir}/commons-logging/jars/commons-logging-1.0.4.jar" usetimestamp="true" ignoreerrors="true" src="http://people.apache.org/repository/commons-logging/jars/commons-logging-1.0.4.jar">
</get>
</target>
<target name="get-custom-dep-commons-logging.jar" if="commons-logging.jar" depends="init,setProxy,noProxy">
<mkdir dir="${libdir}/commons-logging/jars/">
</mkdir>
<get dest="${libdir}/commons-logging/jars/commons-logging-1.0.4.jar" usetimestamp="true" ignoreerrors="true" src="${commons-logging.jar}">
</get>
</target>
<target name="get-dep-commons-collections.jar" description="o Download the dependency : commons-collections.jar" unless="commons-collections.jar" depends="init,setProxy,noProxy,get-custom-dep-commons-collections.jar">
<mkdir dir="${libdir}/commons-collections/jars/">
</mkdir>
<get dest="${libdir}/commons-collections/jars/commons-collections-3.1.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-collections/jars/commons-collections-3.1.jar">
</get>
<get dest="${libdir}/commons-collections/jars/commons-collections-3.1.jar" usetimestamp="true" ignoreerrors="true" src="http://people.apache.org/repository/commons-collections/jars/commons-collections-3.1.jar">
</get>
</target>
<target name="get-custom-dep-commons-collections.jar" if="commons-collections.jar" depends="init,setProxy,noProxy">
<mkdir dir="${libdir}/commons-collections/jars/">
</mkdir>
<get dest="${libdir}/commons-collections/jars/commons-collections-3.1.jar" usetimestamp="true" ignoreerrors="true" src="${commons-collections.jar}">
</get>
</target>
<target name="get-dep-jcifs.jar" description="o Download the dependency : jcifs.jar" unless="jcifs.jar" depends="init,setProxy,noProxy,get-custom-dep-jcifs.jar">
<mkdir dir="${libdir}/jcifs/jars/">
</mkdir>
<get dest="${libdir}/jcifs/jars/jcifs-0.8.3.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/jcifs/jars/jcifs-0.8.3.jar">
</get>
<get dest="${libdir}/jcifs/jars/jcifs-0.8.3.jar" usetimestamp="true" ignoreerrors="true" src="http://people.apache.org/repository/jcifs/jars/jcifs-0.8.3.jar">
</get>
</target>
<target name="get-custom-dep-jcifs.jar" if="jcifs.jar" depends="init,setProxy,noProxy">
<mkdir dir="${libdir}/jcifs/jars/">
</mkdir>
<get dest="${libdir}/jcifs/jars/jcifs-0.8.3.jar" usetimestamp="true" ignoreerrors="true" src="${jcifs.jar}">
</get>
</target>
<target name="get-dep-jakarta-slide-webdavlib.jar" description="o Download the dependency : jakarta-slide-webdavlib.jar" unless="jakarta-slide-webdavlib.jar" depends="init,setProxy,noProxy,get-custom-dep-jakarta-slide-webdavlib.jar">
<mkdir dir="${libdir}/slide/jars/">
</mkdir>
<get dest="${libdir}/slide/jars/jakarta-slide-webdavlib-20050629.161100.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/slide/jars/jakarta-slide-webdavlib-20050629.161100.jar">
</get>
<get dest="${libdir}/slide/jars/jakarta-slide-webdavlib-20050629.161100.jar" usetimestamp="true" ignoreerrors="true" src="http://people.apache.org/repository/slide/jars/jakarta-slide-webdavlib-20050629.161100.jar">
</get>
</target>
<target name="get-custom-dep-jakarta-slide-webdavlib.jar" if="jakarta-slide-webdavlib.jar" depends="init,setProxy,noProxy">
<mkdir dir="${libdir}/slide/jars/">
</mkdir>
<get dest="${libdir}/slide/jars/jakarta-slide-webdavlib-20050629.161100.jar" usetimestamp="true" ignoreerrors="true" src="${jakarta-slide-webdavlib.jar}">
</get>
</target>
<target name="get-dep-jdom.jar" description="o Download the dependency : jdom.jar" unless="jdom.jar" depends="init,setProxy,noProxy,get-custom-dep-jdom.jar">
<mkdir dir="${libdir}/jdom/jars/">
</mkdir>
<get dest="${libdir}/jdom/jars/jdom-1.0.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/jdom/jars/jdom-1.0.jar">
</get>
<get dest="${libdir}/jdom/jars/jdom-1.0.jar" usetimestamp="true" ignoreerrors="true" src="http://people.apache.org/repository/jdom/jars/jdom-1.0.jar">
</get>
</target>
<target name="get-custom-dep-jdom.jar" if="jdom.jar" depends="init,setProxy,noProxy">
<mkdir dir="${libdir}/jdom/jars/">
</mkdir>
<get dest="${libdir}/jdom/jars/jdom-1.0.jar" usetimestamp="true" ignoreerrors="true" src="${jdom.jar}">
</get>
</target>
<target name="get-dep-commons-httpclient.jar" description="o Download the dependency : commons-httpclient.jar" unless="commons-httpclient.jar" depends="init,setProxy,noProxy,get-custom-dep-commons-httpclient.jar">
<mkdir dir="${libdir}/commons-httpclient/jars/">
</mkdir>
<get dest="${libdir}/commons-httpclient/jars/commons-httpclient-2.0.2.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-httpclient/jars/commons-httpclient-2.0.2.jar">
</get>
<get dest="${libdir}/commons-httpclient/jars/commons-httpclient-2.0.2.jar" usetimestamp="true" ignoreerrors="true" src="http://people.apache.org/repository/commons-httpclient/jars/commons-httpclient-2.0.2.jar">
</get>
</target>
<target name="get-custom-dep-commons-httpclient.jar" if="commons-httpclient.jar" depends="init,setProxy,noProxy">
<mkdir dir="${libdir}/commons-httpclient/jars/">
</mkdir>
<get dest="${libdir}/commons-httpclient/jars/commons-httpclient-2.0.2.jar" usetimestamp="true" ignoreerrors="true" src="${commons-httpclient.jar}">
</get>
</target>
<target name="get-dep-jsch.jar" description="o Download the dependency : jsch.jar" unless="jsch.jar" depends="init,setProxy,noProxy,get-custom-dep-jsch.jar">
<mkdir dir="${libdir}/com.jcraft/jars/">
</mkdir>
<get dest="${libdir}/com.jcraft/jars/jsch-0.1.23.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/com.jcraft/jars/jsch-0.1.23.jar">
</get>
<get dest="${libdir}/com.jcraft/jars/jsch-0.1.23.jar" usetimestamp="true" ignoreerrors="true" src="http://people.apache.org/repository/com.jcraft/jars/jsch-0.1.23.jar">
</get>
</target>
<target name="get-custom-dep-jsch.jar" if="jsch.jar" depends="init,setProxy,noProxy">
<mkdir dir="${libdir}/com.jcraft/jars/">
</mkdir>
<get dest="${libdir}/com.jcraft/jars/jsch-0.1.23.jar" usetimestamp="true" ignoreerrors="true" src="${jsch.jar}">
</get>
</target>
<target name="get-dep-xml-apis.jar" description="o Download the dependency : xml-apis.jar" unless="xml-apis.jar" depends="init,setProxy,noProxy,get-custom-dep-xml-apis.jar">
<mkdir dir="${libdir}/xml-apis/jars/">
</mkdir>
<get dest="${libdir}/xml-apis/jars/xml-apis-1.0.b2.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/xml-apis/jars/xml-apis-1.0.b2.jar">
</get>
<get dest="${libdir}/xml-apis/jars/xml-apis-1.0.b2.jar" usetimestamp="true" ignoreerrors="true" src="http://people.apache.org/repository/xml-apis/jars/xml-apis-1.0.b2.jar">
</get>
</target>
<target name="get-custom-dep-xml-apis.jar" if="xml-apis.jar" depends="init,setProxy,noProxy">
<mkdir dir="${libdir}/xml-apis/jars/">
</mkdir>
<get dest="${libdir}/xml-apis/jars/xml-apis-1.0.b2.jar" usetimestamp="true" ignoreerrors="true" src="${xml-apis.jar}">
</get>
</target>
<target name="get-dep-oro.jar" description="o Download the dependency : oro.jar" unless="oro.jar" depends="init,setProxy,noProxy,get-custom-dep-oro.jar">
<mkdir dir="${libdir}/oro/jars/">
</mkdir>
<get dest="${libdir}/oro/jars/oro-2.0.8.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/oro/jars/oro-2.0.8.jar">
</get>
<get dest="${libdir}/oro/jars/oro-2.0.8.jar" usetimestamp="true" ignoreerrors="true" src="http://people.apache.org/repository/oro/jars/oro-2.0.8.jar">
</get>
</target>
<target name="get-custom-dep-oro.jar" if="oro.jar" depends="init,setProxy,noProxy">
<mkdir dir="${libdir}/oro/jars/">
</mkdir>
<get dest="${libdir}/oro/jars/oro-2.0.8.jar" usetimestamp="true" ignoreerrors="true" src="${oro.jar}">
</get>
</target>
<target name="get-dep-maven-xdoc-plugin.jar" description="o Download the dependency : maven-xdoc-plugin.jar" unless="maven-xdoc-plugin.jar" depends="init,setProxy,noProxy,get-custom-dep-maven-xdoc-plugin.jar">
<mkdir dir="${libdir}/maven/plugins/">
</mkdir>
<get dest="${libdir}/maven/plugins/maven-xdoc-plugin-1.9.2.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/maven/plugins/maven-xdoc-plugin-1.9.2.jar">
</get>
<get dest="${libdir}/maven/plugins/maven-xdoc-plugin-1.9.2.jar" usetimestamp="true" ignoreerrors="true" src="http://people.apache.org/repository/maven/plugins/maven-xdoc-plugin-1.9.2.jar">
</get>
</target>
<target name="get-custom-dep-maven-xdoc-plugin.jar" if="maven-xdoc-plugin.jar" depends="init,setProxy,noProxy">
<mkdir dir="${libdir}/maven/plugins/">
</mkdir>
<get dest="${libdir}/maven/plugins/maven-xdoc-plugin-1.9.2.jar" usetimestamp="true" ignoreerrors="true" src="${maven-xdoc-plugin.jar}">
</get>
</target>
<target name="get-deps" unless="noget" depends="get-dep-ant.jar,get-dep-commons-net.jar,get-dep-commons-logging.jar,get-dep-commons-collections.jar,get-dep-jcifs.jar,get-dep-jakarta-slide-webdavlib.jar,get-dep-jdom.jar,get-dep-commons-httpclient.jar,get-dep-jsch.jar,get-dep-xml-apis.jar,get-dep-oro.jar,get-dep-maven-xdoc-plugin.jar">
</target>
<target name="setProxy" if="useProxy" depends="init">
<!--Proxy settings works only with a JDK 1.2 and higher.-->
<echo>Proxy used :</echo>
<echo>Proxy host [${proxy.host}]</echo>
<echo>Proxy port [${proxy.port}]</echo>
<echo>Proxy user [${proxy.username}]</echo>
<setproxy proxyuser="${proxy.username}" proxyport="${proxy.port}" proxypassword="${proxy.password}" proxyhost="${proxy.host}">
</setproxy>
</target>
<target name="noProxy" unless="useProxy" depends="init">
<echo>Proxy not used.</echo>
</target>
<target name="install-maven">
<get dest="${user.home}/maven-install-latest.jar" usetimestamp="true" src="${repo}/maven/maven-install-latest.jar">
</get>
<unjar dest="${maven.home}" src="${user.home}/maven-install-latest.jar">
</unjar>
</target>
</project>