This chapter continues from where Creating the workspace definition left us.

Using a symbolic link for the workspace

Canonical paths are used so even if you use a symbolic link to your workspace, the cache works as expected.

~/iwant-tutorial $ find as-iwant-tutorial-developer -name '*.java' | xargs -r touch
~/iwant-tutorial $ as-iwant-tutorial-developer/with/bash/iwant/list-of/targets
(0/1 S~ org.fluentjava.iwant.api.javamodules.JavaClasses iwant-tutorial-wsdefdef-main-classes)
(0/1 S~ org.fluentjava.iwant.api.javamodules.JavaClasses iwant-tutorial-wsdef-main-classes)
hello
Output asserted
~/iwant-tutorial $ cd ..
~ $ ln -s iwant-tutorial symlink-to-iwant-tutorial
~ $ cd symlink-to-iwant-tutorial
~/symlink-to-iwant-tutorial $ as-iwant-tutorial-developer/with/bash/iwant/list-of/targets
hello
Output asserted
~/symlink-to-iwant-tutorial $ as-iwant-tutorial-developer/with/bash/iwant/target/hello/as-path
(0/1 D! org.fluentjava.iwant.api.core.HelloTarget hello)
/home/hacker/iwant-tutorial/as-iwant-tutorial-developer/.i-cached/target/hello
Output asserted