ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <anto...@antbuild.com>
Subject AW: forking java and javac
Date Mon, 10 Nov 2003 08:02:13 GMT
Hi Martin,
concerning spaces in pathnames, please use the nested element <arg
value="somevalue"/> for each of your individual arguments.
Arguments containing embedded spaces will be quoted automatically.

I do not know of an xslt to convert buildfile from ant 1 to ant 1.5.

The message "since fork=true, compiler setting ignored" is informational. It
really means that you need to set the executable attribute of the javac task
to point to the full path of the java compiler you want to use. (because you
are forking).

Cheers,
Antoine
-----Ursprungliche Nachricht-----
Von: Martin Alley [mailto:martin.alley@ntlworld.com]
Gesendet: Sonntag, 9. November 2003 23:51
An: 'Ant Users List'
Betreff: RE: forking java and javac


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>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message