I had the same issue with the Java IdentityHashMap bug. I wanted to replace
a Mina class that used IdentityHashMap with a temporary custom
implementation that used HashMap instead, put it on the classpath ahead of
mina.

Simple solution was to put my custom class in the project itself, in this
case under src/unittests. When maven invokes tests it puts target/classes
and target/test-classes on the classpath ahead of other dependencies. Maybe
this is not quite so usefull to you? I was able to do this because I only
needed the replacement for testing against in-vm brokers and not for
anything else.

Perhaps you could put your extra class in qpid-incubating.jar, which gets
loaded first and holds the classpath for the remaining jars? At least, the
conventional start up scripts would pick it up first.

On 22/11/2007, Martin Ritchie <[EMAIL PROTECTED]> wrote:
>
> Maven experts. (looking at Daniel a lot here)
>
> I've been a whisker away from writing an ant build system today
> because I'm really finding maven such alpha quality. So I would be
> super happy if you could tell me how I'm supposed to do the following.
>
> I want to replace a class provided by one of our dependencies.
>
> With ant it is easy to put our classes at the start of the classpath
> and all the deps at the end.
>
> Looking through the maven info online this appears to have been an
> issue for other people.
>
> Maven 1 had the problem fixed back in 2003
> http://jira.codehaus.org/browse/MPTEST-13
>
> but it appears that nugget got lost on Maven 2
> http://jira.codehaus.org/browse/MNG-1412
>
> 2.0.5. was supposed to introduce ordering based on entry in the pom
> but that seems to not work.
>
> Any suggestions would be great other than the create a new project for
> the single class and then upload it to your corporate repository then
> depend on it such that it appears in the classpath before the other
> dependency that you are trying to augment. That was one of the
> suggestions on the maven list..
> http://www.nabble.com/forum/ViewPost.jtp?post=7767844&framed=y&skin=177
>
>
> Frustrated,
> Martin
>
> --
> Martin Ritchie
>

Reply via email to