import java.io.File;
-import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugin.logging.Log;
*
* @goal generate
*/
-public class GenerateMojo extends AbstractMojo {
+public class GenerateMojo extends AbstractQooxdooMojo {
/**
* The Qooxdoo build target.
*
*/
private String job;
- /**
- * Location of the qooxdoo sdk.
- *
- * @parameter expression="${qooxdooSdk}"
- */
- private String qooxdooSdk = "src" + File.separator + "main"
- + File.separator + "webapp" + File.separator + "qooxdoo-0.8-sdk";
-
- /**
- * The build directory.
- *
- * @parameter expression="${project.build.directory}"
- * @required
- */
- private File buildDirectory;
-
- /**
- * The directory for the pom
- *
- * @parameter expression="${basedir}"
- * @required
- */
- private File baseDir;
-
public void execute() throws MojoExecutionException, MojoFailureException {
try {
- File generateScript = new File(baseDir.getPath() + File.separator
- + qooxdooSdk + File.separator + "tool" + File.separator
+ File generateScript = new File(srcBase+ File.separator
+ + sdkDirName + File.separator + "tool" + File.separator
+ "bin", "generator.py");
getLog().info("Running Qooxdoo job: " + job + " ...");
} catch (Exception e) {
throw new MojoExecutionException(
- "Unexpected exception when running Jython", e);
+ "Unexpected exception when running Python", e);
}
}