Return-Path: X-Original-To: apmail-maven-dev-archive@www.apache.org Delivered-To: apmail-maven-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7E06710707 for ; Tue, 20 Aug 2013 15:37:23 +0000 (UTC) Received: (qmail 36419 invoked by uid 500); 20 Aug 2013 15:37:22 -0000 Delivered-To: apmail-maven-dev-archive@maven.apache.org Received: (qmail 36210 invoked by uid 500); 20 Aug 2013 15:37:21 -0000 Mailing-List: contact dev-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Developers List" Reply-To: "Maven Developers List" Delivered-To: mailing list dev@maven.apache.org Received: (qmail 36199 invoked by uid 99); 20 Aug 2013 15:37:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Aug 2013 15:37:20 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sshock@gmail.com designates 209.85.219.49 as permitted sender) Received: from [209.85.219.49] (HELO mail-oa0-f49.google.com) (209.85.219.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Aug 2013 15:37:13 +0000 Received: by mail-oa0-f49.google.com with SMTP id n10so1068376oag.36 for ; Tue, 20 Aug 2013 08:36:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=UYlFAbhMAZuXCPORWqI0gJc4MzK48P2oFvz/q6ahxyA=; b=cyPqEv0fX2yAMlaWBvFU3/r/pGtHZpRIiArwpYsrZrSqvvaJsgFwwSZWQCG7MYSwNq mSGh3D6cjPi9EK1y3C43yqNOxAZucnsRWF5lc7z9XbW3b/aQhbkyet8xFm0LPzpuzT3m OAyBUIAxBbH6VTmZA7sTOOcmTSCMNJLS4INrNye3SQsc/rowCoAI9NH1mTfJR1rSXC0Q 9TZcZBPZxeMspLx0H8maYR5a3Uk0BTlx8CkFOZ1OWBP4hisKP3RwZxH/zJ/DCucutZXZ OG/IWWfXWS4mfD5QexTJ/51dGsW1IOxge8LWHBXZ3UBwwmo6+SNrhWWACR4+uphq2UVE B35Q== X-Received: by 10.182.181.34 with SMTP id dt2mr2304309obc.30.1377013011911; Tue, 20 Aug 2013 08:36:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.81.69 with HTTP; Tue, 20 Aug 2013 08:36:30 -0700 (PDT) In-Reply-To: References: From: Phillip Hellewell Date: Tue, 20 Aug 2013 09:36:30 -0600 Message-ID: Subject: Re: Adding support for new dependency mediation strategy To: Maven Developers List Content-Type: multipart/alternative; boundary=089e0122aa246d287004e462d300 X-Virus-Checked: Checked by ClamAV on apache.org --089e0122aa246d287004e462d300 Content-Type: text/plain; charset=UTF-8 Thanks everyone for you help so far. So would the crux of this be to create a VersionSelector class called NewestVersionSelector, and then find the code where it is currently hard-coded to use NearestVersionSelector and make it possible to use this one instead? Yeah, I'm also very concerned about the issue of predictability, and also of preserving existing behavior. You know, I don't think I can guarantee predictability if I have a setting in settings.xml, because individual users could tweak that. I believe the behavior needs to be defined in the parent pom, e.g., in a new tag called or something (help me think of a good name). Thanks, Phillip On Tue, Aug 20, 2013 at 6:37 AM, Jason van Zyl wrote: > Aether is incredibly flexible and can pretty much do anything. The class > that Olivier pointed you at is the where the Maven rules are encapsulated. > The issue is interoperability in the behaviour of a new Maven that may do > something different and versions of Maven that don't. Selecting the nearest > provides one type of predictability but is more focused on the users direct > POM. Selecting the latest provides another type of predictability but > almost certainly a completely different result. > > If everyone building a project used the same version of Maven it can work. > Even on the outside world for a public OSS project you can enforce the > version of Maven and it can potentially work. As with almost everything we > talk about with respect to new POM elements or new behaviour is a matter of > how much we want to preserve existing behaviour and interoperatilbity. > > On Aug 19, 2013, at 11:11 AM, Phillip Hellewell wrote: > > > Hi all, > > > > I'd like to take a stab at adding support for Maven to be able to mediate > > dependency conflicts using "highest version" strategy rather than > "nearest > > definition". > > > > I'll be happy if anyone can point me in the right direction on which > source > > files I'll need to modify, and any other guidance. Also, how long do you > > expect such a task would take for a competent developer? > > > > Finally, I'm curious to know what are the chances of a patch being > accepted > > when I'm done? I'll of course do it in such a way that the default > remains > > "nearest definition", and this new strategy has to be enabled with a > > setting in settings.xml or something. > > > > Thanks, > > Phillip Hellewell > > Thanks, > > Jason > > ---------------------------------------------------------- > Jason van Zyl > Founder, Apache Maven > http://twitter.com/jvanzyl > --------------------------------------------------------- > > Be not afraid of growing slowly, be only afraid of standing still. > > -- Chinese Proverb > > > > > > > --089e0122aa246d287004e462d300--