ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Alley" <martin.al...@ntlworld.com>
Subject RE: forking java and javac
Date Sun, 09 Nov 2003 22:51:11 GMT
Regarding the spaces in pathnames, I wonder if the regex mapper is the
solution - wrapping ' round any filename.
 
 
Comments anyone?
 
Martin
 
 
-----Original Message-----
From: Martin Alley [mailto:martin.alley@ntlworld.com] 
Sent: 09 November 2003 10:06
To: user@ant.apache.org
Subject: forking java and javac
 
Hi,
 
I'm new to ant, and hope someone on this mail list can help me..
 
I have a number of build files created for ant version 1, but I am using
ant version 1.5.  (These build files are from Java PetStore 1.1.2)
 
Whilst using these build files, I am getting sporadic errors, which I
believe is due to not forking a new JVM.  (I am using j2sdk1.4.1_05)
 
However, when I use a fork command, I have problems passing command
arguments.
 
1)Is there a xlst to convert buildfiles aimed at ant 1 to ant 1.5?
2)What do I do about the javac message "Since fork is true, ignoring
compiler setting."?
3) What do I do about path names that contain spaces?
 
Below are the results of running one build file (I am using Windows XP)
Build file is attached.
 
 
I have similar problems with these ant tasks also:
<target name="runtime" depends="init">
    <java classname="com.sun.enterprise.tools.packager.Main"
          fork="yes"
          classpath="${j2ee.classpath}"
          args="-setRuntime ${petstore.ear} estore_warruntime.xml"/>
    <java classname="com.sun.enterprise.tools.packager.Main"
          fork="yes"
          classpath="${j2ee.classpath}"
          args="-setRuntime ${petstore.ear} estore_ejbruntime.xml"/>
  </target>
 
 
Any help much appreciated.
Thanks
Martin
 
 
C:\Documents and Settings\Martin\My
Documents\jps1.1.2\src\components\customer\src>ant core
Buildfile: build.xml
 
init:
     [echo] basedir=C:\Documents and Settings\Martin\My
Documents\jps1.1.2\src\components\customer\src
     [echo] customer.home=C:\Documents and Settings\Martin\My
Documents\jps1.1.2\src\components\customer\src/..
     [echo] customer.src=C:\Documents and Settings\Martin\My
Documents\jps1.1.2\src\components\customer\src/../src
     [echo] buildpath ../../util/tracer/build/classes:C:\Documents and
Settings\Martin\My
Documents\jps1.1.2\src\components\customer\src/../build/classes:${j2ee
.home}/lib/j2ee.jar
 
compile_util_classes:
    [javac] Since fork is true, ignoring compiler setting.
 
compile_classes:
    [javac] Since fork is true, ignoring compiler setting.
    [javac] Compiling 48 source files to C:\Documents and
Settings\Martin\My
Documents\jps1.1.2\src\components\customer\build\classes
    [javac] Since fork is true, ignoring compiler setting.
    [javac] javac: invalid flag: C:\Documents
    [javac] Usage: javac <options> <source files>
    [javac] where possible options include:
    [javac]   -g                        Generate all debugging info
    [javac]   -g:none                   Generate no debugging info
    [javac]   -g:{lines,vars,source}    Generate only some debugging
info
    [javac]   -nowarn                   Generate no warnings
    [javac]   -verbose                  Output messages about what the
compiler is doing
    [javac]   -deprecation              Output source locations where
deprecated APIs are used
    [javac]   -classpath <path>         Specify where to find user class
files
    [javac]   -sourcepath <path>        Specify where to find input
source files
    [javac]   -bootclasspath <path>     Override location of bootstrap
class files
    [javac]   -extdirs <dirs>           Override location of installed
extensions
    [javac]   -d <directory>            Specify where to place generated
class files
    [javac]   -encoding <encoding>      Specify character encoding used
by source files
    [javac]   -source <release>         Provide source compatibility
with specified release
    [javac]   -target <release>         Generate class files for
specific VM version
    [javac]   -help                     Print a synopsis of standard
options
 
 
BUILD FAILED
file:C:/Documents%20and%20Settings/Martin/My%20Documents/jps1.1.2/src/co
mponents/customer/src/build.xml:64: Compile failed; see the compiler
error output for de
tails.
 
Total time: 1 second
C:\Documents and Settings\Martin\My
Documents\jps1.1.2\src\components\customer\src>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message