MaDKit forum

Welcome All !
Please, use explicit topic names when creating new threads. Thanks.

You are not logged in.

#1 2012-08-15 17:09:38

MrSummers
Member
From: Montpellier
Registered: 2012-07-06
Posts: 7
Website

followsymlink ? No !

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

#2 2012-08-16 10:12:55

fmichel
Administrator
From: Montpellier
Registered: 2009-03-24
Posts: 176
Website

Re: followsymlink ? No !

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

#3 2012-08-16 13:36:52

MrSummers
Member
From: Montpellier
Registered: 2012-07-06
Posts: 7
Website

Re: followsymlink ? No !

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

#4 2012-08-16 14:59:32

fmichel
Administrator
From: Montpellier
Registered: 2009-03-24
Posts: 176
Website

Re: followsymlink ? No !

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

Board footer