ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <anto...@antbuild.com>
Subject AW: Is it possible to use <arg> property of <java> to specify cla ss on cmd line?
Date Thu, 25 Sep 2003 15:51:03 GMT
I think that all attributes of all tasks in ant can have literal values such
as "com/packages/important/foo.java" or contain properties such as
"${foo.source}".

So you can very well write in your build file

<javac includes="${foo.source}"/>

and start ant like that :

ant -D"foo.source=com/packages/important/foo.java"

now javac [not directly the action of ant] will compile other sources than
the one you have indicated if it finds that classes that
com/packages/important/foo.java depends upon are out of date in the classes
directory.

Cheers,

Antoine


-----Ursprüngliche Nachricht-----
Von: Sören Edzen [mailto:soren@edzen.org]
Gesendet: Donnerstag, 25. September 2003 17:41
An: Ant Users List
Betreff: Re: Is it possible to use <arg> property of <java> to specify
cla ss on cmd line?


Can I use something like that with the <javac> task too, ie specifying a
*.java file instead of a class?

Sören

* Jan.Materne@rzf.fin-nrw.de <Jan.Materne@rzf.fin-nrw.de> [2003-09-25
15:55]:
> Sure, with properties.
>
>     <java classname="${classname}" .../>
>
> and on command line
>
>     ant -Dclassname=org.company.MyClass
>
>
>
> Jan
>

--
Sören Edzen, Sweden

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



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


Mime
View raw message