ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Schulz" <ssch...@ivs.tu-berlin.de>
Subject RE: Stripping extensions without file operation
Date Thu, 09 Jan 2003 13:37:56 GMT
My request seems mistakable :)

What I like to do:
- read a set of files from a directory
- create a set from above set containing the same but modified elements

For Example, the set of files contains class-files. So the result should
be a set having all the files, but not having the ".class" extension.

With the below pseudo-ant-snippet:

source:
 - myproject
   + - app
   |   + - someappTest.class
   |   + - anotherTest.class
   |   + - real.class
   |
   + - gui
       + - guiTest.class

fileset:
 myproject/app/someappTest.class
 myproject/app/anotherTest.class
 myproject/gui/guiTest.class

resulting fileset:
 myproject/app/someappTest
 myproject/app/anotherTest
 myproject/gui/guiTest

Maybe it would be a misuse of fileset?

Stefan

> -----Original Message-----
> From: Stefan Schulz [mailto:sschulz@ivs.cs.tu-berlin.de] 
> Subject: Stripping extensions without file operation
> 
> 
> Hello,
> 
> what I intend to do would look somewhat like this in ant:
> 
>   <mapper id="stripclass" type="glob" from="*.class" to="*"/>
>   <fileset id="anID" dir="${somedir}">
>     <include name="**/*Test.class"/>
>     <mapper id="stripclass"/>
>   </fileset>
> 
> Unfortunately, fileset does not support a nested mapper.
> 
> I do not want to copy any file, but use the fileset's entries 
> later on in various tasks. Is there a simple or generic 
> possibility to do so in ant or do extensions exist to solve 
> my problem?
> 
> Thanks for any help
> Stefan


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message