global setttings for fileset to be case insenstive

View: New views
3 Messages — Rating Filter:   Alert me  

global setttings for fileset to be case insenstive

by Raja Nagendra Kumar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Is it possible to make fileset casesenstive="no" by default.
This should be globally true for all the fileset where ever it is used.
Like the default excludes, does it have default cases senstive settings. Quick code look at fileset says no..

Regards,
Nagendra
www.tejasoft.com


Re: global setttings for fileset to be case insenstive

by antoinell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Raja,

with presetdef it is possible to feed default attributes and default nested elements to tasks. Does it work for types too ?

here a try :

<project name="doit">
  <presetdef name="fileset">
    <fileset casesensitive="false"/>
  </presetdef>
  <mkdir dir="ABC"/>
  <touch file="ABC/dummy.txt"/>
  <fileset dir="." includes="abc/*" id="myfileset"/>
  <echo>${toString:myfileset} </echo>
</project>

and here is the output :

Buildfile: doit.xml
Trying to override old definition of datatype fileset

    [mkdir] Created dir: c:\dev\ABC
    [touch] Creating c:\dev\ABC\dummy.txt
    [echo] ABC\dummy.txt

BUILD SUCCESSFUL
Total time: 0 seconds


So it looks like some of what you want to achieve can be done using presetdef. What I do not know, you would need to try, is whether this works for all usages of fileset. For instance filesets which are nested inside the <javac/> task do define sources to compile ... Not sure.

Regards,

Antoine


-------- Original-Nachricht --------
> Datum: Thu, 22 Oct 2009 06:35:47 -0700 (PDT)
> Von: Raja Nagendra Kumar <Nagendra.Raja@...>
> An: user@...
> Betreff: global setttings for fileset to be case insenstive

>
> Hi,
>
> Is it possible to make fileset casesenstive="no" by default.
> This should be globally true for all the fileset where ever it is used.
> Like the default excludes, does it have default cases senstive settings.
> Quick code look at fileset says no..
>
> Regards,
> Nagendra
> www.tejasoft.com
>
>
> --
> View this message in context:
> http://www.nabble.com/global-setttings-for-fileset-to-be-case-insenstive-tp26010023p26010023.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


Re: global setttings for fileset to be case insenstive

by Raja Nagendra Kumar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you.

This approach works only with the top level filesets only. Is not working with javac or copy etc.

May be ant should have some unversal approach to allow the people to set the defaults to any ant task
say in this context by setting the property

default.fileset.casesensitive=true

In OOAD it is a very very bad approach.. but in declarative programing I am assuming it may be o.k.

Regards,
Nagendra