Browse Source

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
pull/208/head
Andy Wilkinson 12 years ago
parent
commit
a010de955d
  1. 6
      spring-boot-cli/src/main/java/org/springframework/boot/cli/command/RunCommand.java

6
spring-boot-cli/src/main/java/org/springframework/boot/cli/command/RunCommand.java

@ -17,6 +17,7 @@ @@ -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; @@ -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 { @@ -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);

Loading…
Cancel
Save