summaryrefslogtreecommitdiff
path: root/java/plugins
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2009-12-26 12:42:57 +0000
committerRafael H. Schloming <rhs@apache.org>2009-12-26 12:42:57 +0000
commit248f1fe188fe2307b9dcf2c87a83b653eaa1920c (patch)
treed5d0959a70218946ff72e107a6c106e32479a398 /java/plugins
parent3c83a0e3ec7cf4dc23e83a340b25f5fc1676f937 (diff)
downloadqpid-python-248f1fe188fe2307b9dcf2c87a83b653eaa1920c.tar.gz
synchronized with trunk except for ruby dir
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qpid.rnr@893970 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/plugins')
-rw-r--r--java/plugins/pom.xml34
-rw-r--r--java/plugins/src/main/java/org/apache/qpid/plugins/JythonMojo.java100
2 files changed, 0 insertions, 134 deletions
diff --git a/java/plugins/pom.xml b/java/plugins/pom.xml
deleted file mode 100644
index 161656471f..0000000000
--- a/java/plugins/pom.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<project>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.qpid</groupId>
- <artifactId>jython-plugin</artifactId>
- <packaging>maven-plugin</packaging>
- <version>1.0-incubating-M3-SNAPSHOT</version>
- <name>Jython Launcher</name>
-
- <parent>
- <groupId>org.apache.qpid</groupId>
- <artifactId>qpid</artifactId>
- <version>1.0-incubating-M3-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <properties>
- <!-- This is an assembly/distribution pom so no test code exists -->
- <maven.test.skip>true</maven.test.skip>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-api</artifactId>
- <version>2.0</version>
- </dependency>
-
- <dependency>
- <groupId>org.python</groupId>
- <artifactId>jython</artifactId>
- <version>2.2-rc1</version>
- </dependency>
- </dependencies>
-</project>
diff --git a/java/plugins/src/main/java/org/apache/qpid/plugins/JythonMojo.java b/java/plugins/src/main/java/org/apache/qpid/plugins/JythonMojo.java
deleted file mode 100644
index 85dffeb4bf..0000000000
--- a/java/plugins/src/main/java/org/apache/qpid/plugins/JythonMojo.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-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;
-
-import org.python.util.jython;
-
-
-/**
- * JythonMojo
- *
- * @author Rafael H. Schloming
- *
- * @goal jython
- */
-
-public class JythonMojo extends AbstractMojo
-{
-
- /**
- * Arguments to jython.
- *
- * @parameter
- */
- private String[] params = new String[0];
-
- /**
- * Source file.
- *
- * @parameter
- */
- private File[] sources;
-
- /**
- * Optional timestamp.
- *
- * @parameter
- */
- private File timestamp;
-
- public void execute() throws MojoExecutionException
- {
- boolean stale = true;
-
- if (sources != null && sources.length > 0 && timestamp != null)
- {
- stale = false;
- for (File source : sources)
- {
- if (source.lastModified() > timestamp.lastModified())
- {
- stale = true;
- break;
- }
- }
- }
-
- if (stale)
- {
- jython.main(params);
-
- if (timestamp != null)
- {
- try
- {
- timestamp.createNewFile();
- }
- catch (IOException e)
- {
- throw new MojoExecutionException("cannot create timestamp", e);
- }
- timestamp.setLastModified(System.currentTimeMillis());
- }
- }
- }
-
-}