Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package de.saumya.mojo.rails3;
 
 
 import  org.apache.maven.plugin.MojoExecutionException;
 
 import  de.saumya.mojo.ruby.RubyScriptException;

goal to run a generator

Goal:
generate
RequiresDependencyResolution:
test
public class GenerateMojo extends AbstractRailsMojo {

    
arguments for the generate command

Parameter:
default-value="${generate.args}"
    protected String generateArgs = null;

    
the name of the generator

Parameter:
default-value="${generator}"
    protected String generator    = null;
    @Override
    protected void executeRails() throws MojoExecutionException,
            RubyScriptException, IOException {
        this..newScript(railsScriptFile())
                .addArg("generate")
                .addArg(this.)
                .addArgs(this.)
                .addArgs(this.)
                .executeIn(launchDirectory());
    }
New to GrepCode? Check out our FAQ X