public void execute()
            throws MojoExecutionException, MojoFailureException {
        if (workingDirectory == null) {
            try {
                BSFManager.registerScriptingEngine("ruby", JRubyEngine.class.getName(), new String[]{"rb"});
                BSFManager rubyManager = new BSFManager();
                rubyManager.exec("ruby", script.getAbsolutePath(), -1, -1,
                                 IOUtils.toString(new FileReader(script)));
            } catch (IOException ex) {
                throw new MojoExecutionException(ex.getMessage(), ex);
            } catch (BSFException ex) {
                throw new MojoExecutionException(ex.getMessage(), ex);
            }
        } else {
            getLog().warn(
                    "workingDirectory is set, we need to fork another JVM process to change the ruby code execution working directory");
            forkJavaVM(new String[]{
                        "-cp",
                        getClasspath(),
                        RubyExecMain.class.getName(),
                        script.getAbsolutePath()
                    });
        }
    }