Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

target getting called more than once.

 
hasan khan
Ranch Hand
Posts: 223
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in the following build.xml my problem is echo target is getting call 3 times when i call target compileall. only want it to call only once.


[ May 26, 2006: Message edited by: hasaN khaN ]
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The targets "admin", "common" and "login" all depend on the target "echo". Call any of them and echo will be run first. Call all of them and echo will be called once for each target.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hasan,
If you rewrite compileall, echo will only be called once:

The antCall in the original code makes each target execute in a separate environment so it doesn't know that echo has already been called.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic