Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

forcing build to run a target

 
jay vas
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

How can I force ant to run a build target ? i.e.

i have a target called "compile-xyz"

and my current build tag sais :

<target name="build" depends="clean, resolve, compile, test, jar"/>

.....

can I simply add <target name="build" depends="clean, resolve, compile, test, jar,compile-xyz"/>

to the tag ? I assume not...

.....

Also, in general, I tend to have trouble with ant. I noticed the documentation is quite vast --- but that is not always a good sign. If anyone has a "practical" guide to ant which they believe is appropriate , let me know !

 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand the question. You can tell ant to run any target that you want. If you have a target called compile-xyz, then you can do:

ant target-xyz

If you want to do "build" and "compile-xyz" then you can run:

ant build compile-xyz

As far as docs go, try Ant in Action (http://www.manning.com/loughran/). I have the previous edition and it was worth every penny.
 
jay vas
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I have target A that depends on target "b", how can I force target A to run target B?

In my case, my target A is literally : <target name="build" depends="clean, resolve, compile, test, jar"/>
I want target A to "do more".... How do I extend the target ?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now I understand. Just add the additional target to the "depends" list, just like you mentioned in your original post (where you added compile-xyz to depends).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic