private void generatePom(File file, String type) throws ScriptException, IOException { this.tmpPom.getParentFile().mkdirs(); URL url = Thread.currentThread().getContextClassLoader().getResource("maven/tools/pom.rb"); this.factory.newScript("$LOAD_PATH << '" + url.toString().replace("maven/tools/pom.rb", "")+"';" + "require 'maven/tools/pom';" + "puts Maven::Tools::POM.new('" + file.getAbsolutePath() + "').to_s") .execute(tmpPom); }
private void generatePom(File file, String type) throws ScriptException, IOException { this.tmpPom.getParentFile().mkdirs(); URL url = Thread.currentThread().getContextClassLoader().getResource("maven/tools/pom.rb"); this.factory.newScript("$LOAD_PATH << '" + url.toString().replace("maven/tools/pom.rb", "")+"';" + "require 'maven/tools/pom';" + "puts Maven::Tools::POM.new('" + file.getAbsolutePath() + "').to_s") .execute(tmpPom); }
private void processNestedDiretories(DirectoryScanner scanner) throws IOException, ScriptException { String[] directories = scanner.getIncludedDirectories(); if (directories.length > 0) { StringBuilder script = new StringBuilder("require 'jruby/commands';"); for( String dir: directories) { if (!dir.contains("/")) { script.append("JRuby::Commands.generate_dir_info('" + new File( project.getBuild().getOutputDirectory(), dir ).getAbsolutePath() + "', false) if JRuby::Commands.respond_to? :generate_dir_info;" ); } } Script s = this.factory.newScript(script.toString()); s.execute(); } }
private void processNestedDiretories(DirectoryScanner scanner) throws IOException, ScriptException { String[] directories = scanner.getIncludedDirectories(); if (directories.length > 0) { StringBuilder script = new StringBuilder("require 'jruby/commands';"); for( String dir: directories) { if (!dir.contains("/")) { script.append("JRuby::Commands.generate_dir_info('" + new File( project.getBuild().getOutputDirectory(), dir ).getAbsolutePath() + "', false) if JRuby::Commands.respond_to? :generate_dir_info;" ); } } Script s = this.factory.newScript(script.toString()); s.execute(); } }
public void createPom(final File gemspec, final String jrubyMavenPluginsVersion, final File pom) throws ScriptException, IOException { this.factory.newScriptFromResource("gem2pom.rb") .addArg(gemspec.getAbsolutePath()) .addArg(jrubyMavenPluginsVersion) .execute(pom); }
@Override public void executeWithGems() throws MojoExecutionException, ScriptException, IOException { this.factory.newScriptFromJRubyJar(this.swing ? "jirb_swing" : "jirb") .addArgs(this.irbArgs) .addArgs(this.args) .execute(); } }
@Override public void executeWithGems() throws MojoExecutionException, ScriptException, IOException { getLog().warn( "DEPRECATED: just do not use that anymore. use gem:exec instead" ); this.factory.newScriptFromJRubyJar("gem") .addArgs(this.gemArgs) .addArgs(this.args) .execute(); } }
@Override public void executeWithGems() throws MojoExecutionException, ScriptException, IOException { this.factory.newScriptFromJRubyJar(this.swing ? "jirb_swing" : "jirb") .addArgs(this.irbArgs) .addArgs(this.args) .execute(); } }
@Override public void executeWithGems() throws MojoExecutionException, ScriptException, IOException { getLog().warn( "DEPRECATED: just do not use that anymore. use gem:exec instead" ); this.factory.newScriptFromJRubyJar("gem") .addArgs(this.gemArgs) .addArgs(this.args) .execute(); } }
public void updateMetadata(final List<String> remoteRepositoryIds, final String localRepositoryBasedir) throws ScriptException, IOException { for (final String id : remoteRepositoryIds) { if (id.startsWith("rubygems")) { this.log.info("updating metadata for " + id); this.factory.newScriptFromResource("update_metadata.rb") .addArg(id) .addArg(localRepositoryBasedir) .execute(); } } } }
protected final void cli(Iterable<String> args) throws IOException, ScriptException { factory.addEnv("VAGRANT_HOME", vagrantHome); factory.addEnv("VAGRANT_RC", vagrantRc); final Script script = factory.newScriptFromSearchPath("vagrant"); for (String arg : args) if (isNotBlank(arg)) script.addArg(arg); script.execute(); } }
.addArgs(this.installArgs) .addArgs(this.args) .execute();
.addArgs(this.installArgs) .addArgs(this.args) .execute();