Details
-
Improvement
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
3.0.2, 3.0.3, 3.0.4
-
None
Description
Based on a discussion on the users list [1], Maven 3 has changed how it resolves artifacts from local repositories. Unfortunately, when "conflicts" arise (GAV is cached in local repo, but restricted to some repository ids, and actual POM has no matching repository id declared), Maven just tells the user that the artifact could not be resolved.
This leads to confusion from users who find the .jar files in their local repository without knowing this restriction feature: they just get frustrated and complain that "maven sucks".
It would be good if Maven was updated with some improved error messages along the lines of:
"The (GAV) artifact was found in your local repository, but came from remote repository "xxx": either configure this in your pom with (insert sample XML block in error message), or in your "yyy" mirror."
The "mirror" section of the error message should be included if the current ~/.m2/settings.xml declares a mirror. By improving the messages here we can help the users move on to building software, rather than pulling out their hair
[1] http://maven.40175.n5.nabble.com/Maven-3-maven-repositories-and-lastUpdated-td4927537.html
Attachments
Attachments
Issue Links
- is fixed by
-
MRESOLVER-333 Distinguish better resolver errors for artifact availability
- Closed
- is related to
-
MNG-8076 when jar in local repository from other repository id, should not reject but check if it is also available in current repository id context
- Open
-
MNG-5457 Show repository id when downloading or uploading from/to a remote repository
- Closed
-
MNG-5461 rename _maven.repositories tracking file to _remote.repositories
- Closed
- relates to
-
MNG-5883 Silence unnecessary legacy local repository warning
- Closed
-
MNG-5289 -Dmaven.repo.local not honored
- Closed
-
MNG-5319 Better formatting of "missing dependencies" error message - add newlines
- Closed
-
MNG-5181 New resolution from local repository is very confusing
- Closed
- supercedes
-
MNG-7001 Reconsider seemingly useless check of artifacts' source repository introduced in Maven 3.0
- Open