When building a project using Ant 1.2 I am getting the following output
and jar error :
Searching for build.xml ...
Buildfile: /home/mstanley/dev/webpaj/build.xml
prepare:
create_source_dist:
[zip] Building zip:
/home/mstanley/dev/dist/webpaj/WebPAJ-0.2-src.zip
[tar] Building tar:
/home/mstanley/dev/dist/webpaj/WebPAJ-0.2-src.tar
[gzip] Building gzip:
/home/mstanley/dev/dist/webpaj/WebPAJ-0.2-src.tar.gz
check_for_dependencies:
compile:
javadocs:
[javadoc] Generating Javadoc
[javadoc] Javadoc execution
[javadoc] Loading source files for package com.donaudymunch.webpaj...
[javadoc] Loading source files for package
com.donaudymunch.webpaj.util...
[javadoc] Loading source files for package
com.donaudymunch.webpaj.util.wrappers...
[javadoc] Loading source files for package
com.donaudymunch.webpaj.data...
[javadoc] Loading source files for package
com.donaudymunch.webpaj.client...
[javadoc] Loading source files for package
com.donaudymunch.webpaj.server...
[javadoc] Constructing Javadoc information...
[javadoc] Building tree for all the packages and classes...
[javadoc] Building index for all the packages and classes...
[javadoc] Building index for all classes...
jar:
/home/mstanley/dev/build/webpaj/classes
BUILD FAILED
java.lang.IllegalStateException: basedir does not exist
at org.apache.tools.ant.DirectoryScanner.scan(DirectoryScanner.java:655)
at org.apache.tools.ant.taskdefs.Jar.isUpToDate(Jar.java:113)
at org.apache.tools.ant.taskdefs.Zip.execute(Zip.java:154)
at org.apache.tools.ant.Target.execute(Target.java:142)
at org.apache.tools.ant.Project.runTarget(Project.java:818)
at org.apache.tools.ant.Project.executeTarget(Project.java:532)
at org.apache.tools.ant.Project.executeTargets(Project.java:506)
at org.apache.tools.ant.Main.runBuild(Main.java:420)
at org.apache.tools.ant.Main.main(Main.java:149)
This is strange because this used to work. I'm not sure what is wrong.
I added full paths because I thought that may be a problem but that is
not working either. I added an echo message right before the jar task
and it properly prints the basedir, so it clearly does exist.
If anyone can help I'd appreciate it.
Thanks
Michael Stanley
HERE IS my BUILD.XML
<?xml version="1.0"?>
<!--
=======================================================================
-->
<!-- WebPAJ's Ant build file
-->
<!--
=======================================================================
-->
<project name="WebPAJ" default="main"
basedir="/home/mstanley/dev/webpaj">
<property name="Name" value="WebPAJ"/>
<property name="name" value="webpaj"/>
<property name="version" value="0.2"/>
<property name="webpaj.home" value="."/>
<property name="src.dir" value="./src"/>
<property name="build.base" value="/home/mstanley/dev/build"/>
<property name="build.dir" value="${build.base}/webpaj"/>
<property name="bin.dir" value="./bin"/>
<property name="config.dir" value="./config"/>
<property name="data.dir" value="./data"/>
<property name="docs.dir" value="./docs"/>
<property name="html.docs.dir" value="${docs.dir}/html" />
<property name="build.classes" value="${build.dir}/classes"/>
<property name="webpaj.javadocs" value="${html.docs.dir}/javadoc"/>
<property name="webpaj.dist.dir" value="../dist/webpaj"/>
<property name="classpath" value=""/>
<property name="packages" value="com.donaudymunch.webpaj.*"/>
<property name="manifest" value="${src.dir}/Meta-inf/Manifest.mf"/>
<property name="build.compiler" value="classic"/>
<!-- Give user a chance to override without editing this file
(and without typing -D each time it compiles it -->
<property file="${user.home}/.webpaj.properties" />
<!--
=================================================================== -->
<!-- Check to see what dependencies are available
-->
<!--
=================================================================== -->
<target name="check_for_dependencies">
<available property="Document.w3c.dom.present"
classname="org.w3c.dom.Document" />
<available property="Node.w3c.dom.present"
classname="org.w3c.dom.Node" />
<available property="NodeList.w3c.dom.present"
classname="org.w3c.dom.NodeList" />
<available property="Attr.w3c.dom.present"
classname="org.w3c.dom.Attr" />
<available property="NamedNodeMap.w3c.dom.present"
classname="org.w3c.dom.NamedNodeMap" />
<available property="SAXException.sax.xml.present"
classname="org.xml.sax.SAXException" />
<available property="SAXParseException.sax.xml.present"
classname="org.xml.sax.SAXParseException" />
<available property="SAXNotRecognizedExpection.sax.xml.present"
classname="org.xml.sax.SAXNotRecognizedException" />
<available property="SAXNotSupportedException.sax.xml.present"
classname="org.xml.sax.SAXNotSupportedException" />
<available property="ErrorHandler.sax.xml.w3c.dom.present"
classname="org.xml.sax.ErrorHandler" />
<available property="Xerces.DOMParser.present"
classname="org.apache.xerces.parsers.DOMParser" />
</target>
<!--
=================================================================== -->
<!-- Prepares the build directory
-->
<!--
=================================================================== -->
<target name="prepare">
<mkdir dir="${build.dir}"/>
<mkdir dir="${webpaj.dist.dir}" />
<antcall target="create_source_dist"/>
<tstamp />
</target>
<!--
=================================================================== -->
<!-- Compiles the source code
-->
<!--
=================================================================== -->
<target name="compile" depends="prepare,check_for_dependencies">
<mkdir dir="${build.classes}"/>
<javac srcdir="${src.dir}"
destdir="${build.classes}"
classpath="${classpath}"
debug="on"
deprecation="off"
optimize="on" >
<include name="**/*.java"/>
</javac>
</target>
<!--
=================================================================== -->
<!-- Creates the jar archive
-->
<!--
=================================================================== -->
<target name="jar" depends="compile">
<mkdir dir="${bin.dir}"/>
<echo message="${build.classes}"/>
<jar jarfile="${bin.dir}/${name}.jar"
includes="${build.class}/com/**"
manifest="${manifest}"
/>
<echo message="jar completed successfully"/>
</target>
<!--
=================================================================== -->
<!-- Creates the API documentation
-->
<!--
=================================================================== -->
<target name="javadocs" depends="prepare, compile">
<mkdir dir="${webpaj.javadocs}" />
<javadoc packagenames="${packages}"
sourcepath="${basedir}/${src.dir}"
destdir="${webpaj.javadocs}"
author="true"
version="true"
windowtitle="${Name} Api"
doctitle="${Name}"
bottom="Copyright © 2000 Donaudy Munch Interactive. All
Rights Reserved." />
</target>
<!--
=================================================================== -->
<!-- Creates the package structure
-->
<!--
=================================================================== -->
<target name="main" depends="javadocs,jar">
<mkdir dir="${data.dir}"/>
<antcall target="full_dist" />
<antcall target="clean"/>
</target>
<!--
=================================================================== -->
<!-- Makes Distribution Files
-->
<!--
=================================================================== -->
<target name="full_dist">
<zip zipfile="${webpaj.dist.dir}/${Name}-${version}.zip"
basedir="${basedir}" includes="**"/>
<tar tarfile="${webpaj.dist.dir}/${Name}-${version}.tar"
basedir="${basedir}" includes="**"/>
<gzip zipfile="${webpaj.dist.dir}/${Name}-${version}.tar.gz"
src="${webpaj.dist.dir}/${Name}-${version}.tar"/>
</target>
<!--
=================================================================== -->
<!-- Creates Source Distribution
-->
<!--
=================================================================== -->
<target name="create_source_dist">
<zip zipfile="${webpaj.dist.dir}/${Name}-${version}-src.zip"
basedir="${basedir}"
excludes="**/${webpaj.javadocs}/**, **/${bin.dir}/**"/>
<tar tarfile="${webpaj.dist.dir}/${Name}-${version}-src.tar"
basedir="${basedir}"
excludes="${webpaj.javadocs}/**, **/${bin.dir}/**"/>
<gzip zipfile="${webpaj.dist.dir}/${Name}-${version}-src.tar.gz"
src="${webpaj.dist.dir}/${Name}-${version}-src.tar"/>
</target>
<!--
=================================================================== -->
<!-- Clean Up
-->
<!--
=================================================================== -->
<target name="clean">
<deltree dir="${build.base}"/>
</target>
</project>