From a8fa58e5852e43669e31c3c56e37c6bdb5c63276 Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Wed, 1 Aug 2007 04:52:09 +0000 Subject: switched common generate script over to jython git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@561657 13f79535-47bb-0310-9956-ffa450edef68 --- java/plugins/pom.xml | 29 ++++++++++++ .../java/org/apache/qpid/plugins/JythonMojo.java | 54 ++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 java/plugins/pom.xml create mode 100644 java/plugins/src/main/java/org/apache/qpid/plugins/JythonMojo.java (limited to 'java/plugins') diff --git a/java/plugins/pom.xml b/java/plugins/pom.xml new file mode 100644 index 0000000000..f913f0b2c3 --- /dev/null +++ b/java/plugins/pom.xml @@ -0,0 +1,29 @@ + + 4.0.0 + org.apache.qpid + jython-plugin + maven-plugin + 1.0-incubating-M2-SNAPSHOT + Jython Launcher + + + org.apache.qpid + qpid + 1.0-incubating-M2-SNAPSHOT + ../pom.xml + + + + + org.apache.maven + maven-plugin-api + 2.0 + + + + org.python + jython + 2.2-rc1 + + + 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 new file mode 100644 index 0000000000..1788f471d7 --- /dev/null +++ b/java/plugins/src/main/java/org/apache/qpid/plugins/JythonMojo.java @@ -0,0 +1,54 @@ +/* + * + * 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 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]; + + public void execute() throws MojoExecutionException + { + jython.main(params); + } + +} -- cgit v1.2.1