ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Savoy, Melinda" <MelindaSa...@texashealth.org>
Subject Newbie question on ANT script error in the build.xml file in the Eclipse project
Date Wed, 23 Feb 2011 20:20:01 GMT
Currently I am working on my local XP box in Eclipse Helios.  The version of ANT that I have
loaded is apache-ant-1.8.2

The error I am getting in the build.xml file is:  Default target dist does not exist in this
project

However, when I go to the Eclipse workspace where I have my project:  C:\eclipse-3.6-helios-SR1\Workspace\TestWebService\RequisitionWS

And the directory structure for my project, RequisitionWS, is:

.settings
build folder
dist folder
src folder
WebContent folder
.classpath
.project
build.xml

My build.xml file is as follows:

[code]
<?xml version="1.0" encoding="UTF-8"?>
<project name="RequisitionWS" default="dist" basedir=".">
        <description>
        Web Services build file
    </description>
        <!-- set global properties for this build -->
        <property name="src" location="src"/>
        <property name="build" location="build"/>
        <property name="dist" location="dist"/>
        <property name="webcontent" location="WebContent"/>

        <path id="classpath.server">
                <fileset dir="C:/tomcatserver/apache-tomcat-6.0.30/lib" includes="*.jar"
/>
        </path>

        <target name="init">
              <!-- Create the time stamp -->
              <tstamp/>
              <!-- Create the build directory structure used by compile -->
              <mkdir dir="${build}"/>
        </target>

        <target name="compile" depends="init" description="compile the source " >

              <!-- Compile the java code from ${src} into ${build} -->
              <javac srcdir="${src}" destdir="${build}">
                <classpath>
                                <path refid="classpath.server"/>
                        </classpath>
              </javac>

        </target>

        <target name="war" depends="compile" description="generate the distribution war"
>

                <!-- Create the war distribution directory -->
                <mkdir dir="${dist}/war" />

                <!-- Follow standard WAR structure -->
                <copy todir="${dist}/war/build/WEB-INF/">
                        <fileset dir="${webcontent}/WEB-INF/">
                                <include name="**"/>
                        </fileset>
                </copy>
                <copy todir="${dist}/war/build/WEB-INF/classes/">
                        <fileset dir="${build}">
                                <include name="**"/>
                        </fileset>
                </copy>

                <jar jarfile="${dist}/war/Requisition-${DSTAMP}.war" basedir="${dist}/war/build/"/>
        </target>
</project>
[/code]

Can someone please tell me what I'm doing wrong?  ANY help/direction would be greatly appreciated.

Thanks.

Melinda Savoy
Sr. Programmer Analyst, ERP Systems
Innovative Technology Solutions
Texas Health Resources
600 E. Lamar Blvd, Ste 301, Arlington TX  76011
MelindaSavoy@texashealth.org<mailto:MelindaSavoy@texashealth.org>

Texas Health Resources: Arlington Memorial,
Harris Methodist and Presbyterian Hospitals
A shared mission and now a shared name.





The information contained in this message and any attachments is intended only for the use
of the individual or entity to which it is addressed, and may contain information that is
PRIVILEGED, CONFIDENTIAL, and exempt from disclosure under applicable law.  If you are not
the intended recipient, you are prohibited from copying, distributing, or using the information.
 Please contact the sender immediately by return e-mail and delete the original message from
your system.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message