ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Arfman" <craig.arf...@cps.com.au>
Subject Error: [javac] javac: invalid flag: -sourcepath
Date Tue, 06 Mar 2001 23:35:15 GMT
Hi

I'm just getting started with ant and am having a problem when I run it.
Previously the XML build file I'm using worked OK when I had the binary
distribution of ant 1.2 installed.
However now that I have compiled ant from source code using bootstrap.ant I
now get the following error:

[javac] javac: invalid flag: -sourcepath

What's wierd is that if I use Ant's debug flag, capture the actual javac
command and paste that into the command line along with the file name, it
compiles no problem.

If someone could shed some light on this it would be greatly appreciated.

Thanks in advance,

...Craig Arfman


supporting details follow:

=======================================================
results of running ant -buildfile simpleTest.xml -debug
=======================================================

Ant version 1.2 compiled on March 6 2001

Buildfile: simpleTest.xml
Setting project property: ant.java.version -> 1.2
Detected Java Version: 1.2
Detected OS: Windows NT
 +User task: echo     org.apache.tools.ant.taskdefs.Echo
 +User task: sql     org.apache.tools.ant.taskdefs.SQLExec
 +User task: javadoc2     org.apache.tools.ant.taskdefs.Javadoc
 +User task: rename     org.apache.tools.ant.taskdefs.Rename
 +User task: java     org.apache.tools.ant.taskdefs.Java
 +User task: mail     org.apache.tools.ant.taskdefs.SendEmail
 +User task: javacc     org.apache.tools.ant.taskdefs.optional.javacc.JavaCC
 +User task: compileTask     org.apache.tools.ant.taskdefs.CompileTask
 +User task: ant     org.apache.tools.ant.taskdefs.Ant
 +User task: antcall     org.apache.tools.ant.taskdefs.CallTarget
 +User task: touch     org.apache.tools.ant.taskdefs.Touch
 +User task: mparse
org.apache.tools.ant.taskdefs.optional.metamata.MParse
 +User task: rmic     org.apache.tools.ant.taskdefs.Rmic
 +User task: copy     org.apache.tools.ant.taskdefs.Copy
 +User task: patch     org.apache.tools.ant.taskdefs.Patch
 +User task: mkdir     org.apache.tools.ant.taskdefs.Mkdir
 +User task: exec     org.apache.tools.ant.taskdefs.ExecTask
 +User task: cab     org.apache.tools.ant.taskdefs.optional.Cab
 +User task: javadoc     org.apache.tools.ant.taskdefs.Javadoc
 +User task: gunzip     org.apache.tools.ant.taskdefs.GUnzip
 +User task: style     org.apache.tools.ant.taskdefs.XSLTProcess
 +User task: tar     org.apache.tools.ant.taskdefs.Tar
 +User task: untar     org.apache.tools.ant.taskdefs.Untar
 +User task: antstructure     org.apache.tools.ant.taskdefs.AntStructure
 +User task: available     org.apache.tools.ant.taskdefs.Available
 +User task: native2ascii
org.apache.tools.ant.taskdefs.optional.Native2Ascii
 +User task: javac     org.apache.tools.ant.taskdefs.Javac
 +User task: chmod     org.apache.tools.ant.taskdefs.Chmod
 +User task: tstamp     org.apache.tools.ant.taskdefs.Tstamp
 +User task: copydir     org.apache.tools.ant.taskdefs.Copydir
 +User task: signjar     org.apache.tools.ant.taskdefs.SignJar
 +User task: jar     org.apache.tools.ant.taskdefs.Jar
 +User task: unjar     org.apache.tools.ant.taskdefs.Expand
 +User task: genkey     org.apache.tools.ant.taskdefs.GenerateKey
 +User task: execon     org.apache.tools.ant.taskdefs.ExecuteOn
 +User task: jlink
org.apache.tools.ant.taskdefs.optional.jlink.JlinkTask
 +User task: replace     org.apache.tools.ant.taskdefs.Replace
 +User task: renameext
org.apache.tools.ant.taskdefs.optional.RenameExtensions
 +User task: wljspc     org.apache.tools.ant.taskdefs.optional.jsp.WLJspc
 +User task: cvs     org.apache.tools.ant.taskdefs.Cvs
 +User task: jjtree     org.apache.tools.ant.taskdefs.optional.javacc.JJTree
 +User task: uptodate     org.apache.tools.ant.taskdefs.UpToDate
 +User task: filter     org.apache.tools.ant.taskdefs.Filter
 +User task: property     org.apache.tools.ant.taskdefs.Property
 +User task: deltree     org.apache.tools.ant.taskdefs.Deltree
 +User task: fail     org.apache.tools.ant.taskdefs.Exit
 +User task: taskdef     org.apache.tools.ant.taskdefs.Taskdef
 +User task: get     org.apache.tools.ant.taskdefs.Get
 +User task: unwar     org.apache.tools.ant.taskdefs.Expand
 +User task: war     org.apache.tools.ant.taskdefs.War
 +User task: perforce
org.apache.tools.ant.taskdefs.optional.perforce.P4sync
 +User task: unzip     org.apache.tools.ant.taskdefs.Expand
 +User task: zip     org.apache.tools.ant.taskdefs.Zip
 +User task: ejbjar     org.apache.tools.ant.taskdefs.optional.ejb.EjbJar
 +User task: vssget     org.apache.tools.ant.taskdefs.optional.vss.MSVSSGET
 +User task: gzip     org.apache.tools.ant.taskdefs.GZip
 +User task: delete     org.apache.tools.ant.taskdefs.Delete
 +User task: move     org.apache.tools.ant.taskdefs.Move
 +User task: fixcrlf     org.apache.tools.ant.taskdefs.FixCRLF
 +User task: copyfile     org.apache.tools.ant.taskdefs.Copyfile
 +User datatype: patternset     org.apache.tools.ant.types.PatternSet
 +User datatype: fileset     org.apache.tools.ant.types.FileSet
 +User datatype: path     org.apache.tools.ant.types.Path
Setting project property: ant.home -> C:\jakarta-ant
Setting project property: java.specification.name -> Java Platform API
Specification
Setting project property: awt.toolkit -> sun.awt.windows.WToolkit
Setting project property: java.version -> 1.2.2
Setting project property: java.awt.graphicsenv ->
sun.awt.Win32GraphicsEnvironment
Setting project property: user.timezone -> Australia/Sydney
Setting project property: java.specification.version -> 1.2
Setting project property: java.vm.vendor -> Sun Microsystems Inc.
Setting project property: java.vm.specification.version -> 1.0
Setting project property: user.home -> C:\WINNT\Profiles\Administrator
Setting project property: os.arch -> x86
Setting project property: java.awt.fonts ->
Setting project property: java.vendor.url -> http://java.sun.com/
Setting project property: file.encoding.pkg -> sun.io
Setting project property: user.region -> AU
Setting project property: java.home -> C:\jdk1.2.2\jre
Setting project property: java.class.path ->
C:\VisualCafeXE\Java\Lib;C:\VisualCafeXE\Java\Lib\SYMCLASS.ZIP;C:\VisualCafe
XE\Java\Lib\CLASSES.ZIP;C:\VisualCafeXE\Java\Lib\COLLECTIONS.ZIP;C:\VisualCa
feXE\Java\Lib\ICEBROWSERBEAN.JAR;C:\VisualCafeXE\Java\Lib\SYMTOOLS.JAR;C:\Vi
sualCafeXE\swing-1.1\SWINGALL.JAR;C:\VisualCafeXE\Bin\Components\SFC.JAR;C:\
VisualCafeXE\Bin\Components\SYMBEANS.JAR;C:\VisualCafeXE\Java\Lib\DBAW.ZIP;C
:\VisualCafeXE\Bin\Components\DBAW_AWT.JAR;C:\VisualCafeXE\Java\Lib\servlet.
jar;C:\VisualCafeXE\Java\Lib\webserver.jar;C:\VisualCafeXE\Bin\Components\te
mplates.jar;.;c:\nab\lib\java\nab25.jar;c:\nab\lib\java\KFCJDK11.jar;c:\nab\
lib\java\KOCLJDK11.jar;c:\nab\lib\java\OrbixWeb_201.jar;C:\nab\lib\java\swin
gall.jar;C:\nab\lib\java\kocljdk11.jar;C:\palettes\System\StandardPalette.ja
r;c:\nab\lib\classes.zip;c:\nab\APPS;c:\ORANT8i\jdbc\lib\clas;c:\mqclient\ja
va\lib;c:\javamail-1.1.2\mail.jar;C:\jakarta-ant\lib\jaxp.jar;C:\jdk1.2.2\li
b\tools.jar;C:\jakarta-ant\lib\parser.jar;C:\jakarta-ant\lib\ant.jar;C:\jaka
rta-ant\lib\ant.jar;C:\jakarta-ant\lib\jaxp.jar;C:\jakarta-ant\lib\parser.ja
r;c:\jdk1.2.2\lib\tools.jar
Setting project property: line.separator ->

Setting project property: java.ext.dirs -> C:\jdk1.2.2\jre\lib\ext
Setting project property: java.io.tmpdir -> C:\TEMP\
Setting project property: os.name -> Windows NT
Setting project property: java.vendor -> Sun Microsystems Inc.
Setting project property: java.awt.printerjob -> sun.awt.windows.WPrinterJob
Setting project property: java.library.path ->
C:\jdk1.2.2\bin;.;C:\WINNT\System32;C:\WINNT;C:\jdk1.2.2\bin\;C:\MQCLIENT\BI
N;C:\PROGRA~1\PVCS\VM\WIN32\BIN;C:\NAB\BIN;C:\NAB\APPS\BIN;C:\NAB\ORB\ORBIX\
BIN;C:\ORANT\BIN;C:\WINNT\SYSTEM32;C:\WINNT;C:\WINNT\SYSTEM32\NLS;C:\WINNT\S
YSTEM32\NLS\ENGLISH;C:\jakarta-ant\bin;C:\VisualCafeXE\Java2\Bin;C:\Program
Files\Common Files\WebGain Shared;C:\VisualCafeXE\Bin;Z:.;
Setting project property: java.vm.specification.vendor -> Sun Microsystems
Inc.
Setting project property: sun.io.unicode.encoding -> UnicodeLittle
Setting project property: file.encoding -> Cp1252
Setting project property: java.specification.vendor -> Sun Microsystems Inc.
Setting project property: user.name -> Administrator
Setting project property: user.language -> en
Setting project property: java.vendor.url.bug ->
http://java.sun.com/cgi-bin/bugreport.cgi
Setting project property: java.vm.name -> Classic VM
Setting project property: java.vm.specification.name -> Java Virtual Machine
Specification
Setting project property: java.class.version -> 46.0
Setting project property: sun.boot.library.path -> C:\jdk1.2.2\jre\bin
Setting project property: os.version -> 4.0
Setting project property: java.vm.info -> build JDK-1.2.2-001, native
threads, symcjit
Setting project property: java.vm.version -> 1.2.2
Setting project property: java.compiler -> symcjit
Setting project property: path.separator -> ;
Setting project property: user.dir -> C:\AutomatedBuild\BuildFiles
Setting project property: file.separator -> \
Setting project property: sun.boot.class.path ->
C:\jdk1.2.2\jre\lib\rt.jar;C:\jdk1.2.2\jre\lib\i18n.jar;C:\jdk1.2.2\jre\clas
ses
Setting ro project property: ant.file ->
C:\AutomatedBuild\BuildFiles\simpleTest.xml
Setting project property: basedir -> C:\AutomatedBuild\BuildFiles
Project base dir set to: C:\AutomatedBuild\BuildFiles
   +Task: property
Setting project property: src -> .
   +Task: property
Setting project property: build -> build
   +Task: property
Setting project property: dist -> dist
 +Target: prepare
   +Task: tstamp
   +Task: mkdir
 +Target: compile
   +Task: javac
 +Target: dist
   +Task: mkdir
   +Task: jar
 +Target: clean
   +Task: delete
   +Task: delete
Build sequence for target `dist' is [prepare, compile, dist]
Complete build sequence is [prepare, compile, dist, clean]
Setting project property: DSTAMP -> 20010307
Setting project property: TSTAMP -> 1010
Setting project property: TODAY -> March 7 2001
    [javac] Compiling C:\AutomatedBuild\BuildFiles\Test.java because class
file C:\AutomatedBuild\BuildFiles\build\Test.class does not exist
    [javac] Compiling 1 source file to C:\AutomatedBuild\BuildFiles\build
    [javac] Using classic compiler
    [javac] Compilation args: -d
C:\AutomatedBuild\BuildFiles\build -classpath
C:\AutomatedBuild\BuildFiles\build;C:\VisualCafeXE\Java\Lib;C:\VisualCafeXE\
Java\Lib\SYMCLASS.ZIP;C:\VisualCafeXE\Java\Lib\CLASSES.ZIP;C:\VisualCafeXE\J
ava\Lib\COLLECTIONS.ZIP;C:\VisualCafeXE\Java\Lib\ICEBROWSERBEAN.JAR;C:\Visua
lCafeXE\Java\Lib\SYMTOOLS.JAR;C:\VisualCafeXE\swing-1.1\SWINGALL.JAR;C:\Visu
alCafeXE\Bin\Components\SFC.JAR;C:\VisualCafeXE\Bin\Components\SYMBEANS.JAR;
C:\VisualCafeXE\Java\Lib\DBAW.ZIP;C:\VisualCafeXE\Bin\Components\DBAW_AWT.JA
R;C:\VisualCafeXE\Java\Lib\servlet.jar;C:\VisualCafeXE\Java\Lib\webserver.ja
r;C:\VisualCafeXE\Bin\Components\templates.jar;C:\AutomatedBuild\BuildFiles;
C:\nab\lib\java\nab25.jar;C:\nab\lib\java\KFCJDK11.jar;C:\nab\lib\java\KOCLJ
DK11.jar;C:\nab\lib\java\OrbixWeb_201.jar;C:\nab\lib\java\swingall.jar;C:\na
b\lib\java\kocljdk11.jar;C:\nab\lib\classes.zip;C:\nab\APPS;C:\mqclient\java
\lib;C:\javamail-1.1.2\mail.jar;C:\jakarta-ant\lib\jaxp.jar;C:\jdk1.2.2\lib\
tools.jar;C:\jakarta-ant\lib\parser.jar;C:\jakarta-ant\lib\ant.jar -sourcepa
th C:\AutomatedBuild\BuildFiles
    [javac] File to be compiled:
    C:\AutomatedBuild\BuildFiles\Test.java

    [javac] javac: invalid flag: -sourcepath
    [javac] use: javac
[-g][-O][-debug][-depend][-nowarn][-verbose][-classpath
path][-nowrite][-deprecation][-d dir][-J<runtime flag>] file.java...

Total time: 1 second

===========================================================================
build file contents...
===========================================================================
<project name="MyProject" default="dist" basedir=".">

  <!-- set global properties for this build -->
  <!-- ant will create sub-directories "build" and "dist" -->
  <property name="src" value="." />
  <property name="build" value="build" />
  <property name="dist"  value="dist" />

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

  <target name="compile" depends="prepare">
    <!-- Compile the java code from ${src} into ${build} -->
    <javac srcdir="${src}" destdir="${build}" />
  </target>

  <target name="dist" depends="compile">
    <!-- Create the ${dist}/lib directory -->
    <mkdir dir="${dist}/lib" />

    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar
file -->
    <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}" />
  </target>

  <target name="clean">
    <!-- Delete the ${build} and ${dist} directory trees -->
    <delete dir="${build}" />
    <delete dir="${dist}" />
  </target>
</project>

==============================================================
workstation path...
==============================================================
C:\jdk1.2.2\bin\;
C:\MQCLIENT\BIN;C:\PROGRA~1\PVCS\VM\WIN32\BIN;C:\NAB\BIN;C:\NAB\APPS\BIN;C:\
NAB\ORB\ORBIX\BIN;C:\ORANT\BIN;
C:\WINNT\SYSTEM32;C:\WINNT;C:\WINNT\SYSTEM32\NLS;C:\WINNT\SYSTEM32\NLS\ENGLI
SH;C:\jakarta-ant\bin;
C:\VisualCafeXE\Java2\Bin;C:\Program Files\Common Files\WebGain
Shared;C:\VisualCafeXE\Bin;Z:.;

==============================================================
workstation classpath...
==============================================================
C:\VisualCafeXE\Java\Lib;C:\VisualCafeXE\Java\Lib\SYMCLASS.ZIP;C:\VisualCafe
XE\Java\Lib\CLASSES.ZIP;
C:\VisualCafeXE\Java\Lib\COLLECTIONS.ZIP;C:\VisualCafeXE\Java\Lib\ICEBROWSER
BEAN.JAR;
C:\VisualCafeXE\Java\Lib\SYMTOOLS.JAR;C:\VisualCafeXE\swing-1.1\SWINGALL.JAR
;
C:\VisualCafeXE\Bin\Components\SFC.JAR;C:\VisualCafeXE\Bin\Components\SYMBEA
NS.JAR;
C:\VisualCafeXE\Java\Lib\DBAW.ZIP;C:\VisualCafeXE\Bin\Components\DBAW_AWT.JA
R;
C:\VisualCafeXE\Java\Lib\servlet.jar;C:\VisualCafeXE\Java\Lib\webserver.jar;
C:\VisualCafeXE\Bin\Components\templates.jar;.;c:\nab\lib\java\nab25.jar;
c:\nab\lib\java\KFCJDK11.jar;c:\nab\lib\java\KOCLJDK11.jar;
c:\nab\lib\java\OrbixWeb_201.jar;C:\nab\lib\java\swingall.jar;
C:\nab\lib\java\kocljdk11.jar;C:\palettes\System\StandardPalette.jar;
c:\nab\lib\classes.zip;c:\nab\APPS;c:\ORANT8i\jdbc\lib\clas;
c:\mqclient\java\lib;c:\javamail-1.1.2\mail.jar;
C:\jakarta-ant\lib\jaxp.jar;C:\jdk1.2.2\lib\tools.jar;
C:\jakarta-ant\lib\parser.jar;C:\jakarta-ant\lib\ant.jar


Mime
View raw message