user2539653
user2539653

Reputation: 31

how to invoke ant property from groovy script

I have ant property defined as:

<condition property="configuration.REPORT_DIR" value="${configuration.REPORT_DIR}"       else="results">
    <isset property="configuration.REPORT_DIR" />
</condition>

and later , indside groovy script i need value of this property, below definition not working:

<taskdef name="groovy" classpath="./groovy-all-X.X.X.jar" classname="org.codehaus.groovy.ant.Groovy" />
    <groovy>
        def destinationDIR = ant.project.properties.getReference("${configuration.REPORT_DIR}")
        ...
    </groovy>

any ideas, how to invoke value ?

Upvotes: 2

Views: 1279

Answers (1)

tim_yates
tim_yates

Reputation: 171114

Can you try:

def destinationDIR = project.properties."configuration.REPORT_DIR"

Upvotes: 2

Related Questions