mirror of https://github.com/apache/maven.git
Moving offline notice to avoid embedded cases.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@593040 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ed568e725f
commit
4c2d75b726
|
@ -168,6 +168,11 @@ public class MavenCli
|
|||
mavenEmbedder = new MavenEmbedder( configuration );
|
||||
|
||||
logger = mavenEmbedder.getLogger();
|
||||
|
||||
if ( mavenEmbedder.isOffline( request ) )
|
||||
{
|
||||
logger.info( "You are working in offline mode." );
|
||||
}
|
||||
}
|
||||
catch ( MavenEmbedderException e )
|
||||
{
|
||||
|
|
|
@ -778,6 +778,15 @@ public class MavenEmbedder
|
|||
// Start of new embedder API
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
public boolean isOffline( MavenExecutionRequest request )
|
||||
throws MavenEmbedderException
|
||||
{
|
||||
// first, grab defaults including settings, in case <offline>true</offline> is set.
|
||||
request = populator.populateDefaults( request, configuration );
|
||||
|
||||
return request.isOffline();
|
||||
}
|
||||
|
||||
public MavenExecutionResult execute( MavenExecutionRequest request )
|
||||
{
|
||||
LoggerManager loggerManager = container.getLoggerManager();
|
||||
|
|
|
@ -470,8 +470,6 @@ public class DefaultMavenExecutionRequestPopulator
|
|||
|
||||
if ( request.isOffline() )
|
||||
{
|
||||
getLogger().info( "You are working in offline mode." );
|
||||
|
||||
wagonManager.setOnline( false );
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue