package org.mirah.maven;

import org.apache.maven.plugin.CompilationFailureException;
import org.apache.maven.plugin.MojoExecutionException;

/**
 * Compiles Mirah source files
 *
 * @goal generate-sources
 * @phase generate-sources
 * @threadSafe
 * @requiresDependencyResolution compile
 */
public class MirahSourcesMojo extends AbstractMirahMojo {
    public void execute() throws MojoExecutionException, CompilationFailureException {
        String javaSourceRoot = compileSourceRoots.get(0);
        executeMirahCompiler(javaSourceRoot, false);
    }
}

@@ -344,16 +344,185 @@
 hMojo %7B%0A
+    /**%0A     * @parameter default-value=%22$%7Bproject.build.directory%7D/generated-sources/mirah%22%0A     * @required%0A     * @readonly%0A     */%0A    private String generatedSrc;%0A%0A
     publ
@@ -611,32 +611,8 @@
     
- String javaSourceRoot =
  com
@@ -631,13 +631,24 @@
 ots.
-get(0
+add(generatedSrc
 );%0A 
@@ -679,22 +679,20 @@
 ler(
-javaSourceRoot
+generatedSrc
 , fa

put generated java files under target instead