You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Christian Schulte (JIRA)" <ji...@codehaus.org> on 2007/07/06 03:49:13 UTC

[jira] Updated: (MNG-3090) Nearest dependency, which is not included by a filter, wins, although a farthest dependency, which is included by the same filter, does not win.

     [ http://jira.codehaus.org/browse/MNG-3090?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schulte updated MNG-3090:
-----------------------------------

    Attachment: testcase.tar.bz2

Testcase for the attached patch. Trying to build this using maven-2.0.7 fails with

[INFO] ----------------------------------------------------------------------------
[INFO] Building Maven Quick Start Archetype E
[INFO]    task-segment: [install]
[INFO] ----------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to /home/schulte/Sources/testcase/e/target/classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

/home/schulte/Sources/testcase/e/src/main/java/NewClass.java:[10,34] package org.apache.commons.logging does not exist

/home/schulte/Sources/testcase/e/src/main/java/NewClass.java:[22,8] cannot find symbol
symbol  : variable LogFactory
location: class NewClass


Attaching the patch and rebuilding with the modified maven-2.0.8-SNAPSHOT does work. Seems to have something to do with the dependencyManagement and the checkScopeUpdate() method which will not to, what it did before manageArtifact() got introduced.


> Nearest dependency, which is not included by a filter, wins, although a farthest dependency, which is included by the same filter, does not win.
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-3090
>                 URL: http://jira.codehaus.org/browse/MNG-3090
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Artifacts and Repositories
>    Affects Versions: 2.0.7
>            Reporter: Christian Schulte
>         Attachments: maven-artifact-2.0.x.patch, testcase.tar.bz2
>
>
> There seems to be a problem with transitive dependencies and the nearest wins strategy. The nearest dependency wins, although a filter is in use which will not include that dependency when there is the same dependency at a deeper level, where it is included by the same filter. The nearest dependency gets discarded (e.g. is missing on the compile classpath) although the farthest dependency would have been included. Please see the comments in the attached patch.

-- 
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