user110684
user110684

Reputation:

Ant target with property part of the name attribute

I want to define a target using a property as part of its name attribute, but the property doesn't seem to resolve.

<property name="foo" value="FOO" />

<target name="${foo}.init.win32" />

<antcall target="${foo}.init.win32" />

The error I get is: Target "FOO.init.win32.x86" does not exist in the project.

I guess Ant doesn't allow this behavior?

Upvotes: 3

Views: 396

Answers (1)

Ivan Nevostruev
Ivan Nevostruev

Reputation: 28713

Yes, ant doesn't allow variable name of the target. Otherwise dependency calculation can be very difficult task

Upvotes: 1

Related Questions