You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jason van Zyl (JIRA)" <ji...@codehaus.org> on 2009/12/30 01:44:56 UTC

[jira] Commented: (MNG-2548) Duplicate dependencies with different scope causes confusion

    [ http://jira.codehaus.org/browse/MNG-2548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=204472#action_204472 ] 

Jason van Zyl commented on MNG-2548:
------------------------------------

Duplicate dependencies are called out as errors.

> Duplicate dependencies with different scope causes confusion
> ------------------------------------------------------------
>
>                 Key: MNG-2548
>                 URL: http://jira.codehaus.org/browse/MNG-2548
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4
>         Environment: Win XP
>            Reporter: Andre Ranvik
>            Priority: Minor
>             Fix For: 3.0-alpha-6
>
>
> When having duplicate dependencies, where one has a scope of compile, and another has a scope of runtime, Maven 2 will use the last scope (I think), and if this is the runtime, then the compile dependency is ignored. This can be confusing because there *is* a compile dependency provided in the pom, and if anything - both dependencies should be in use (meaning: compile, since it also includes runtime). An even better approach would be to halt the operation with a nice, sweet error message explaining the problem. I can't see any reason why one would want to have two dependencies, so it is better to ask the user to fix it, as opposed to having some kind of default behavior..?

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