ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "M.A.Dunphy" <madun...@bigfoot.com>
Subject Problems with the Javac task
Date Tue, 17 Apr 2001 16:45:42 GMT
Hi all,

I'm using Ant 1.2 (though it also doesn't work in 1.3). Below is a
compilation target from a build file:

    <!-- ===================================================================
-->
    <!-- Compile the source code-->
    <!-- ===================================================================
-->
    <target name="src-compile" depends="prepare" description="Compile the
source code">
        <mkdir dir="${build}"/>
        <mkdir dir="${build.lib}"/>
        <mkdir dir="${build.classes.src}"/>
        <echo message="${ordering.class.path}"/>
        <javac srcdir="${src}" destdir="${build.classes.src}"
classpath="${ordering.class.path}"/>
    </target>

>From reading the docs the attribute classpath is meant to specifiy the
classpath used in this compilation (i.e the javac -classpath ...). When I
run this target as:

ant -debug -Dordering.class.path=rubbish src-compile

The java compiler is still invoked with the classpath specified by either
the CLASSPATH env. variable or perhaps its the ${java.class.path} ant
variable? See output below:

.
.
.
    [mkdir] Created dir: C:\Development\Ordering\build
    [mkdir] Created dir: C:\Development\Ordering\build\lib
    [mkdir] Created dir: C:\Development\Ordering\build\classes\src

ordering.class.path is rubbish.
.
.
    [javac] Compiling 75 source files to
C:\Development\Ordering\build\classes\src
    [javac] Using modern compiler
    [javac] Compilation args: -d C:\Development\Ordering\build\classes\src
-classpath
C:\Development\Ordering\build\classes\src;C:\weblogic\lib\weblogic510sp8.jar
;C:\weblogic\classes;C:\weblogic\lib\weblogicaux.jar;C:\Development\Ordering
\buildscripts;C:\ant1.2\lib\ant.jar;C:\jdk1.3\jre\lib\rt.jar;C:\jdk1.3\jre\l
ib\i18n.jar;C:\jdk1.3\jre\lib\jaws.jar;C:\jdk1.3\lib\tools.jar;C:\junit3.2\j
unit.jar;C:\Oracle\Ora81\jdbc\lib;C:\Oracle\Ora81\jdbc\lib\classes12.zip;C:\
Oracle\Ora81\jdbc\lib\nls_charset12.zip;C:\Development\framework.jar;C:\Deve
lopment\frameworkx.jar;C:\Development\organisation.jar;C:\ant1.2\lib\jaxp.ja
r;C:\ant1.2\lib\optional.jar;C:\ant1.2\lib\parser.jar -sourcepath
C:\Development\Ordering\source
.
.
.
BUILD SUCCESSFUL

Total time: 13 seconds
C:\Development\Ordering\buildscripts>

Why isn't the javac -classpath being set to rubbish?

Mime
View raw message