mirror of
https://github.com/apache/maven.git
synced 2025-03-06 16:49:27 +00:00
[MNG-4574] [regression] invoker:install uses wrong local repo path when settings.xml contains wildcard mirror
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@917315 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dd34e52b56
commit
f2aa8eda8a
@ -104,7 +104,7 @@ private ArtifactRepository injectSession( ArtifactRepository repository, boolean
|
||||
{
|
||||
MavenSession session = legacySupport.getSession();
|
||||
|
||||
if ( session != null && repository != null )
|
||||
if ( session != null && repository != null && !isLocalRepository( repository ) )
|
||||
{
|
||||
MavenExecutionRequest request = session.getRequest();
|
||||
if ( request != null )
|
||||
@ -125,4 +125,10 @@ private ArtifactRepository injectSession( ArtifactRepository repository, boolean
|
||||
return repository;
|
||||
}
|
||||
|
||||
private boolean isLocalRepository( ArtifactRepository repository )
|
||||
{
|
||||
// unfortunately, the API doesn't allow to tell a remote repo and the local repo apart...
|
||||
return "local".equals( repository.getId() );
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user