You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by gridplan <gr...@yahoo.com> on 2007/05/01 01:14:35 UTC

Re: [m2] Dependency Ordering Headache

Granted.  There is obviously more than one way to roll out a fix.  But in my
view it's not WebLogic's job to change their approach because Maven does not
embrace the notion of an ordered classpath.  I don't hold as self-evident
the idea that "Builds which depend upon the ordering of artifacts in the
classpath is one of those things which are certainly not a best practice". 
There is nothing wrong with order.  It is central to what it means to be a
Java classpath.  It is how Java's classloader knows where to look for the
classes it loads.  It's the key to predictability, which is not only a good
thing, it is essential to what I'm trying to do.  Unfortunately, the
classpath Maven generates is not always so well-behaved and has caused me
some major grief.  Hard as it may be to believe, I want to like Maven.  But
I also want some control over it when it demonstrates its ability to get
things wrong.

-kevin


I disagree. The Maven model would simply require that Weblogic produce
updated JARs with the patches applied, and you would roll the versions
in the poms (or simply import a single pom provided by Weblogic where
they manage versions and artifacts for you) and rebuild your project.
This sounds far easier (and far more consistent) than depending upon
jars which may or may not currently exist in a given Weblogic build.

Maven is not simply another build tool like Ant or Make. It is also a
vehicle for presenting and delivering build management best practices
as interpreted by the Maven Dev team/PMC. Builds which depend upon the
ordering of artifacts in the classpath is one of those things which
are certainly not a best practice, just like code patches, and so
these features are not available.

As always, this is simply my opinion. Someone who is actually in the
Maven Dev team may respond and say I'm completely wrong on these
issues, and that support for patches and ordering of classpath items
is on the TODO list, but I generally doubt it. ;-)

Wayne

-- 
View this message in context: http://www.nabble.com/-m2--Dependency-Ordering-Headache-tf3668646s177.html#a10262265
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] Dependency Ordering Headache

Posted by Wayne Fay <wa...@gmail.com>.
On 5/1/07, Wendy Smoak <ws...@gmail.com> wrote:
> There is some discussion of (and 20+ votes for) "dependency sorting in
> classpath" on http://jira.codehaus.org/browse/MNG-1412 .

Now its 30+ votes... And appears scheduled for 2.1.x.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] Dependency Ordering Headache

Posted by gridplan <gr...@yahoo.com>.
Thanks everyone for your input.  I'll be keeping an eye on
http://jira.codehaus.org/browse/MNG-1412.

If anyone has instructions for where to find the source for
maven-artifact-ant and how to build it, I'd love to hear from you.  I may
need to figure out how to patch this in my environment before an official
release becomes available.

-kevin 
-- 
View this message in context: http://www.nabble.com/-m2--Dependency-Ordering-Headache-tf3668646s177.html#a10299839
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] Dependency Ordering Headache

Posted by Andrew Williams <an...@handyande.co.uk>.
My apologies, I must just have been lucky with the orders being  
static on my projects.

Andy

On 1 May 2007, at 13:50, Wendy Smoak wrote:

> On 5/1/07, Andrew Williams <an...@handyande.co.uk> wrote:
>> I may be speaking out of turn here, but I think that maven does not
>> have a lack of order,
>> it simply does not allow you, the user, to control the order.
>> Thus builds are reproducable reliably, the order does not change from
>> one build to another.
>
> And yet the OP says that the order changes on Solaris vs. WindowsXP...
>
> There is some discussion of (and 20+ votes for) "dependency sorting in
> classpath" on http://jira.codehaus.org/browse/MNG-1412 .
>
> -- 
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] Dependency Ordering Headache

Posted by Wendy Smoak <ws...@gmail.com>.
On 5/1/07, Andrew Williams <an...@handyande.co.uk> wrote:
> I may be speaking out of turn here, but I think that maven does not
> have a lack of order,
> it simply does not allow you, the user, to control the order.
> Thus builds are reproducable reliably, the order does not change from
> one build to another.

And yet the OP says that the order changes on Solaris vs. WindowsXP...

There is some discussion of (and 20+ votes for) "dependency sorting in
classpath" on http://jira.codehaus.org/browse/MNG-1412 .

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] Dependency Ordering Headache

Posted by Andrew Williams <an...@handyande.co.uk>.
I may be speaking out of turn here, but I think that maven does not  
have a lack of order,
it simply does not allow you, the user, to control the order.
Thus builds are reproducable reliably, the order does not change from  
one build to another.

This, however, is academic. If your classpath requires order then it  
means there are conflicts.
Conflicts are never good - let us imagine for a moment we have an  
interface "com.mypackage.MyInter"
Now, this is defined in jarA and jarB and jarB contains a class  
"com.other.MyObj".

It follows that if at some point in time the signature of MyInter  
changes in jarA and yet jarA
is first in the classpath then the class "com.other.MyObj" will fail  
to load, as it no longer implements MyInter,
even though it has defined it correctly internally.

Badness.

Andy

On 1 May 2007, at 00:14, gridplan wrote:

>
> Granted.  There is obviously more than one way to roll out a fix.   
> But in my
> view it's not WebLogic's job to change their approach because Maven  
> does not
> embrace the notion of an ordered classpath.  I don't hold as self- 
> evident
> the idea that "Builds which depend upon the ordering of artifacts  
> in the
> classpath is one of those things which are certainly not a best  
> practice".
> There is nothing wrong with order.  It is central to what it means  
> to be a
> Java classpath.  It is how Java's classloader knows where to look  
> for the
> classes it loads.  It's the key to predictability, which is not  
> only a good
> thing, it is essential to what I'm trying to do.  Unfortunately, the
> classpath Maven generates is not always so well-behaved and has  
> caused me
> some major grief.  Hard as it may be to believe, I want to like  
> Maven.  But
> I also want some control over it when it demonstrates its ability  
> to get
> things wrong.
>
> -kevin
>
>
> I disagree. The Maven model would simply require that Weblogic produce
> updated JARs with the patches applied, and you would roll the versions
> in the poms (or simply import a single pom provided by Weblogic where
> they manage versions and artifacts for you) and rebuild your project.
> This sounds far easier (and far more consistent) than depending upon
> jars which may or may not currently exist in a given Weblogic build.
>
> Maven is not simply another build tool like Ant or Make. It is also a
> vehicle for presenting and delivering build management best practices
> as interpreted by the Maven Dev team/PMC. Builds which depend upon the
> ordering of artifacts in the classpath is one of those things which
> are certainly not a best practice, just like code patches, and so
> these features are not available.
>
> As always, this is simply my opinion. Someone who is actually in the
> Maven Dev team may respond and say I'm completely wrong on these
> issues, and that support for patches and ordering of classpath items
> is on the TODO list, but I generally doubt it. ;-)
>
> Wayne
>
> -- 
> View this message in context: http://www.nabble.com/-m2--Dependency- 
> Ordering-Headache-tf3668646s177.html#a10262265
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org