]>
git.argeo.org Git - gpl/argeo-slc.git/blob - maven/maven-argeo-qooxdoo-plugin/src/main/java/org/argeo/slc/maven/plugins/qooxdoo/GenerateMojo.java
e0c331472a114aa5bb198d70213df53552dc33b1
1 package org
.argeo
.slc
.maven
.plugins
.qooxdoo
;
5 import org
.apache
.maven
.plugin
.AbstractMojo
;
6 import org
.apache
.maven
.plugin
.MojoExecutionException
;
7 import org
.apache
.maven
.plugin
.MojoFailureException
;
8 import org
.python
.util
.jython
;
11 * Calls Qooxdoo python tool chain
14 * @execute lifecycle="env" phase="initialize"
16 public class GenerateMojo
extends AbstractMojo
{
18 * The Qooxdoo build target.
20 * @parameter expression="${jobs}"
26 * The build directory.
28 * @parameter expression="${project.build.directory}"
31 private File buildDirectory
;
34 * The directory for the pom
36 * @parameter expression="${basedir}"
41 public void execute() throws MojoExecutionException
, MojoFailureException
{
43 File jythonBase
= new File(buildDirectory
, "jython");
45 System
.setProperty("python.home", jythonBase
.getCanonicalPath());
47 File generateScript
= new File(baseDir
, "generate.py");
48 // String[] jobArray = jobs.split(" ");
49 // String[] args = new String[jobArray.length + 1];
50 // args[0] = generateScript.getCanonicalPath();
51 // System.arraycopy(jobArray, 0, args, 1, jobArray.length);
52 String
[] args
= { generateScript
.getCanonicalPath(), job
};
53 getLog().info("Running Qooxdoo job: " + job
+ " ...");
55 getLog().info("Finished Qooxdoo job: " + job
);
56 } catch (Exception e
) {
57 throw new MojoExecutionException(
58 "Unexpected exception when running Jython", e
);