You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2009/11/05 11:13:55 UTC

[jira] Updated: (MNG-4427) Bad error message with duplicate dependencies that don't declare a version

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

Benjamin Bentmann updated MNG-4427:
-----------------------------------

             Priority: Minor  (was: Major)
    Affects Version/s: 3.0-alpha-3

> Bad error message with duplicate dependencies that don't declare a version
> --------------------------------------------------------------------------
>
>                 Key: MNG-4427
>                 URL: http://jira.codehaus.org/browse/MNG-4427
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies, Errors
>    Affects Versions: 3.0-alpha-3
>            Reporter: Dan Fabulich
>            Priority: Minor
>         Attachments: bug.zip
>
>
> Consider the attached project, which builds in Maven 2.1.  The "parent" project has a dependencyManagement section that declares the version of JUnit as 3.8.1.  The "child" project has duplicate dependency entries for junit; neither one declares a version.
> Maven 3 generates a very misleading error message; it took a long time for me to figure out the real cause of the problem.
> {code}
> c:\Temp\scratch\parent>mvn clean
> [INFO] Scanning for projects...
> [ERROR] The build could not read 1 project -> [Help 1]
> [ERROR]   The project bug:child:1.0-SNAPSHOT (C:\Temp\scratch\parent\child\pom.xml) has 2 errors
> [ERROR]     'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: junit:junit:jar -> null vs null
> [ERROR]     'dependencies.dependency.version' is missing for junit:junit:jar
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please read the following articles:
> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
> {code}
> I expected an error more like:
> {code}
> 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: junit:junit:jar -> duplicate declaration of 3.8.1
> {code}
> That would have been MUCH more helpful.

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