You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Nico Seessle <ni...@seessle.de> on 2000/10/02 09:50:27 UTC

Setting Jikes-Compiler flags thru nested jikes-element?

What do you think of the following extension to Javac?

<?xml version="1.0"?>
<project name="myProject" default="default" basedir=".">

   <target name="default">
     <property name="build.compiler" value="jikes"/>
     <property name="build.compiler.emacs" value="true"/>
     <delete file="A.class"/>
     <javac srcdir="." destdir="." includes="A.java">
        <jikes pedantic="true" warnings="false"/>
     </javac>

     <delete file="A.class"/>
     <javac srcdir="." destdir="." includes="A.java">
        <jikes pedantic="true" warnings="false" emacs="false"/>
     </javac>
     </target>
</project>

You can specify jikes-properties thru an embedded jikes-element (and for
backwards-compatibilty also thru properties). Settings are ignored if
compiler is not jikes.

Could even be extended to use jikes if <jikes> (and jvc if <jvc> is
specified (but that will break my own build-files so it's not currently
included :-) )

Nico



Re: Setting Jikes-Compiler flags thru nested jikes-element?

Posted by Nico Seessle <ni...@seessle.de>.
----- Original Message -----
From: "Stefan Bodewig" <bo...@bost.de>
To: <an...@jakarta.apache.org>
Sent: Wednesday, October 04, 2000 10:32 AM
Subject: Re: Setting Jikes-Compiler flags thru nested jikes-element?


> If we switched to the nested elements, I had to change every <javac>
> task to include my favorite settings (which might be different from
> what others want).
>

You won't, since it uses the properties as defaults when you don't override
them

> What we need is more general concept for the user to specify global
> behavior, CSS like style sheets - ~/.ant.xml containing <taskconfig>
> elements, something like that - let's add "finding a real good
> solution for this problem" to the list for Ant 2.0.

If you have ~/.ant.xml and <taskconfig> you will need something like this
anyway :-)

But we can discuss this further after 1.2 although it might help some people
and minimize questions...

Nico



Re: Setting Jikes-Compiler flags thru nested jikes-element?

Posted by Stefan Bodewig <bo...@bost.de>.
As much as I'd like to have a more explicit way to specify
build.compiler.emacs, the current way to do it has a huge advantage
over what you propose:

I have a ~/.antrc consisting of

ANT_OPTS='-Dbuild.compiler=jikes -Dbuild.compiler.emacs=yes'

and this will make all <javac>s use jikes and set the emacs option.

If we switched to the nested elements, I had to change every <javac>
task to include my favorite settings (which might be different from
what others want).

What we need is more general concept for the user to specify global
behavior, CSS like style sheets - ~/.ant.xml containing <taskconfig>
elements, something like that - let's add "finding a real good
solution for this problem" to the list for Ant 2.0.

Stefan