Hi  Petar,

Do you mean that omitting the output attribute of the java task is
equivalent to setting it to "console"?
Indeed, I want to take advantage of Ant properties being immutable.

However, I did not know the value to use to get default behavior when the
user does not set any.
I am going to try with "console" as you suggested.

Thank you,
Frederic

2006/3/14, Petar Tahchiev <[EMAIL PROTECTED]>:
>
> On 09/03/06, Frederic CHALONS <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I would like to use a property to set the ouput of the java task.
> > However when the user did not set that property I want to set it to a
> value
> > corresponding to the console.
> > (same behaviour when no "output" attribute is given).
> >
> > What value should I use?
> > "" empty string does not seem to work.
> >
> > This way, if would like to avoid duplicating the my <java ... /> block.
> >
> > Thank you for your help,
> >
> > Frederic CHALONS
> >
> >
>
> You could use the fact that properties in Ant are immutable, so you
> use a property to store the filename, and if the user sets it with a
> filename then you can't override its contents wih "console" for
> instance. Otherwise you attempt to override its contents with
> "console" and if you manage then the user has no set that property.
> Later you use the outputproperty parameter of the java task and store
> the output in a property. Finally you can check if the
> filename-property equals console and if it does you simply <echo> its
> contents!
> This is a long way but you will definitly avoid duplicating the <java
> ... /> block.
> Hope that helps!
> --
> Regards, Petar!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Frederic CHALONS
+33(0)1.42.60.98.04
--------------------------
HORIZON SOFTWARE
3, rue Meyerbeer 75009 PARIS
+33(0)1.42.60.94.90
--------------------------

Reply via email to