maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bentmann (JIRA)" <j...@codehaus.org>
Subject [jira] Closed: (MNG-4427) Bad error message with duplicate dependencies that don't declare a version
Date Thu, 05 Nov 2009 12:42:55 GMT

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

Benjamin Bentmann closed MNG-4427.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0-alpha-3
         Assignee: Benjamin Bentmann

Improved validation messages in [r833040|http://svn.apache.org/viewvc?revision=833040&view=revision].

> 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
>            Assignee: Benjamin Bentmann
>            Priority: Minor
>             Fix For: 3.0-alpha-3
>
>         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

        

Mime
View raw message