You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Stefan Schulz <ss...@ivs.tu-berlin.de> on 2003/01/09 12:36:35 UTC
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Stripping extensions without file operation
Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 9 Jan 2003, Stefan Schulz <ss...@ivs.tu-berlin.de> wrote:
> Stefan Bodewig [mailto:bodewig@apache.org] wrote
>> On Thu, 9 Jan 2003, Stefan Schulz <ss...@ivs.tu-berlin.de> wrote:
>>
>> > Unfortunately, fileset does not support a nested mapper.
>>
>> It sort of does, take a look at the <present> selector.
>
> If I am not wrong, this mapper only is used for the selector and
> does not modify the fileset.
Correct.
You'd select the files for your fuleset based on the presence of files
in a different fileset.
If this is not what you wanted, I must have misunderstood your
question.
Stefan
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Stripping extensions without file operation
Posted by Stefan Schulz <ss...@ivs.tu-berlin.de>.
Stefan Bodewig [mailto:bodewig@apache.org] wrote
> On Thu, 9 Jan 2003, Stefan Schulz <ss...@ivs.tu-berlin.de> wrote:
>
> > Unfortunately, fileset does not support a nested mapper.
>
> It sort of does, take a look at the <present> selector.
If I am not wrong, this mapper only is used for the selector and does
not modify the fileset.
Stefan
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Stripping extensions without file operation
Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 9 Jan 2003, Stefan Schulz <ss...@ivs.tu-berlin.de> wrote:
> Unfortunately, fileset does not support a nested mapper.
It sort of does, take a look at the <present> selector.
Stefan
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Stripping extensions without file operation
Posted by Stefan Schulz <ss...@ivs.tu-berlin.de>.
From: Stefan Bodewig [mailto:bodewig@apache.org]
> On Thu, 9 Jan 2003, Stefan Schulz <ss...@ivs.tu-berlin.de> wrote:
> [..]
> Or I've not been focussed, sorry. <fileset>'s are always a
> set of existing files, so your "but fileset doesn't support
> nested mappers" somehow triggered the misunderstanding. You
> don't want a fileset but a set of names.
Correct. So it is a misues. Even more, I think too generic here.
> > 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
>
> And do with this set ... what?
Apply the set or each entry to a sequence of other (custom) tasks.
> I don't see a built-in way for this general description, but
> maybe there is a way to achieve what you want
> (<pathconvert>?) - depends on your needs.
Actually, the other tasks need the class name rather than the file name.
So I already use <pathconvert> for / to . conversion.
Unfortunately, the <map> task only is build for prefixes whereas I have
postfixes to map.
Of course, one could build the custom tasks to do the conversion
internally. So, maybe I am thinking to object oriented here.
Maybe <property> should support <mapper> to manipulate given values. Or
being explicit, having a <propertyconvert>. Seems I have to write such a
thing myself or integrate into the other custom tasks. ;)
Thanks anyway.
Stefan
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Stripping extensions without file operation
Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 9 Jan 2003, Stefan Schulz <ss...@ivs.tu-berlin.de> wrote:
> My request seems mistakable :)
Or I've not been focussed, sorry. <fileset>'s are always a set of
existing files, so your "but fileset doesn't support nested mappers"
somehow triggered the misunderstanding. You don't want a fileset but
a set of names.
> 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
And do with this set ... what?
I don't see a built-in way for this general description, but maybe
there is a way to achieve what you want (<pathconvert>?) - depends on
your needs.
Stefan
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Stripping extensions without file operation
Posted by Stefan Schulz <ss...@ivs.tu-berlin.de>.
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>