public void execute()
            throws MojoExecutionException, MojoFailureException {
        if (workingDirectory == null) {
            try {
                BSFManager.registerScriptingEngine("ruby", JRubyEngine.class.getName(), new String[]{"rb"});
                final BSFManager rubyManager = new BSFManager();
                rubyManager.eval("ruby", "RubyMojo", 0, 0, ruby);
            } 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(),
                                    RubyRunMain.class.getName(),
                                    ruby
                                });
        }
    }