[
https://jira.codehaus.org/browse/MNG-5185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=320559#comment-320559
]
Stephen Connolly commented on MNG-5185:
---------------------------------------
Thinking about this some more, what users probably want is a way to mark
specific repository ids as offline.
Most of the cases where -Dmaven.legacyLocalRepository is required are, IMHO,
where the user is not connected to the corporate VPN and so resolution against
the corporate repo should not be attempted because it is "offline"
The "legacy" behaviour is really a global switch for all repositories, much
better IMHO is
{code}
-Dmaven.repositories.offline=central,java.net2,...
{code}
or
{code}
-Dmaven.repository.offline.central
-Dmaven.repository.offline.java.net2
{code}
Now it may not be possible to implement this way with the current Aether, but I
think this is more the solution we should be heading towards.
Another way would be to have a repository-status file on disk that contained
the list of repository id's and their on-line/off-line status... or even an
extension to allow querying... so that users could plug a vpn status detector
into their maven installation and have auto-just-works
> Improve "missing dependency" error message when _maven.repositories contains
> other repository ids than requested
> ----------------------------------------------------------------------------------------------------------------
>
> Key: MNG-5185
> URL: https://jira.codehaus.org/browse/MNG-5185
> Project: Maven 2 & 3
> Issue Type: Improvement
> Affects Versions: 3.0.2, 3.0.3, 3.0.4
> Reporter: Mark Derricutt
> Assignee: Olivier Lamy
> Fix For: 3.1.0
>
> Attachments:
> 0001-MNG-5185-Warn-about-artifacts-present-but-not-availa.patch
>
>
> Based on a discussion on the users list [1], Maven 3 has changed how it
> resolves artifacts from remote repositories. Unfortunately, when "conflicts"
> arise ( GAV is cached in local repo, but 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, and 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 the
> undeclared 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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira