<classpathentry kind="src" path="src/main/java"/>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<project>\r
<modelVersion>4.0.0</modelVersion>\r
<groupId>org.argeo.slc.maven</groupId>\r
- <artifactId>maven-qooxdoo-plugin</artifactId>\r
+ <artifactId>maven-argeo-qooxdoo-plugin\r
+ </artifactId>\r
<version>0.8.0-SNAPSHOT</version>\r
<packaging>maven-plugin</packaging>\r
<name>Argeo Qooxdoo Plugin</name>\r
<plugin>\r
<artifactId>maven-compiler-plugin</artifactId>\r
<configuration>\r
- <source>1.4</source>\r
- <target>1.4</target>\r
+ <source>1.5</source>\r
+ <target>1.5</target>\r
</configuration>\r
</plugin>\r
- <plugin>\r
- <artifactId>maven-plugin-plugin</artifactId>\r
- <dependencies>\r
- <dependency>\r
- <groupId>org.apache.maven</groupId>\r
- <artifactId>maven-plugin-tools-ant\r
- </artifactId>\r
- <version>2.1</version>\r
- </dependency>\r
- </dependencies>\r
- </plugin>\r
</plugins>\r
</build>\r
<dependencies>\r
<artifactId>maven-plugin-api</artifactId>\r
<version>2.0</version>\r
</dependency>\r
- <dependency>\r
- <groupId>org.apache.maven</groupId>\r
- <artifactId>maven-script-ant</artifactId>\r
- <version>2.0.9</version>\r
- </dependency>\r
<dependency>\r
<groupId>org.apache.maven</groupId>\r
<artifactId>maven-project</artifactId>\r
<version>2.0.7</version>\r
</dependency>\r
<dependency>\r
- <groupId>ant-contrib</groupId>\r
- <artifactId>ant-contrib</artifactId>\r
- <version>1.0b2</version>\r
- <exclusions>\r
- <exclusion>\r
- <groupId>ant</groupId>\r
- <artifactId>ant</artifactId>\r
- </exclusion>\r
- </exclusions>\r
+ <groupId>org.argeo.dep.dist</groupId>\r
+ <artifactId>jython</artifactId>\r
+ <version>2.5.beta0</version>\r
+ <classifier>exec</classifier>\r
</dependency>\r
</dependencies>\r
<distributionManagement>\r
--- /dev/null
+package org.argeo.slc.maven.plugins.qooxdoo;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+
+/**
+ * Prepares Jython / Qooxdoo environment
+ *
+ * @goal env
+ * @execute lifecycle="env" phase="initialize"
+ */
+public class EnvironmentMojo extends AbstractMojo {
+
+ public void execute() throws MojoExecutionException, MojoFailureException {
+ getLog().info("Qooxdoo environment prepared");
+ }
+
+}
--- /dev/null
+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.python.util.jython;
+
+/**
+ * Calls Qooxdoo python tool chain
+ *
+ * @goal generate
+ * @execute lifecycle="env" phase="initialize"
+ */
+public class GenerateMojo extends AbstractMojo {
+ /**
+ * The Qooxdoo build target.
+ *
+ * @parameter expression="${jobs}"
+ * @required
+ */
+ private String job;
+
+ /**
+ * 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 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 = { generateScript.getCanonicalPath(), job };
+ getLog().info("Running Qooxdoo job: " + job + " ...");
+ jython.main(args);
+ getLog().info("Finished Qooxdoo job: " + job);
+ } catch (Exception e) {
+ throw new MojoExecutionException(
+ "Unexpected exception when running Jython", e);
+ }
+
+ }
+
+}
--- /dev/null
+<lifecycles>
+ <lifecycle>
+ <id>env</id>
+ <phases>
+ <phase>
+ <id>initialize</id>
+ <executions>
+ <execution>
+ <goals>
+ <goal>org.apache.maven.plugins:maven-dependency-plugin:unpack
+ </goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.argeo.dep.dist</groupId>
+ <artifactId>jython</artifactId>
+ <version>2.5.beta0</version>
+ <classifier>lib</classifier>
+ <type>zip</type>
+ <outputDirectory>${project.build.directory}/jython
+ </outputDirectory>
+ <overWrite>false</overWrite>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.argeo.dep.dist</groupId>
+ <artifactId>qooxdoo-sdk</artifactId>
+ <classifier>dist</classifier>
+ <version>0.8</version>
+ <type>zip</type>
+ <outputDirectory>${basedir}/src/main/webapp
+ </outputDirectory>
+ <overWrite>false</overWrite>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </phase>
+ </phases>
+ </lifecycle>
+</lifecycles>