Package org.springframework.boot.cli.command.options

Examples of org.springframework.boot.cli.command.options.SourceOptions


  private static final class GrabOptionHandler extends CompilerOptionHandler {

    @Override
    protected ExitStatus run(OptionSet options) throws Exception {
      SourceOptions sourceOptions = new SourceOptions(options);

      List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
          .createDefaultRepositoryConfiguration();

      GroovyCompilerConfiguration configuration = new OptionSetGroovyCompilerConfiguration(
          options, this, repositoryConfiguration);

      if (System.getProperty("grape.root") == null) {
        System.setProperty("grape.root", ".");
      }

      GroovyCompiler groovyCompiler = new GroovyCompiler(configuration);
      groovyCompiler.compile(sourceOptions.getSourcesArray());
      return ExitStatus.OK;
    }
View Full Code Here


    private TestRunner runner;

    @Override
    protected ExitStatus run(OptionSet options) throws Exception {
      SourceOptions sourceOptions = new SourceOptions(options);
      TestRunnerConfiguration configuration = new TestRunnerConfigurationAdapter(
          options, this);
      this.runner = new TestRunner(configuration, sourceOptions.getSourcesArray(),
          sourceOptions.getArgsArray());
      this.runner.compileAndRunTests();
      return ExitStatus.OK.hangup();
    }
View Full Code Here

      if (this.runner != null) {
        throw new RuntimeException(
            "Already running. Please stop the current application before running another (use the 'stop' command).");
      }

      SourceOptions sourceOptions = new SourceOptions(options);

      List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
          .createDefaultRepositoryConfiguration();
      repositoryConfiguration.add(0, new RepositoryConfiguration("local", new File(
          "repository").toURI(), true));

      SpringApplicationRunnerConfiguration configuration = new SpringApplicationRunnerConfigurationAdapter(
          options, this, repositoryConfiguration);

      this.runner = new SpringApplicationRunner(configuration,
          sourceOptions.getSourcesArray(), sourceOptions.getArgsArray());
      this.runner.compileAndRun();

      return ExitStatus.OK;
    }
View Full Code Here

      List<URL> classpath = getClassPathUrls(compiler);
      List<MatchedResource> classpathEntries = findMatchingClasspathEntries(
          classpath, options);

      String[] sources = new SourceOptions(nonOptionArguments).getSourcesArray();
      Class<?>[] compiledClasses = compiler.compile(sources);

      List<URL> dependencies = getClassPathUrls(compiler);
      dependencies.removeAll(classpath);
View Full Code Here

TOP

Related Classes of org.springframework.boot.cli.command.options.SourceOptions

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.