Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8658861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:52:07+00:00 2026-06-12T15:52:07+00:00

I am getting an error when I try to build my project using ant.

  • 0

I am getting an error when I try to build my project using ant. Here is the build file:

<?xml version="1.0" encoding="UTF-8"?>
<project name="GPClient" default="dist" basedir=".">
    <description>
        simple example build file
    </description>
  <!-- set global properties for this build -->
  <dirname property="client.basedir" file="${ant.file.GPClient}"/>
  <property name="client.src" location="${client.basedir}/src"/>
  <property name="client.build" location="${client.basedir}/build"/>
  <property name="client.dist"  location="${client.basedir}/dist"/>
  <property name="client.done"  location="${client.basedir}/done"/>
  <property name="client.app"  location="${client.basedir}/app"/>
  <property name="client.webinf_classes" location="${client.basedir}/WEB-INF/classes"/>
  <property name="server.dir" location="${client.basedir}/../GrahamsProjServer"/>
  <property name="deploy.location"  location="${client.basedir}/../../jboss-as-7.1.1.Final/standalone/deployments"/>


    <path id="lib.classpath">
      <fileset dir="${client.basedir}">
          <include name="/lib/*.jar"/>
          <!-- <exclude name="jboss-servlet-api_3.0_spec-1.0.0.Final.jar" /> -->
      </fileset>
      <!-- <fileset dir="${client.basedir}/properties">
         <include name="*.properties"/>
     </fileset>
     <fileset dir="${server.dir}/dist">
         <include name="*.jar"/>
     </fileset>
     <fileset dir="${client.basedir}/WEB-INF/lib">
         <include name="*.jar"/>
     </fileset> -->
    </path>

    <path id="server.classpath">
      <fileset dir="${server.dir}/dist">
          <include name="*.jar"/>
      </fileset>
    </path>

    <path id="mf.classpath">
        <path refid="${lib.classpath}"/>
        <path refid="${server.classpath}"/>
    </path>

    <path id="war.classpath">
      <fileset dir="${client.basedir}/WEB-INF/lib">
          <include name="*.jar"/>
      </fileset>
    </path>

  <target name="client.init">
    <!-- Create the time stamp -->
    <tstamp/>
    <!-- Create the build directory structure used by compile -->
    <mkdir dir="${client.build}"/>
    <mkdir dir="${client.dist}"/>
    <mkdir dir="${client.done}"/>
    <mkdir dir="${client.app}"/>
    <mkdir dir="${client.webinf_classes}"/>
    <mkdir dir="${client.webinf_classes}/grahamsprojclient/servlet"/>
  </target>

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

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

  <target name="client.package" depends="client.compile" description="create the jar">  
        <!-- <manifestclasspath property="manifest.path" jarfile="${dist}/GrahamsProjClient.jar">
           <classpath refid="mf.classpath"/>
       </manifestclasspath> -->

        <jar destfile="${client.app}/GrahamsProjClient.jar" basedir="${client.dist}" >
            <fileset dir="${client.basedir}/properties">
                <include name="*.properties"/>
            </fileset>
            <fileset dir="${client.basedir}">
                <include name="lib/*.jar"/>
                <!-- <exclude name="lib/jboss-servlet-api_3.0_spec-1.0.0.Final.jar" />-->
            </fileset>
            <manifest>
                <attribute name="Class-Path" value="${mf.classpath}"/>
                <attribute name="Main-Class" value="grahamsprojclient.main.Start"/>
            </manifest>
        </jar>
  </target>

  <!--<target name="deploy" depends="package"
       description="generate the distribution" >
   <ear destfile="${deploy.location}/GrahamsProjServer.ear" appxml="${client.basedir}/META-INF/application.xml" >
       <metainf dir="${client.basedir}/META-INF"/>
       <fileset dir="${dist}" includes="*.jar"/>
   </ear>
 </target> -->

  <target name="client.clean"
       description="clean up" >
    <!-- Delete the ${build} and ${dist} directory trees -->
    <delete dir="${client.build}"/>
    <delete dir="${client.dist}"/>
    <delete dir="${client.app}"/>
    <delete dir="${client.done}"/>
    <delete dir="${client.webinf_classes}"/>
    <echo message="Deleting files in ${deploy.location}"/>
    <delete>
        <fileset dir="${deploy.location}" >
            <exclude name="*.txt" />
        </fileset>
    </delete>
  </target>

  <target name="client.compile-war-lib">
      <mkdir dir="WEB-INF/classes"/>
      <javac srcdir="${client.src}" destdir="WEB-INF/classes" debug="true" includeAntRuntime="false">
          <classpath refid="war.class.path"/>
          <include name="**/*.java"/>
      </javac>
  </target>

  <target name="client.compile-war" depends="client.init" description="compile the source " >
    <!-- Compile the java code from ${src} into ${dist} -->
    <javac srcdir="${client.basedir}/src/grahamsprojclient/servlet"
          destdir="${client.basedir}/WEB-INF/classes/grahamsprojclient/servlet" >
        <classpath>
            <path refid="war.class.path"/>
        </classpath>
    </javac>
  </target>


  <target name="client.build_war" depends="client.package, client.compile-war" description="build war" >  
      <war destfile="${client.done}/GrahamsProjClient.war" webxml="WEB-INF/web.xml">
        <metainf dir="${client.basedir}/META-INF" includes="context.xml" />
        <lib dir="${client.basedir}/WEB-INF/lib">
            <exclude name="/CopyLibs"/>
            <exclude name="*.ex" />
        </lib>
        <classes dir="${client.basedir}/WEB-INF/classes/grahamsprojclient/servlet" >
            <exclude name="*.java" />
        </classes>
        <fileset dir="${client.basedir}" >
            <include name="GrahamsProjClient-webstart.jnlp"/>
            <include name="app/GrahamsProjClient.jar"/>
            <include name="GrahamsProjStartAppPage.html"/>
            <!-- <include name="lib/*.jar"/>
           <include name="lib/jboss-servlet-api_3.0_spec-1.0.0.Final.jar"/> -->
        </fileset>
      </war>
  </target>

  <target name="client.deploy_war" depends="client.build_war" description="deploy war">
        <copy file="${client.done}/GrahamsProjClient.war" todir="${deploy.location}" />
  </target>

</project>

And here is the ant build log (error at the bottom):

client.init:
Created dir: C:\Users\gbaldeck\Google Drive\Work\LearningAS7\GrahamsProjClient\build
Created dir: C:\Users\gbaldeck\Google Drive\Work\LearningAS7\GrahamsProjClient\dist
Created dir: C:\Users\gbaldeck\Google Drive\Work\LearningAS7\GrahamsProjClient\done
Created dir: C:\Users\gbaldeck\Google Drive\Work\LearningAS7\GrahamsProjClient\app
Created dir: C:\Users\gbaldeck\Google Drive\Work\LearningAS7\GrahamsProjClient\WEB-INF\classes
Created dir: C:\Users\gbaldeck\Google Drive\Work\LearningAS7\GrahamsProjClient\WEB-INF\classes\grahamsprojclient\servlet
client.compile:
C:\Users\gbaldeck\Google Drive\Work\LearningAS7\GrahamsProjClient\build-client.xml:67: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
Compiling 6 source files to C:\Users\gbaldeck\Google Drive\Work\LearningAS7\GrahamsProjClient\dist

Unresolvable reference ${lib.classpath} might be a misuse of property expansion syntax.
C:\Users\gbaldeck\Google Drive\Work\LearningAS7\GrahamsProjClient\build-client.xml:67: Reference ${lib.classpath} not found.
BUILD FAILED (total time: 0 seconds)

What is causing this to happen? I don’t see anything wrong with how I have my paths setup.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:52:08+00:00Added an answer on June 12, 2026 at 3:52 pm

    You defined paths with reference ids lib.classpath and server.classpath, but then when you refer to them:

    <path id="mf.classpath">
        <path refid="${lib.classpath}"/>
        <path refid="${server.classpath}"/>
    </path>
    

    You are treating them as a properties, which you haven’t defined. You probably meant:

    <path id="mf.classpath">
        <path refid="lib.classpath"/>
        <path refid="server.classpath"/>
    </path>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting an error message when I try to build my project in eclipse:
I keep getting this error when I try to build my project which uses
I am getting this error when I try to build for the device: Code
I am getting this error when I try to deploy my Web API project
I'm developing a MSBuild project and am getting an odd error when I try
I am trying to build my project and I am getting a weird error
If I try to build my .sln file in visual studio (using release configuration,
getting error while try to start service
Getting this error when try to add an item to my repositories/context: Collection has
Update getting error when i try to call the method from Activity: SQLiteDatabase db

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.