ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: forking java and javac
Date Mon, 10 Nov 2003 08:18:48 GMT
On Sun, 9 Nov 2003, Martin Alley <martin.alley@ntlworld.com> wrote:

> I have a number of build files created for ant version 1,

Actually, there has never been an Ant 1.0 [1] so it is hard to know
which version of Ant you are talking about.

> Whilst using these build files, I am getting sporadic errors, which
> I believe is due to not forking a new JVM.

Could you spell out the details of the problems?  The most common
problems of not forking <javac> are (1) memory consumption as Sun's
javac wouldn't let go of some resources (supposed to be fixed in your
JDK version) and (2) modifying jars after javac has used them.

> However, when I use a fork command, I have problems passing command
> arguments.

What are the problems?

> 1)Is there a xlst to convert buildfiles aimed at ant 1 to ant 1.5?

No - but see above.  Ant 1.5 should be reasonable backwards compatible
to 1.3 and even to 1.1 most of the time.

> 2)What do I do about the javac message "Since fork is true, ignoring
> compiler setting."?

If you say fork="true", Ant will ignore your build.compiler setting.

> 3) What do I do about path names that contain spaces?

Nothing.  Tell Ant it is a path and it should take care of it the
right way.

> Below are the results of running one build file (I am using Windows
> XP) Build file is attached.

What do you get with ant -verbose?

Your build file look OK on first glance, but I'd use <property>'s
location attribute instead of value (introduced in Ant 1.2) in many
places in your init target and define customer.classpath as a <path>
instead of a property (along with a nested <classpath> in <javac> -
also Ant 1.2).  But this is nothing Ant shouldn't be able to cope
with.

Ah, wait, are your sources in a path that contains spaces?  If so, you
may have been bitten by bug 10499 [2] that has been fixed with the
latest 1.6beta.

Stefan

Footnotes: 
[1]  http://ant.apache.org/faq.html#history 

[2]  http://issues.apache.org/bugzilla/show_bug.cgi?id=10499

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


Mime
View raw message