]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - maven/maven-argeo-qooxdoo-plugin/src/main/java/org/argeo/slc/maven/plugins/qooxdoo/GenerateMojo.java
Move to trash
[gpl/argeo-slc.git] / maven / maven-argeo-qooxdoo-plugin / src / main / java / org / argeo / slc / maven / plugins / qooxdoo / GenerateMojo.java
index 27f9f6dd99b62455a68be1ad0425a8632b4f42cc..9c581df5734382d88b1b796727917f1b6868d687 100644 (file)
@@ -2,7 +2,6 @@ package org.argeo.slc.maven.plugins.qooxdoo;
 
 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;
@@ -16,7 +15,7 @@ import org.codehaus.plexus.util.cli.StreamConsumer;
  * 
  * @goal generate
  */
-public class GenerateMojo extends AbstractMojo {
+public class GenerateMojo extends AbstractQooxdooMojo {
        /**
         * The Qooxdoo build target.
         * 
@@ -25,34 +24,10 @@ public class GenerateMojo extends AbstractMojo {
         */
        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 + " ...");
 
@@ -79,7 +54,7 @@ public class GenerateMojo extends AbstractMojo {
 
                } catch (Exception e) {
                        throw new MojoExecutionException(
-                                       "Unexpected exception when running Jython", e);
+                                       "Unexpected exception when running Python", e);
                }
 
        }