Thanks Chris!
 
But now my question is how I can pass the property to the mxmlc tag (the
compiler) so that I can use the property in my flex-config.xml compiler
configuration file.
 
Olivier

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Chris Luebcke
Sent: Monday, February 12, 2007 11:12 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: FlexAntTasks and tokens



Hi Olivier,

There are two ways I know of to define properties, and one consistent
syntax for using them.

To define properties in your build.xml file itself, you use the
<property> tag. Example:

<property name="flash.dir" value="${top}/bin"/>

A common pattern is to define properties which may vary between
developer machines or between dev/qa/production builds in a seperate
.properties file, and then reference that file into your build.xml.
For example, I have a file called local.properties, which contains
(among other things) this line:

top=C:\/dev/app

(Yeah, now that I look at it I'm not sure exactly how I arrived at
that particular combination of back and forward slashes, but it works
so I'm disinclined to monkey with it.)

I include this file in my build.xml file with the following line:

<property file="../local.properties"/>

And after doing so, I can reference the top property with the curly
brace syntax, a la ${top}. You'll note that I've done just that in the
first example, where ${flash.dir} gets the value "${top}/bin", which
resolves to "C:\/dev/app".

You use the same ${<property name>} format to use tokens in your
<mxmlc> tag.

Last thing I'll note is that I've had better luck defining Windows
paths, especially those containing spaces, in an external properties
file--doing so directly in a <property> tag seems to cause problems.
That could just be ignorance on my part of how to properly escape
paths within the build.xml file, though.

Hope that's what you were looking for,
Chris

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "Stembert Olivier \(BIL\)"
<[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> I'd like to use tokens with FlexAntTasks. I don't see how I can pass
the
> token to the mxmlc tag.
> 
> To know what is a token, one can red in the doc:
> "You can pass custom token values to the compiler using the following
> syntax: +token_name=value In the configuration file, you reference
that
> value using the following syntax: ${token_name} You can use the
@Context
> token in your configuration files to represent the context root of the
> application. You can also use the ${flexlib} token to represent the
> frameworks directory. This is useful if you set up your own
> configuration and are not using the default library-path settings. The
> default value of the ${flexlib} token is application_home\frameworks."
> 
> Rgds,
> 
> Olivier
> 
> ---------------------
> An electronic message is not binding on its sender.
> Any message referring to a binding engagement must be confirmed in
writing and duly signed.
> ---------------------
>



 

---------------------

An electronic message is not binding on its sender.

Any message referring to a binding engagement must be confirmed in
writing and duly signed.

---------------------

 


---------------------
An electronic message is not binding on its sender.
Any message referring to a binding engagement must be confirmed in writing and 
duly signed.
---------------------

Reply via email to