ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Rogers" <>
Subject help with <javac>
Date Fri, 27 Jul 2001 12:16:00 GMT

I am trying to compile a particular project that depends on external jar
files.  Following is my simple build.xml but I can't seem to get the
reference to the external jars working.  When I try to run ant on the file,
it complains that it can't compile because it can't find the classes in the
external jars.

Any help you can give would, of course, be greatly appreciated!

-Jason Rogers

<?xml version="1.0"?>
<project name="postoffice" default="build">

    <property name="postoffice.dir" value="Apps/PostOffice" />
    <property name="src.dir" value="${postoffice.dir}/src"
description="where the source can be found" />
    <property name="build.dir" value="${postoffice.dir}/build"
description="where the jars will end up" />
    <property name="classes.dir" value="${build.dir}/classes"
description="location of built PostOffice classes for the jars" />
    <property name="tests.dir" value="${postoffice.dir}/tests"
description="tests for the PostOffice" />
    <property name="samples.dir" value="${postoffice.dir}/samples"
description="sample applications for the PostOffice" />
    <property name="l2i.loc" value="L2i/Java/build" description="location of
L2i related jars" />
    <property name="ime.loc" value="c:/IME_Jars" description="location of
IME related jars" />
    <property name="mail.api"
value="C:/working/External/Java/JavaMail/JavaMail1.2/lib/mail.jar" />
    <property name="classpath" value="" />
    <path id="l2i.jars">
        <pathelement path="${classpath}"/>
        <fileset dir="${l2i.loc}">
            <include name="*.jar"/>
    <path id="ime.jars">
        <pathelement path="${classpath}"/>
        <fileset dir="${ime.loc}">
            <include name="*.jar"/>
         Build the code           
    <target name="build">
        <mkdir dir="${build.dir}" />
        <mkdir dir="${classes.dir}" />
        <javac srcdir="${src.dir}" destdir="${classes.dir}">
                <pathelement path="${mail.api}" />
                <pathelement path="${l2i.jars}/"/>
                <pathelement path="${ime.jars}"/>

View raw message