ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Using mapper in own task
Date Tue, 04 Feb 2003 12:45:34 GMT
On Tue, 04 Feb 2003, Java Burre <javaburre@hotmail.com> wrote:

> I assume this is the correct place to post questions regarding the
> writing of custom tasks.

Not really.  This is the place to discuss the development of Ant
itself, writing custom tasks as using Ant should be discussed on
ant-user.

> I'm writing a task in which I would like to use the mapper element
> as a nested element. However adding the method "public void
> addConfiguredMapper (Mapper mapper) doesn't seem to do the job.

Mapper doesn't have a public no-arg constructor (actually, it could
have, no idea why this is not the case, probably because it predates
ProjectComponent), so it cannot be used in the addXYZ flavor of
methods, you must use createMapper.

> Is it correct to use the mapper method
> <code>
> String[] result=mapper.getImplementation().mapFileName(source);
> </code>

Should work.

Stefan

Mime
View raw message