I am running an Ant script that is part of a tutorial at http://maestric.com/doc/java/spring/setup
The error is:
BUILD FAILED Target "buildtests" does not exist in the project "null".
I am running Ant through eclipse.
The Ant script is:
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="build">
<property file="build.properties"/>
<property name="src.dir" value="src"/>
<property name="build.dir" value="classes"/>
<path id="build.classpath">
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${appserver.lib}"> <!-- servlet API classes: -->
<include name="servlet*.jar"/>
</fileset>
<pathelement path="${build.dir}"/>
</path>
<target name="build">
<mkdir dir="${build.dir}"/>
<javac destdir="${build.dir}" source="1.5" target="1.5" debug="true" deprecation="false" optimize="false" failonerror="true">
<src path="${src.dir}"/>
<classpath refid="build.classpath"/>
</javac>
</target>
<target name="clean" description="Clean output directories">
<delete>
<fileset dir="${build.dir}">
<include name="**/*.class"/>
</fileset>
</delete>
</target>
</project>
I often have such problems with Ant, when it seems an error is caused by something that has never been declared in my script.