David H
David H

Reputation: 1356

Ant Task scope - name is undefined

I have read this post: Ant antcall a target that defines a property

This question is talking about properties. I would like to know how can I make <taskdef> on inner target that could be used for all project.

I don't want to define it on my main target, since it could be long and ugly. That's why i like to split it to inner targets. The error i get is:

Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

Upvotes: 0

Views: 301

Answers (1)

Andy
Andy

Reputation: 1994

You want to call a target which defines a property, and use that property in the caller-scope, right?

You should take a look at ant contrib's RunTarget: http://ant-contrib.sourceforge.net/tasks/tasks/runtarget.html.

Upvotes: 1

Related Questions