All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.saumya.mojo.gem.IrbMojo Maven / Gradle / Ivy

There is a newer version: 2.0.1
Show newest version
package de.saumya.mojo.gem;

import java.io.IOException;

import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;

import de.saumya.mojo.ruby.script.ScriptException;

/**
 * maven wrpper around IRB.
 * 
 * @goal irb
 * @requiresDependencyResolution test
 */
public class IrbMojo extends AbstractGemMojo {

    /**
     * arguments for the irb command.
     * 
* Command line -Dirb.args=... * * @parameter expression="${irb.args}" */ protected String irbArgs = null; /** * launch IRB in a swing window. * * @parameter default-value="false" expression="${irb.swing}" *
* Command line -Dirb.swing=... */ protected boolean swing; @Override public void execute() throws MojoExecutionException, MojoFailureException { // make sure the whole things run in the same process super.jrubyFork = false; // this.includeOpenSSL = false; super.execute(); } @Override public void executeWithGems() throws MojoExecutionException, ScriptException, IOException { this.factory.newScriptFromJRubyJar(this.swing ? "jirb_swing" : "jirb") .addArgs(this.irbArgs) .addArgs(this.args) .execute(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy