]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - maven-argeo-qooxdoo-plugin/src/main/java/org/argeo/slc/maven/plugins/qooxdoo/GenerateMojo.java
Don't use python win32 package
[gpl/argeo-slc.git] / maven-argeo-qooxdoo-plugin / src / main / java / org / argeo / slc / maven / plugins / qooxdoo / GenerateMojo.java
index ec695a56b21301ccf08b877f71f98882a0d33fe6..27f9f6dd99b62455a68be1ad0425a8632b4f42cc 100644 (file)
@@ -15,7 +15,6 @@ import org.codehaus.plexus.util.cli.StreamConsumer;
  * Calls Qooxdoo python tool chain
  * 
  * @goal generate
- * @execute goal="env"
  */
 public class GenerateMojo extends AbstractMojo {
        /**
@@ -26,6 +25,14 @@ 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.
         * 
@@ -44,21 +51,14 @@ public class GenerateMojo extends AbstractMojo {
 
        public void execute() throws MojoExecutionException, MojoFailureException {
                try {
-                       // File jythonBase = new File(buildDirectory, "jython");
-                       // jythonBase.mkdirs();
-                       // System.setProperty("python.home", jythonBase.getCanonicalPath());
-
-                       File generateScript = new File(baseDir, "generate.py");
-                       // String[] jobArray = jobs.split(" ");
-                       // String[] args = new String[jobArray.length + 1];
-                       // args[0] = generateScript.getCanonicalPath();
-                       // System.arraycopy(jobArray, 0, args, 1, jobArray.length);
-                       String[] args = { "generate.py", job };
+                       File generateScript = new File(baseDir.getPath() + File.separator
+                                       + qooxdooSdk + File.separator + "tool" + File.separator
+                                       + "bin", "generator.py");
                        getLog().info("Running Qooxdoo job: " + job + " ...");
-                       // jython.main(args);
 
                        Commandline cl = new Commandline();
-                       cl.setExecutable("python");
+
+                       cl.setExecutable("python");// python needs to be installed
                        cl.setWorkingDirectory(baseDir.getCanonicalPath());
                        cl.createArgument().setValue(generateScript.getCanonicalPath());
                        cl.createArgument().setValue(job);