From 7673f4e000757a72f5da72ba05174ac982f4da8a Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Thu, 13 Sep 2007 21:42:57 +0000 Subject: * moved most of the classes in the org.apache.qpidity package to org.apache.qpidity.transport * factored out the network specific pieces into org.apache.qpidity.transport * moved the mina specific code to org.apache.qpidity.transport.network.mina * replaced the handler chain with Sender/Receiver chains that can deal with close request/closed notifications * moved from an anonymous struct[] to a real Header class * removed an excess copy from message data transmit git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@575474 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/qpid/plugins/JythonMojo.java | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'qpid/java/plugins') diff --git a/qpid/java/plugins/src/main/java/org/apache/qpid/plugins/JythonMojo.java b/qpid/java/plugins/src/main/java/org/apache/qpid/plugins/JythonMojo.java index 1788f471d7..50af9c257e 100644 --- a/qpid/java/plugins/src/main/java/org/apache/qpid/plugins/JythonMojo.java +++ b/qpid/java/plugins/src/main/java/org/apache/qpid/plugins/JythonMojo.java @@ -21,6 +21,7 @@ package org.apache.qpid.plugins; import java.io.File; +import java.io.IOException; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; @@ -46,9 +47,44 @@ public class JythonMojo extends AbstractMojo */ private String[] params = new String[0]; + /** + * Source file. + * + * @parameter + */ + private File source; + + /** + * Optional timestamp. + * + * @parameter + */ + private File timestamp; + public void execute() throws MojoExecutionException { + if (source != null && timestamp != null) + { + if (timestamp.lastModified() > source.lastModified()) + { + return; + } + } + jython.main(params); + + if (timestamp != null) + { + try + { + timestamp.createNewFile(); + } + catch (IOException e) + { + throw new MojoExecutionException("cannot create timestamp", e); + } + timestamp.setLastModified(System.currentTimeMillis()); + } } } -- cgit v1.2.1