Return-Path: Delivered-To: apmail-maven-issues-archive@minotaur.apache.org Received: (qmail 78425 invoked from network); 11 Nov 2009 10:43:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Nov 2009 10:43:27 -0000 Received: (qmail 14537 invoked by uid 500); 11 Nov 2009 10:43:26 -0000 Delivered-To: apmail-maven-issues-archive@maven.apache.org Received: (qmail 14490 invoked by uid 500); 11 Nov 2009 10:43:26 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 14480 invoked by uid 99); 11 Nov 2009 10:43:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Nov 2009 10:43:26 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [63.246.2.115] (HELO codehaus01.managed.contegix.com) (63.246.2.115) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Nov 2009 10:43:17 +0000 Received: from codehaus01.managed.contegix.com (localhost.localdomain [127.0.0.1]) by codehaus01.managed.contegix.com (Postfix) with ESMTP id 82CA119E010F for ; Wed, 11 Nov 2009 04:42:55 -0600 (CST) Date: Wed, 11 Nov 2009 04:42:55 -0600 (CST) From: "Neale (JIRA)" To: issues@maven.apache.org Message-ID: <8181683.9201.1257936175286.JavaMail.haus-jira@codehaus01.managed.contegix.com> In-Reply-To: <30124107.3051255356627404.JavaMail.haus-jira@codehaus01.managed.contegix.com> Subject: [jira] Commented: (MNG-4391) DependencyManagement should allow to manage use of re-named, woven, instrumented or compatible artifacts MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 4e90ceb663894a42f12c0e28abbab431 X-Virus-Checked: Checked by ClamAV on apache.org [ http://jira.codehaus.org/browse/MNG-4391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=197940#action_197940 ] Neale commented on MNG-4391: ---------------------------- Agree to. That'd do the trick and sounds like it'd be a helpful way of ensuring tools such as m2e can visualise the results easily. Nice one. > DependencyManagement should allow to manage use of re-named, woven, instrumented or compatible artifacts > ---------------------------------------------------------------------------------------------------------------------- > > Key: MNG-4391 > URL: http://jira.codehaus.org/browse/MNG-4391 > Project: Maven 2 > Issue Type: Improvement > Components: Dependencies > Affects Versions: 2.2.1 > Reporter: Neale > > [if only this was a later version of JIRA I'd have not lost all of what I just typed, as I could use Mylyn instead of the web UI. here goes again...] > The challenge of using a different artifact instead of the one that is specified in a POM that you are consuming is not an easy one. > Examples where this hits uses is: > - the artifact name and packaging changes that Spring made at 2.5.6A (which was a big improvement) > - wanting to use SLF4J instead of Apache commons logging (i.e. use something that provides the same API, but is an entirely different project) > - wanting to use your own derivation of a public artifact > - wanting to use a woven/instrumented version of a public artifact > The current approach to replacing, say org.springframework : spring-beans with org.springframework : org.springframework.beans is to do ('scuse the shorthand): > {code:xml} > > > > com.sun.jersey.contribs > jersey-spring > > org.springframework : spring-beans > > > ... repeat for every artifact that uses spring-beans, and then add more if adding another artifact > > > {code} > to exclude it, and then globally include the replacement using: > {code:xml} > > > org.springframework > org.springframework.beans > ${spring.version} > > > {code} > This is error prone, and could be made far easier by an extension to dependencies, which would remove the need to know what artifacts (jersey-spring in the above example) use the artifact that you are replacing. Here's how it would look: > {code:xml} > > > > > org.springframework > org.springframework.beans > ${spring.version} > > > > org.springframework > spring-beans > > > org.springframework > org.springframework.beans > > > > > > {code} > NOTE: > - Nothing is specified in so no artifacts are globally added where they may not be needed. This means we can develop a project wide parent pom.xml. > - Artifacts can have been split and merged > - Derived artifacts, such as instrumented ones can easily be substituted, and could be selectively substituted using profiles. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira