+ // jython.main(args);
+
+ Commandline cl = new Commandline();
+
+ if (File.separatorChar == '\\') {// win
+ File pythonBase = new File(buildDirectory, "python-win32")
+ .getCanonicalFile();
+ cl.setExecutable(pythonBase.getPath() + File.separator
+ + "python");
+ } else
+ cl.setExecutable("python");
+ cl.setWorkingDirectory(baseDir.getCanonicalPath());
+ cl.createArgument().setValue(generateScript.getCanonicalPath());
+ cl.createArgument().setValue(job);
+
+ StreamConsumer stdout = new StdoutConsumer(getLog());
+ StreamConsumer stderr = new StderrConsumer(getLog());
+ try {
+ int result = CommandLineUtils.executeCommandLine(cl, stdout,
+ stderr);
+ if (result != 0) {
+ throw new MojoExecutionException("Qooxdoo job returned: \'"
+ + result + "\'.");
+ }
+ } catch (CommandLineException e) {
+ throw new MojoExecutionException("Unable to run Qooxdoo job", e);
+ }