Merge pull request #1894 from guobingkun/airline_option

fix pull-deps remoteRepository option
This commit is contained in:
Xavier Léauté 2015-10-30 15:43:16 -07:00
commit e8692380c7
2 changed files with 11 additions and 5 deletions

View File

@ -27,9 +27,9 @@ layout: doc_page
A local repostiry that Maven will use to put downloaded files. Then pull-deps will lay these files out into the extensions directory as needed.
`-r` or `--remoteRepositories`
`-r` or `--remoteRepository`
A JSON Array list of remote repositories to load dependencies from.
Add a remote repository to the default remote repository list, which includes https://repo1.maven.org/maven2/ and https://metamx.artifactoryonline.com/metamx/pub-libs-releases-local
`-d` or `--defaultVersion`

View File

@ -106,11 +106,11 @@ public class PullDependencies implements Runnable
public String localRepository = String.format("%s/%s", System.getProperty("user.home"), ".m2/repository");
@Option(
name = {"-r", "--remoteRepositories"},
title = "A JSON Array list of remote repositories to load dependencies from.",
name = {"-r", "--remoteRepository"},
title = "Add a remote repository to the default remote repository list, which includes https://repo1.maven.org/maven2/ and https://metamx.artifactoryonline.com/metamx/pub-libs-releases-local",
required = false
)
List<String> remoteRepositories = ImmutableList.of(
List<String> remoteRepositories = Lists.newArrayList(
"https://repo1.maven.org/maven2/",
"https://metamx.artifactoryonline.com/metamx/pub-libs-releases-local"
);
@ -157,6 +157,12 @@ public class PullDependencies implements Runnable
createRootExtensionsDirectory(extensionsDir);
createRootExtensionsDirectory(hadoopDependenciesDir);
log.info(
"Start pull-deps with local repository [%s] and remote repositories [%s]",
localRepository,
remoteRepositories
);
try {
log.info("Start downloading dependencies for extension coordinates: [%s]", coordinates);
for (final String coordinate : coordinates) {