summaryrefslogtreecommitdiff
path: root/qpid/java/plugins
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2007-09-13 21:42:57 +0000
committerRafael H. Schloming <rhs@apache.org>2007-09-13 21:42:57 +0000
commit7673f4e000757a72f5da72ba05174ac982f4da8a (patch)
tree6611d9e060f561781920c92dd8b39b7392fab10f /qpid/java/plugins
parenta722b446dd1bd1a1503cf52ce4a73f28eaf4a444 (diff)
downloadqpid-python-7673f4e000757a72f5da72ba05174ac982f4da8a.tar.gz
* 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
Diffstat (limited to 'qpid/java/plugins')
-rw-r--r--qpid/java/plugins/src/main/java/org/apache/qpid/plugins/JythonMojo.java36
1 files changed, 36 insertions, 0 deletions
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());
+ }
}
}