views:

302

answers:

2

In trying to build a ant script for my Flex project i've come across a couple of properties that seem to be available by default such as ${DOCUMENTS} and ${PROJECT_FRAMEWORKS}. Does anybody know where these variables are defined and are there any more that maybe useful to me? Is there a list of variables that are created by default?

Thanks J

A: 

Do you have an example script you could share?

ANT has these built in properties. Most likely, the properties you're talking about are either defined in the build script, loaded from an external properties file, or defined using environment variables. You can learn more about property files in ANT to see how they're used.

With our ANT build script, each developer defined a FLEX_HOME environment variable, and we referenced that instead of having to hard code an SDK location in the build script. You can do that like this:

<property environment="env" />
<echo message="Flex home is ${env.FLEX_HOME}" />

Hope that helps.

RJ Regenold
Adding an example script won't really help as I'm fine with actually writing it. I agree that those properties must be defined somewhere externally I just wonder where. They are actually available from a completely clean project. I'm not keen on the whole environment variable thing as it's an extra step in the dev environment setup and one that is often missed by team members and not updated when sdk's are upgraded. I'm particularly interested in PROJECT_FRAMEWORKS as it already points to somewhere in the chosen flex SDK.
James Hay
My guess is that those are being resolved by FlexBuilder. Are they available when you run ANT from a terminal?
RJ Regenold
+1  A: 

In Eclipse they are called Linked Resources and can be found in Window (menu) -> Preferences -> General -> Workspace -> Linked Resources

PROJECT_FRAMEWORKS, however, is "special" in that it is provided by the FlexBuilder plugin on a per-project basis. (FB-16815)

Richard Szalay