Discussion:
[mdr-users] MDRAnt task compatibility with Ant 1.7
Tom Morris
2007-06-05 17:33:21 UTC
Permalink
Has anyone been successful in using the mdrant task with Apache Ant 1.7? It
silently fails to create output when run with Ant 1.7 either from the
command line or under Eclipse. (Eclipse 3.3 which is about to be released
is bundling Ant 1.7.)

Everything works fine with Ant 1.6.5, but I suspect that there's some
incompatibility in the Ant Task integration between 1.6.5 and 1.7. Any
clues from anyone? Or better yet, a version that works with Ant 1.7?

Tom
John Sichi
2007-06-06 05:25:52 UTC
Permalink
I ran into a similar problem. It turns out that the MdrTask class does
something funny: for each task type it knows about, it registers it
redundantly, e.g.:

public Instantiate createInstantiate( ) {
return new Instantiate();
}

public void addInstantiate( Instantiate subtask ) {
subtask.setTask( this );
subtasks.add( subtask );
}

This used to be OK before ant 1.7, but ant 1.7 gets confused when it
sees both.

I forgot to log a bug for this; I wonder if it's been fixed in CVS yet.
I didn't feel like rebuilding MDR from the latest sources (especially
since the old build we're using has been rock-solid), so I hacked it by
editing the .class file with a hex editor and renaming the createXXX
methods to kreateXXX. That "fixed" it.

JVS
Date: Tue, 5 Jun 2007 13:33:21 -0400
Subject: MDRAnt task compatibility with Ant 1.7
Has anyone been successful in using the mdrant task with Apache Ant
1.7? It
silently fails to create output when run with Ant 1.7 either from the
command line or under Eclipse. (Eclipse 3.3 which is about to be
released
is bundling Ant 1.7.)
Everything works fine with Ant 1.6.5, but I suspect that there's some
incompatibility in the Ant Task integration between 1.6.5 and 1.7.
Any
clues from anyone? Or better yet, a version that works with Ant 1.7?
Tom
____________________________________________________________________________________
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html
Tom Morris
2007-06-06 06:39:07 UTC
Permalink
Thanks John. I came to the same conclusion in the mean time. The Ant
manual warns that if you define multiple alternatives, the one that gets
chosen is indeterminate due to JVM mechanics, but I suspect they just
changed the order they search for things in between 1.6.5 and 1.7.

Since MDRAnt comprises just a handful of classes and only one of them needed
to be changed, I just went ahead and rebuilt the JAR after deleting all the
createFoo() methods.

It hasn't been fixed in CVS, because that was my starting point. I'll look
into filing a bug report (although MDR appears so dead I'm not sure it'll
have any effect).

Tom
-----Original Message-----
Sent: Wednesday, June 06, 2007 1:26 AM
Subject: Re: MDRAnt task compatibility with Ant 1.7
I ran into a similar problem. It turns out that the MdrTask
class does something funny: for each task type it knows
public Instantiate createInstantiate( ) {
return new Instantiate();
}
public void addInstantiate( Instantiate subtask ) {
subtask.setTask( this );
subtasks.add( subtask );
}
This used to be OK before ant 1.7, but ant 1.7 gets confused
when it sees both.
I forgot to log a bug for this; I wonder if it's been fixed
in CVS yet. I didn't feel like rebuilding MDR from the
latest sources (especially since the old build we're using
has been rock-solid), so I hacked it by editing the .class
file with a hex editor and renaming the createXXX methods to
kreateXXX. That "fixed" it.
JVS
Date: Tue, 5 Jun 2007 13:33:21 -0400
Subject: MDRAnt task compatibility with Ant 1.7
Has anyone been successful in using the mdrant task with Apache Ant
1.7? It silently fails to create output when run with Ant
1.7 either
from the command line or under Eclipse. (Eclipse 3.3 which
is about
to be released
is bundling Ant 1.7.)
Everything works fine with Ant 1.6.5, but I suspect that
there's some
incompatibility in the Ant Task integration between 1.6.5
and 1.7. Any
clues from anyone? Or better yet, a version that works
with Ant 1.7?
Tom
Loading...