Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package de.saumya.mojo.rails3;
 
 
 
goal to run the rails database console

Goal:
dbconsole
RequiresDependencyResolution:
compile
public class DbConsoleMojo extends AbstractRailsMojo {

    
arguments for the database console command

Parameter:
default-value="${dbconsole.args}"
    protected String dbconsoleArgs = null;
    @Override
    public void execute() throws MojoExecutionException {
        if (getJrubyVersion().toString().compareTo("1.5.0") < 0) {
            throw new MojoExecutionException("does not work with jruby version < 1.5.0");
        }
        // make sure the whole things run in the same process
        this. = false;
    }
    @Override
    public void executeRails() throws MojoExecutionException,
            ScriptExceptionIOException {
        getLog().warn"DEPRECATED: just do not use that anymore. use gem:exec or bundler:exec instead" );
        this..newScript(railsScriptFile())
                .addArg("dbconsole")
                .addArgs(this.)
                .addArgs(this.)
                .addArg(this.)
                .executeIn(launchDirectory());
    }
New to GrepCode? Check out our FAQ X