This chapter continues from where Creating the workspace definition left us.
Using ant cli instead of bash
In addition to the shell user interface there is also an ant interface. It is handy not only for Windows users, but also for calling iwant from java applications like Eclipse.
~/iwant-tutorial $ cd as-iwant-tutorial-developer/with/ant/iw
Here we filter out the time to keep this tutorial reproducible.
~/iwant-tutorial/as-iwant-tutorial-developer/with/ant/iw $ ant | grep -v '^Total time:'
Buildfile: /home/hacker/iwant-tutorial/as-iwant-tutorial-developer/with/ant/iw/build.xml
entry-classes:
[mkdir] Created dir: /home/hacker/iwant-tutorial/as-iwant-tutorial-developer/.i-cached/entry-classes
[javac] Compiling 1 source file to /home/hacker/iwant-tutorial/as-iwant-tutorial-developer/.i-cached/entry-classes
empty-wish:
[echo] Try again with -Dwish=list-of/targets
nonempty-wish:
wish:
BUILD SUCCESSFUL
~/iwant-tutorial/as-iwant-tutorial-developer/with/ant/iw $ ant -Dwish=list-of/targets | grep -v '^Total time:'
Buildfile: /home/hacker/iwant-tutorial/as-iwant-tutorial-developer/with/ant/iw/build.xml
entry-classes:
empty-wish:
nonempty-wish:
[java] hello
wish:
BUILD SUCCESSFUL
~/iwant-tutorial/as-iwant-tutorial-developer/with/ant/iw $ ant -Dwish=target/hello/as-path | grep -v '^Total time:'
Buildfile: /home/hacker/iwant-tutorial/as-iwant-tutorial-developer/with/ant/iw/build.xml
entry-classes:
empty-wish:
nonempty-wish:
[java] (0/1 D! org.fluentjava.iwant.api.core.HelloTarget hello)/home/hacker/iwant-tutorial/as-iwant-tutorial-developer/.i-cached/target/hello
[java]
wish:
BUILD SUCCESSFUL