Examples of GroovyCompiler


Examples of com.netflix.zuul.groovy.GroovyCompiler

    }

    private void initGroovyFilterManager() {

        //TODO: pluggable filter initialzer
        FilterLoader.getInstance().setCompiler(new GroovyCompiler());

        final String scriptRoot = props.getFilterRoot();
        LOGGER.info("Using file system script: " + scriptRoot);

        try {
View Full Code Here

Examples of com.netflix.zuul.groovy.GroovyCompiler

    public void contextDestroyed(ServletContextEvent sce) {
        logger.info("stopping server");
    }

    private void initGroovyFilterManager() {
        FilterLoader.getInstance().setCompiler(new GroovyCompiler());

        String scriptRoot = System.getProperty("zuul.filter.root", "");
        if (scriptRoot.length() > 0) scriptRoot = scriptRoot + File.separator;
        try {
            FilterFileManager.setFilenameFilter(new GroovyFileFilter());
View Full Code Here

Examples of com.netflix.zuul.groovy.GroovyCompiler

        final String preFiltersPath = config.getString(ZUUL_FILTER_PRE_PATH);
        final String postFiltersPath = config.getString(ZUUL_FILTER_POST_PATH);
        final String routingFiltersPath = config.getString(ZUUL_FILTER_ROUTING_PATH);
        final String customPath = config.getString(ZUUL_FILTER_CUSTOM_PATH);

        FilterLoader.getInstance().setCompiler(new GroovyCompiler());
        FilterFileManager.setFilenameFilter(new GroovyFileFilter());
        if (customPath == null) {
            FilterFileManager.init(5, preFiltersPath, postFiltersPath, routingFiltersPath);
        } else {
            FilterFileManager.init(5, preFiltersPath, postFiltersPath, routingFiltersPath, customPath);
View Full Code Here

Examples of eu.mihosoft.vrl.lang.groovy.GroovyCompiler

    public final void initShell(VisualCanvas canvas) {

        shellView.quit();

        shell.init(canvas.getClassLoader());
        GroovyCompiler compiler = new GroovyCompiler();
        shell.addImports(compiler.getImports());
        shell.addImport("import eu.mihosoft.vrl.user.*;");
        shellInput.clear();
        shell.addConstant("canvas", canvas);
        shell.addConstant("inspector", canvas.getInspector());
        shell.addConstant("classloader", canvas.getClassLoader());
View Full Code Here

Examples of org.springframework.boot.cli.compiler.GroovyCompiler

      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

Examples of org.springframework.boot.cli.compiler.GroovyCompiler

   * @param args
   */
  public TestRunner(TestRunnerConfiguration configuration, String[] sources,
      String[] args) {
    this.sources = sources.clone();
    this.compiler = new GroovyCompiler(configuration);
  }
View Full Code Here

Examples of org.springframework.boot.cli.compiler.GroovyCompiler

  }

  @Override
  public List<File> resolve(List<String> artifactIdentifiers)
      throws CompilationFailedException, IOException {
    GroovyCompiler groovyCompiler = new GroovyCompiler(this.configuration);
    List<File> artifactFiles = new ArrayList<File>();
    if (!artifactIdentifiers.isEmpty()) {
      List<URL> initialUrls = getClassPathUrls(groovyCompiler);
      groovyCompiler.compile(createSources(artifactIdentifiers));
      List<URL> artifactUrls = getClassPathUrls(groovyCompiler);
      artifactUrls.removeAll(initialUrls);
      for (URL artifactUrl : artifactUrls) {
        artifactFiles.add(toFile(artifactUrl));
      }
View Full Code Here

Examples of org.springframework.boot.cli.compiler.GroovyCompiler

      final SpringApplicationRunnerConfiguration configuration, String[] sources,
      String... args) {
    this.configuration = configuration;
    this.sources = sources.clone();
    this.args = args.clone();
    this.compiler = new GroovyCompiler(configuration);
    int level = configuration.getLogLevel().intValue();
    if (level <= Level.FINER.intValue()) {
      System.setProperty("groovy.grape.report.downloads", "true");
      System.setProperty("trace", "true");
    }
View Full Code Here

Examples of org.springframework.boot.cli.compiler.GroovyCompiler

      File output = new File((String) nonOptionArguments.remove(0));
      Assert.isTrue(output.getName().toLowerCase().endsWith(".jar"), "The output '"
          + output + "' is not a JAR file.");
      deleteIfExists(output);

      GroovyCompiler compiler = createCompiler(options);

      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);

      writeJar(output, compiledClasses, classpathEntries, dependencies);
View Full Code Here

Examples of org.springframework.boot.cli.compiler.GroovyCompiler

    private GroovyCompiler createCompiler(OptionSet options) {
      List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
          .createDefaultRepositoryConfiguration();
      GroovyCompilerConfiguration configuration = new OptionSetGroovyCompilerConfiguration(
          options, this, repositoryConfiguration);
      GroovyCompiler groovyCompiler = new GroovyCompiler(configuration);
      groovyCompiler.getAstTransformations().add(0, new GrabAnnotationTransform());
      return groovyCompiler;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.