ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey E Care <ca...@us.ibm.com>
Subject nested types with ambiguous matches
Date Fri, 16 Sep 2011 20:23:10 GMT
I'm having an issue a nested type matching multiple "add" methods on a 
task; I've added a redacted trace below. The problem is that I *want* all 
of the matching add methods to be called but Ant seems to specifically 
check if multiple add methods match & if so it keels over. I tried 
changing from add to addConfigured thinking that might make a difference 
but it didn't help.

I was able to make this work by having just a single add that takes Object 
as an argument but that seems like a terrible kludge as I'm giving up type 
safety. Is there any other way to make this work?

BUILD FAILED
<REDACTED>:5: ambiguous: types <REDACTED>.RequestConfigurationProvider and 
<REDACTED>.ResponseConsumer match <REDACTED>
        at org.apache.tools.ant.IntrospectionHelper.findMatchingMethod(
IntrospectionHelper.java:1627)
        at org.apache.tools.ant.IntrospectionHelper.createTopLevel(
IntrospectionHelper.java:1723)
        at org.apache.tools.ant.IntrospectionHelper.createAddTypeCreator(
IntrospectionHelper.java:1533)
        at org.apache.tools.ant.IntrospectionHelper.supportsNestedElement(
IntrospectionHelper.java:724)
        at org.apache.tools.ant.UnknownElement.handleChild(
UnknownElement.java:548)
        at org.apache.tools.ant.UnknownElement.handleChildren(
UnknownElement.java:349)
        at org.apache.tools.ant.UnknownElement.configure(
UnknownElement.java:201)
        at org.apache.tools.ant.UnknownElement.maybeConfigure(
UnknownElement.java:163)
        at org.apache.tools.ant.Task.perform(Task.java:347)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(
Project.java:1399)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(
DefaultExecutor.java:41)
        at 
org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(
EclipseDefaultExecutor.java:32)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at 
org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(
InternalAntRunner.java:424)
        at 
org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(
InternalAntRunner.java:138)

____________________________________________________________________________________________


Jeffrey E. (Jeff) Care 
carej@us.ibm.com 
IBM WebSphere Application Server 
WAS Release Engineering 




Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message