You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Martin Ritchie <ri...@apache.org> on 2007/11/22 18:12:23 UTC

Question for maven experts

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

Re: Question for maven experts

Posted by Aidan Skinner <ai...@gmail.com>.
On Nov 23, 2007 2:56 PM, Carl Trieloff <cc...@redhat.com> wrote:

> I am fine moving back to ant... consuming maven is a nightmare. every
> time you
> turn around there is a new set of dependencies. The builder guys at
> apachecon
> also have an alternative and would help us convert it we wanted to go
> that way.

buildr's definately the new hotness in th is area, and looks pretty
nice from the brief play I had with it a while back. I guess my two
main questions are:

1. does it address the repeatable build problem?
and
2. can it do the classpath manipulation we need?

I think the answer to 2 is 'yes', but I haven't read enough about it
to understand 1.

- Aidan (who has never met a build system he didn't hate at least a bit)

-- 
aim/y!:aidans42  g:aidan.skinner@gmail.com
http://aidan.skinner.me.uk/
"When the going gets weird, the weird turn pro."
  -- Hunter S. Thompson

Re: Question for maven experts

Posted by Matthieu Riou <ma...@offthelip.org>.
Hey,

Sure, no problem for the help. Feel free to subscribe to the buildr user
mailing-list [1] and ask questions, we'll surely answer. The buildr
documentation [2] is fairly good with lots of examples, so a quick look will
probably give you a better idea of how it works and what build scripts look
like. If you want to see what a script for a *very* complex build would be,
the Apache ODE one is also a good reference [3]. In your case I'm guessing
the longest part will be to list the dependencies :)

We now have a fairly good amount of native tasks for external tools support,
like XDoclet, XMLBeans or Eclipse project files and for everything else
existing Ant tasks can be reused. So you shouldn't hit any show stopper.

Cheers,
Matthieu

[1] buildr-user-subscribe@incubator.apache.org
[2] http://incubator.apache.org/buildr/
[3] http://svn.apache.org/repos/asf/ode/trunk/Rakefile

On Nov 25, 2007 6:27 PM, Carl Trieloff <cc...@redhat.com> wrote:

>
> Copied Matthieu from builder onto the thread. Matthieu, it looks like we
> might
> look into builder -- any support in answering questions is appreciated
> while
> we work out if it is the way to go
>
> Carl.
>
>
> Robert Greig wrote:
>
> On 23/11/2007, Carl Trieloff <cc...@redhat.com> <cc...@redhat.com> wrote:
>
>
>  I am fine moving back to ant... consuming maven is a nightmare. every
> time you
> turn around there is a new set of dependencies. The builder guys at
> apachecon
> also have an alternative and would help us convert it we wanted to go
> that way.
>
>
>  I have not tried buildr yet but I did speak to a colleague who is a
> Ruby developer and he says that Rake (upon which Buildr is based) is
> very good - flexible and straightforward to use. I think the key
> requirement is flexibility.
>
> So I would certainly support closer examination of it, and if it turns
> out that it is too immature or otherwise unsuitable we did have an
> excellent ant-based system that served us well in the past, courtesy
> of Rafi.
>
> RG
>
>
>
>

Re: Question for maven experts

Posted by Carl Trieloff <cc...@redhat.com>.
Copied Matthieu from builder onto the thread. Matthieu, it looks like we 
might
look into builder -- any support in answering questions is appreciated while
we work out if it is the way to go

Carl.


Robert Greig wrote:
> On 23/11/2007, Carl Trieloff <cc...@redhat.com> wrote:
>   
>> I am fine moving back to ant... consuming maven is a nightmare. every
>> time you
>> turn around there is a new set of dependencies. The builder guys at
>> apachecon
>> also have an alternative and would help us convert it we wanted to go
>> that way.
>>     
>
> I have not tried buildr yet but I did speak to a colleague who is a
> Ruby developer and he says that Rake (upon which Buildr is based) is
> very good - flexible and straightforward to use. I think the key
> requirement is flexibility.
>
> So I would certainly support closer examination of it, and if it turns
> out that it is too immature or otherwise unsuitable we did have an
> excellent ant-based system that served us well in the past, courtesy
> of Rafi.
>
> RG
>   


Re: Question for maven experts

Posted by Robert Greig <ro...@gmail.com>.
On 23/11/2007, Carl Trieloff <cc...@redhat.com> wrote:
>
> I am fine moving back to ant... consuming maven is a nightmare. every
> time you
> turn around there is a new set of dependencies. The builder guys at
> apachecon
> also have an alternative and would help us convert it we wanted to go
> that way.

I have not tried buildr yet but I did speak to a colleague who is a
Ruby developer and he says that Rake (upon which Buildr is based) is
very good - flexible and straightforward to use. I think the key
requirement is flexibility.

So I would certainly support closer examination of it, and if it turns
out that it is too immature or otherwise unsuitable we did have an
excellent ant-based system that served us well in the past, courtesy
of Rafi.

RG

Re: Question for maven experts

Posted by Carl Trieloff <cc...@redhat.com>.
I am fine moving back to ant... consuming maven is a nightmare. every 
time you
turn around there is a new set of dependencies. The builder guys at 
apachecon
also have an alternative and would help us convert it we wanted to go 
that way.

Carl.

Rupert Smith wrote:
> 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 <ri...@apache.org> 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
>>
>>     
>
>   


Re: Question for maven experts

Posted by Rupert Smith <ru...@googlemail.com>.
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 <ri...@apache.org> 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
>