Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 03D0C200B36 for ; Wed, 6 Jul 2016 20:25:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 02451160A79; Wed, 6 Jul 2016 18:25:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4C96F160A55 for ; Wed, 6 Jul 2016 20:25:12 +0200 (CEST) Received: (qmail 44466 invoked by uid 500); 6 Jul 2016 18:25:11 -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 44442 invoked by uid 99); 6 Jul 2016 18:25:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jul 2016 18:25:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 2B26D2C0003 for ; Wed, 6 Jul 2016 18:25:11 +0000 (UTC) Date: Wed, 6 Jul 2016 18:25:11 +0000 (UTC) From: "Robby Morgan (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MENFORCER-255) dependencyConvergence gets confused with jaxen pre-1.1.4 due to cyclical optional dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 06 Jul 2016 18:25:13 -0000 [ https://issues.apache.org/jira/browse/MENFORCER-255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15364810#comment-15364810 ] Robby Morgan commented on MENFORCER-255: ---------------------------------------- FWIW, here's my Maven version: {noformat} $ mvn --version Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T11:29:23-06:00) Maven home: /usr/local/Cellar/maven32/3.2.5/libexec Java version: 1.8.0_51, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "10.10.5", arch: "x86_64", family: "mac" {noformat} > dependencyConvergence gets confused with jaxen pre-1.1.4 due to cyclical optional dependencies > ---------------------------------------------------------------------------------------------- > > Key: MENFORCER-255 > URL: https://issues.apache.org/jira/browse/MENFORCER-255 > Project: Maven Enforcer Plugin > Issue Type: Bug > Affects Versions: 1.3.1, 1.4.1 > Reporter: Robby Morgan > > Since its inception, jaxen:jaxen has dependencies on jdom:jdom and dom4j:dom4j, which in turn have dependencies on jaxen:1.1-beta-6 and jaxen:1.0-FCS respectively. In jaxen:1.1.4, the dependencies on jdom and dom4j were marked as optional, whereas before they weren't. > We've run into a situation with the rule where, if the jaxen dependency is managed to a pre-1.1.4 version, but the project has any dependency compiled against 1.1.4 or greater, then we get output like: > {noformat} > [INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-versions) @ importing-dependency --- > [WARNING] > Dependency convergence error for jaxen:jaxen:1.1.1 paths to dependency are: > +-com.bazaarvoice:importing-dependency:1.0-SNAPSHOT > +-com.bazaarvoice:dependency-using-jaxen:1.0-SNAPSHOT > +-jaxen:jaxen:1.1.1 > and > +-com.bazaarvoice:importing-dependency:1.0-SNAPSHOT > +-com.bazaarvoice:dependency-using-jaxen:1.0-SNAPSHOT > +-jaxen:jaxen:1.1.1 > +-jaxen:jaxen:1.1-beta-6 > and > +-com.bazaarvoice:importing-dependency:1.0-SNAPSHOT > +-com.bazaarvoice:dependency-using-jaxen:1.0-SNAPSHOT > +-jaxen:jaxen:1.1.1 > +-jaxen:jaxen:1.0-FCS > {noformat} > While this particular issue can be resolved by managing jaxen to 1.1.6 (in importing-dependency), the behavior exhibited has several problems that might crop up in other scenarios: > # It confusingly indicates that jaxen has a direct dependency on *a different version of itself*. > # The transitive dependencies are not respecting the explicit version chosen for jaxen in the POM. > # If the problematic dependency is a transitive dependency outside of local control, then resolving this issue is at the mercy of the some version in the dependency chain restructuring in a way that "miraculously" solves the problem. > This behavior can be reproduced with the following two POM files: > {code:xml} > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> > 4.0.0 > com.bazaarvoice > dependency-using-jaxen > 1.0-SNAPSHOT > > > jaxen > jaxen > 1.1.6 > > > > {code} > {code:xml} > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> > 4.0.0 > com.bazaarvoice > importing-dependency > 1.0-SNAPSHOT > > > com.bazaarvoice > dependency-using-jaxen > 1.0-SNAPSHOT > > > > > > jaxen > jaxen > 1.1.1 > > > > > > > org.apache.maven.plugins > maven-enforcer-plugin > 1.4.1 > > > enforce-versions > initialize > > enforce > > > > > > > > > > > > > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)