You are not logged in.
Pages: 1
Hi,
for madkit v. 5.0.0.17 :
May I suggest to add a followsymlinks="no" to the fileset targeted by a 'clean' task ?
So that only the symlink is removed but no content.
Quite strange that ant manage this this way by default since it is completely unsafe.
Offline
Hi,
Many thanks for the suggestion.
Still, as the MDK clean explicitely only target the generated files, there should be no problem here.
Did you experience such a problem ?
Offline
Sorry, my mistake: the problem doesn't occur in a clean task, but when building the jar.
Let say I have files inside a data/ directory to load at runtime.
These data are supposed to end inside of the build and they come from a source directory.
One safe way to do this is to copy this data/ into the build/, and voilà.
And other way, which looks more clever at first, since (1) those data could be heavy, (2) they are unchanged after or before compilation -- instead of a copy, to make a symlink. Logical isn't it ? Well, not that much when considering ant default behaviour on a delete task : not only the generated files are deleted, but also the content of any symlinked directory : it ends up with a source data/ directory empty.
What do you think of one demo in MK with a customizable and independent build file ?
Offline
OK. Thanks for the clear answer.
The build dir is indeed deleted this way, which is not good as you proved it.
Doing so, my goal was to abstract Eclipse end-users that do not care about ant.
I was expecting that ant users would eventually write their own build files for fulfilling their needs, but you make me realize that thinking for Eclipse users I finally did not give enough entry points to ant users.
My plan :
- create an accessible compile target
- no build dir deletion after creating generated files
- clean will not follow symbolic links anymore
That should ease the ant extension process. What do you think ?
What do you think of one demo in MK with a customizable and independent build file ?
That would be great of course.
Offline
Pages: 1