ANT antcall a target that defines a property?

According to the Apache Ant FAQ: Note: tasks do not pass property changes back up to the environment they were called from, so you wouldn't be able to, for example, set a result property in the cond-if-3 target, then do in the cond target. In this respect, it is impossible to do what you want using antcall. ========== edit =========== Try antcallback: AntCallBack is identical to the standard 'antcall' task, except that it allows properties set in the called target to be available in the calling target.

antelope.tigris.org/nonav/docs/manual/bk... Sample code pasted from the above page: a = ${a} be = ${b}.

Thanks. It was the issue. How do you implement that behaviour in a different way?

I mean I would like to divide the logic of a target into subtargets – alem0lars Mar 11 at 17:17 Also, you can try task 'AntCallBack' from Ant-Contrib package: ant-contrib.sourceforge. Net/tasks/tasks/index. Html – KCArpe Oct 19 at 8:11.

Alem0lars, since you said you would like to subdivide a target, let me offer a different solution (that unfortunately doesn't answer your original question). "In aTgt doing a ${tgt}" "In bTgt doing a ${tgt}" This subdivides the build into aTgt and bTgt. Output will be aTgt: echo "In aTgt doing a build" bTgt: echo "In bTgt doing a build" deps: BUILD SUCCESSFUL.

Another approach is to refactor your targets into macros. You are trying to use targets like functions and they are just not intended to be used that way. I typically write the bulk of my logic as macros, so that I can compose it more easily into more complicated macros.

Then I write simple wrapper targets for the command-line entry points that I need.

I think you want to use a param. ${myprop} I surrounded this with a project tag and moved the echo statement into "A". My output says B: A: echo myvalue BUILD SUCCESSFUL.

1 That is not what OP wants. He wants to define the property in target A, and echo it in target B. Here, you define it in A and echo it in A.

– Xichen Li Mar 11 at 17:13 This doesn't solve the problem – alem0lars Mar 11 at 17:19 Thank you for clarifying the question. – rajah9 Mar 11 at 17:49.

1 It will not work for sure. – Xichen Li Mar 11 at 17:16 this doesn't solve the problem – alem0lars Mar 11 at 17:18 @Xichen Li: I fixed the typo. – Aaron Digulla Mar 14 at 14:09.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions


Thank You!
send