DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37760>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37760





------- Additional Comments From [EMAIL PROTECTED]  2005-12-05 21:47 -------
(In reply to comment #0)
> public void setMapper(String type, String from, String to) {
>         Mapper m = createMapper();
>         Mapper.MapperType mapperType = new Mapper.MapperType();
>         mapperType.setValue(type);
>         m.setFrom(from);
>         m.setTo(to);
>     }
> 
> Note that mapperType is never added to the mapper. This creates a 
> hard-to-debug
> problem (especially for a dumb newb like me).
> I found this problem on 1.6.5 version of Ant (above link is for current
> subversion state for this file). For me the problem occured when I tried to 
> use
> <script> to create a CallTarget task with PropertySet.

(In reply to comment #3)
> It probably depends upon createMapper() not only creating the mapper, but 
> adding
> it to the list. Which is exactly what it does:
> 
>    public Mapper createMapper() {
>         assertNotReference();
>         if (mapper != null) {
>             throw new BuildException("Too many <mapper>s!");
>         }
>         mapper = new Mapper(getProject());
>         return mapper;
>     }
> 
> I don't think this is the cause of whatever problem you encountered.

No, attaching Mapper to the task is not a problem. The problem is that
mapeprType is never attached to the mapper
After
  Mapper.MapperType mapperType = new Mapper.MapperType();
  mapperType.setValue(type);
There needs to be
  m.setType(mapperType);

I do not have a [not] working scrip, I will try to add it by the end of the day,
but basically what I did is I added a task through
project.createTask("antcall"); , obtained property set and tried to add Mapper
with setMapper method. Which failed with message stating that type was not
defined (see the code, type is created but never attached to the mapper).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to