@@ -0,0 +1,1036 @@
+package de.saumya.mojo.gem;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0A%0Aimport org.apache.maven.plugin.MojoExecutionException;%0A%0Aimport de.saumya.mojo.ruby.script.ScriptException;%0A%0A/**%0A * the mojo allows to embed a plugin inside a Gemfile (from bundler) and execute%0A * it during the specified phase. this primary meant for the Gemfile DSL%0A * extension for polyglot maven which can use a Gemfile as POM.%0A * %0A * @goal gemfile%0A */%0Apublic class GemfileMojo extends AbstractGemMojo %7B%0A%0A    /** @parameter expression=%22$%7Bgem.file%7D%22 default-value=%22Gemfile%22 */%0A    protected File   gemFile = null;%0A%0A    /** @parameter default-value=%22$%7Bgem.phase%7D%22 */%0A    protected String phase   = null;%0A%0A    @Override%0A    public void executeWithGems() throws MojoExecutionException,%0A            ScriptException, IOException %7B%0A        this.factory.newScriptFromResource(%22maven/tools/gemfile_execute_phase.rb%22)%0A                .addArg(this.gemFile.getAbsolutePath())%0A                .addArg(this.phase)%0A                .executeIn(launchDirectory());%0A    %7D%0A%7D%0A

allow to embed code inside a Gemfile which will be excuted during the specified phase