mirror of https://github.com/apache/maven.git
[MNG-4343] maven always checks missing release artifacts
[MNG-4592] Snapshot artifacts that could not be downloaded due to communication problems are "blacklisted" for a day by default. o Allowed to configure caching of resolution errors in the execution request, thereby providing better control for CLI and IDE to select the desired behavior git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@995600 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b4916c20e9
commit
68ebd39bd8
|
@ -345,8 +345,8 @@ public class DefaultMaven
|
|||
session.setChecksumPolicy( request.getGlobalChecksumPolicy() );
|
||||
session.setUpdatePolicy( request.isUpdateSnapshots() ? RepositoryPolicy.UPDATE_POLICY_ALWAYS : null );
|
||||
|
||||
session.setNotFoundCachingEnabled( !request.isUpdateSnapshots() );
|
||||
session.setTransferErrorCachingEnabled( !request.isUpdateSnapshots() );
|
||||
session.setNotFoundCachingEnabled( request.isCacheNotFound() );
|
||||
session.setTransferErrorCachingEnabled( request.isCacheTransferError() );
|
||||
|
||||
session.setArtifactTypeRegistry( RepositoryUtils.newArtifactTypeRegistry( artifactHandlerManager ) );
|
||||
|
||||
|
|
|
@ -56,6 +56,10 @@ public class DefaultMavenExecutionRequest
|
|||
|
||||
private boolean interactiveMode = true;
|
||||
|
||||
private boolean cacheTransferError = true;
|
||||
|
||||
private boolean cacheNotFound = true;
|
||||
|
||||
private List<Proxy> proxies;
|
||||
|
||||
private List<Server> servers;
|
||||
|
@ -150,6 +154,8 @@ public class DefaultMavenExecutionRequest
|
|||
copy.setLocalRepositoryPath( original.getLocalRepositoryPath() );
|
||||
copy.setOffline( original.isOffline() );
|
||||
copy.setInteractiveMode( original.isInteractiveMode() );
|
||||
copy.setCacheNotFound( original.isCacheNotFound() );
|
||||
copy.setCacheTransferError( original.isCacheTransferError() );
|
||||
copy.setProxies( original.getProxies() );
|
||||
copy.setServers( original.getServers() );
|
||||
copy.setMirrors( original.getMirrors() );
|
||||
|
@ -1048,4 +1054,26 @@ public class DefaultMavenExecutionRequest
|
|||
return this;
|
||||
}
|
||||
|
||||
public boolean isCacheTransferError()
|
||||
{
|
||||
return cacheTransferError;
|
||||
}
|
||||
|
||||
public MavenExecutionRequest setCacheTransferError( boolean cacheTransferError )
|
||||
{
|
||||
this.cacheTransferError = cacheTransferError;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isCacheNotFound()
|
||||
{
|
||||
return cacheNotFound;
|
||||
}
|
||||
|
||||
public MavenExecutionRequest setCacheNotFound( boolean cacheNotFound )
|
||||
{
|
||||
this.cacheNotFound = cacheNotFound;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -204,6 +204,12 @@ public interface MavenExecutionRequest
|
|||
MavenExecutionRequest setOffline( boolean offline );
|
||||
boolean isOffline();
|
||||
|
||||
boolean isCacheTransferError();
|
||||
MavenExecutionRequest setCacheTransferError( boolean cacheTransferError );
|
||||
|
||||
boolean isCacheNotFound();
|
||||
MavenExecutionRequest setCacheNotFound( boolean cacheNotFound );
|
||||
|
||||
// Profiles
|
||||
List<Profile> getProfiles();
|
||||
MavenExecutionRequest addProfile( Profile profile );
|
||||
|
|
Loading…
Reference in New Issue