Commit a010de95 authored by Andy Wilkinson's avatar Andy Wilkinson

Reinstate ./repository as a "remote" repository

The grab command downloads the dependencies of one or more Groovy
scripts to ./repository. This commit ensures that those previously
downloaded dependencies can be used by a subsequent invocation of the
run command.

The location and behaviour of the local cache is unaffected by this
change. If the dependencies in ./repository do not exist in the local
cache, Aether will "download" them from ./repository and store them in
the local cache.

Fixes #191
parent a58e4cbb
......@@ -17,6 +17,7 @@
package org.springframework.boot.cli.command;
import java.awt.Desktop;
import java.io.File;
import java.util.List;
import java.util.logging.Level;
......@@ -35,9 +36,10 @@ import static java.util.Arrays.asList;
/**
* {@link Command} to 'run' a groovy script or scripts.
*
*
* @author Phillip Webb
* @author Dave Syer
* @author Andy Wilkinson
* @see SpringApplicationRunner
*/
public class RunCommand extends OptionParsingCommand {
......@@ -101,6 +103,8 @@ public class RunCommand extends OptionParsingCommand {
List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
.createDefaultRepositoryConfiguration();
repositoryConfiguration.add(0, new RepositoryConfiguration("local", new File(
"repository").toURI(), true));
SpringApplicationRunnerConfiguration configuration = new SpringApplicationRunnerConfigurationAdapter(
options, this, repositoryConfiguration);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment