ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nico Seessle" <>
Subject Re: script task
Date Tue, 02 Jan 2001 10:07:17 GMT
----- Original Message -----
From: "Marco Struck" <>
To: <>
Sent: Tuesday, January 02, 2001 10:22 AM
Subject: script task

> hi,
> we are able to use the <script> task at last again.
> but could somebody tell me which objects I am able to access from script ?

The following objects are available in the script-context:

- properties, accessible by their names
- user properties, accessible by their names
- targets, accessible by their names
- "references" (elements having an id?) , accessible by their names

(everything is available only if it has an valid java-name (i.e. no dots)

> I've seen, that it's possible to access the project object, but what is
> about environments,
> properties and so on ?!
> is it possible to check variables with <script>, instead of this

Should be, since you can call myProject.getProperty('prop1'); ... (replace
myProject with the *real* name of your project). And you can use properties
with dots included if you use it like this.

This is from a "real" build-file:

    <script language="javascript"> <![CDATA[
        var buildNumber =
        if (isNaN(buildNumber)) buildNumber = 0;
        buildNumber = buildNumber + 1;
        VAMOS50.setProperty('', buildNumber);


View raw message