mirror of https://github.com/apache/maven.git
o added an offline mode to the bootstrap, so on my machine I can bootstrap
in 20s when ibiblio isn't consulted. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@162898 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cecdbd417c
commit
269fa79368
|
@ -105,6 +105,8 @@ public class MBoot
|
||||||
|
|
||||||
private List coreDeps;
|
private List coreDeps;
|
||||||
|
|
||||||
|
private boolean online = true;
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
@ -143,7 +145,14 @@ public class MBoot
|
||||||
{
|
{
|
||||||
String key = (String) i.next();
|
String key = (String) i.next();
|
||||||
|
|
||||||
properties.setProperty( key, StringUtils.interpolate( properties.getProperty(key), System.getProperties() ) );
|
properties.setProperty( key, StringUtils.interpolate( properties.getProperty( key ), System.getProperties() ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
String onlineProperty = properties.getProperty( "maven.online" );
|
||||||
|
|
||||||
|
if ( onlineProperty != null && onlineProperty.equals( "false" ) )
|
||||||
|
{
|
||||||
|
online = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
downloader = new ArtifactDownloader( properties );
|
downloader = new ArtifactDownloader( properties );
|
||||||
|
@ -154,7 +163,12 @@ public class MBoot
|
||||||
|
|
||||||
String basedir = System.getProperty( "user.dir" );
|
String basedir = System.getProperty( "user.dir" );
|
||||||
|
|
||||||
|
mbootDependencies = Arrays.asList( deps );
|
||||||
|
|
||||||
|
if ( online )
|
||||||
|
{
|
||||||
checkMBootDeps();
|
checkMBootDeps();
|
||||||
|
}
|
||||||
|
|
||||||
// Install maven-components POM
|
// Install maven-components POM
|
||||||
installPomFile( repoLocal, new File( basedir, "pom.xml" ) );
|
installPomFile( repoLocal, new File( basedir, "pom.xml" ) );
|
||||||
|
@ -356,9 +370,12 @@ public class MBoot
|
||||||
// Download deps
|
// Download deps
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
|
if ( online )
|
||||||
|
{
|
||||||
System.out.println( "Downloading dependencies ..." );
|
System.out.println( "Downloading dependencies ..." );
|
||||||
|
|
||||||
downloadDependencies( reader.getDependencies() );
|
downloadDependencies( reader.getDependencies() );
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// Generating sources
|
// Generating sources
|
||||||
|
@ -526,8 +543,6 @@ public class MBoot
|
||||||
{
|
{
|
||||||
System.out.println( "Checking for MBoot's dependencies ..." );
|
System.out.println( "Checking for MBoot's dependencies ..." );
|
||||||
|
|
||||||
mbootDependencies = Arrays.asList( deps );
|
|
||||||
|
|
||||||
downloader.downloadDependencies( mbootDependencies );
|
downloader.downloadDependencies( mbootDependencies );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue