ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "K Plummer" <>
Subject RE: Ant 1.2 javac classpath and classpath reference problems.
Date Sun, 22 Apr 2001 01:50:00 GMT
Okay, here are the snippets of my build.xml and the output from ant

  <path id="project.class.path">
    <pathelement location="${javaHome}/lib/tools/jar" />
    <pathelement location="${weblogicHome}/lib/weblogicaux.jar" />
    <pathelement location="${weblogicHome}/license" />
    <pathelement location="${weblogicHome}/classes" />
    <pathelement location="${sybaseHome}/${sybaseJar}" />
    <pathelement location="${armHome}/${armJar}" />
    <pathelement location="${classes}" />

<target name="compileCommon"
         depends="prepare "
         description="Build the common transfer object class files">
     <echo message="Building Common: Missing JAR?
=${weblogicHome}/lib/weblogicaux.jar" />
     <javac srcdir ="${src}"
        <classpath refid="project.class.path"/>

<<<Invocation and Output>>>
g:\apps\opac\build\main\buildScripts>ant -buildfile
build.xml -verbose -Dserver=OpacDvl  compileCommon
Ant version 1.2 compiled on October 24 2000

    [mkdir] Created dir: G:\APPS\OPAC\build\main\classes
Building Common: Missing JAR? =G:/APPS/weblogic/lib/weblogicaux.jar
    [javac] Compiling 92 source files to G:\APPS\OPAC\build\main\classes
    [javac] Using modern compiler
    [javac] Compilation args: -deprecation -d
G:\APPS\OPAC\build\main\classes -classpath
\optional.jar;G:\Apps\Ant1.2\lib\parser.jar;G:\Apps\jdk1.3\lib\tools.jar -so
urcepath G:\APPS\OPAC\build\main\java -g -verbose

:8: package javax.ejb does not exist
    [javac] import javax.ejb.*;
    [javac] ^

The java.ejb.* package is MOST definitely contained within the
weblogicaux.jar; No doubt about it.
Note that classpath as passed to the javac task DOES NOT MATCH the path
specified in the class path
reference in any way whatsoever?

ALSO: How do I get ant to supress the use of the value of ${java.class.path}
(picked up from the CLASSPATH
in the OS?). The classpath passed to the javac ant task maps to the
CLASSPATH (${java.class.path} with the
${classes} and current ("build") directory prepended to it........Still
mostly confused.

-----Original Message-----
From: K Plummer []
Sent: Saturday, April 21, 2001 4:35 PM
Subject: Ant 1.2 javac classpath and classpath reference problems.


I using ANT 1.2 (WNT/W2KPRO)and Javasoft 1.3.0c and seem to be
having problems getting the JAVAC task to take the classpath. I first tried
using a
CLASSPATH reference giving the ID. Didn't seem to work, but I wasn't
sure I understand the syntax so....

Next, I tried setting the classpath property and then
using the classpath="${classpath}" construction in the javac.
Also appeared not to work.

It seems that whatever I may try, ANT 1.2 javac desires/requires
classpath be set via the OS CLASSPATH, always ignoring any and
everything specified in the buildfile by any and every possible means.

When I enable verbose to javac and peek at the output the
-classpath ant1.2 sends to java always seems to be that of the
CLASSPATH environmental, even if I use classpath=" " (no classpath
passed to the ant 1.2 javac task.

Most confused.... please help if possible.

View raw message