summaryrefslogtreecommitdiff
path: root/java/common
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2007-08-01 04:52:09 +0000
committerRafael H. Schloming <rhs@apache.org>2007-08-01 04:52:09 +0000
commita8fa58e5852e43669e31c3c56e37c6bdb5c63276 (patch)
tree74d31369879fbd4012a15895c5755aa793d54cfd /java/common
parentd1a5a79afe0859556890e0d5784d9663440d39f9 (diff)
downloadqpid-python-a8fa58e5852e43669e31c3c56e37c6bdb5c63276.tar.gz
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
Diffstat (limited to 'java/common')
-rwxr-xr-xjava/common/generate6
-rw-r--r--java/common/pom.xml33
2 files changed, 30 insertions, 9 deletions
diff --git a/java/common/generate b/java/common/generate
index 87ddf53868..d9ea47aeca 100755
--- a/java/common/generate
+++ b/java/common/generate
@@ -2,13 +2,9 @@
# Interim code generation script.
-import sys, os
+import sys, os, mllib
from cStringIO import StringIO
-sys.path.append("../../python")
-
-import mllib
-
out_dir=sys.argv[1]
out_pkg = sys.argv[2]
spec_file = sys.argv[3]
diff --git a/java/common/pom.xml b/java/common/pom.xml
index 792a7f38f4..69a68461c0 100644
--- a/java/common/pom.xml
+++ b/java/common/pom.xml
@@ -41,11 +41,12 @@
<generated.package>org/apache/qpid/framing</generated.package>
<generated.dir>${generated.path}/${generated.package}</generated.dir>
<generated.timestamp>${generated.dir}/timestamp</generated.timestamp>
- <specs.dir>${topDirectoryLocation}/../specs</specs.dir>
+ <specs.dir>${basedir}/../../specs</specs.dir>
+ <mllib.dir>${basedir}/../../python</mllib.dir>
</properties>
<build>
- <plugins>
+ <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
@@ -57,12 +58,12 @@
<tasks>
<echo>"${generated.path}"</echo>
<ant antfile="protocol-version.xml" />
- <exec executable="python">
+<!-- <exec executable="python">
<arg line="generate"/>
<arg line="${generated.path}"/>
<arg line="org.apache.qpidity"/>
<arg line="${specs.dir}/amqp-transitional.0-10.xml"/>
- </exec>
+ </exec> -->
</tasks>
<sourceRoot>${generated.path}</sourceRoot>
</configuration>
@@ -73,6 +74,30 @@
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>jython-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jython</id>
+ <phase>generate-sources</phase>
+ <configuration>
+ <params>
+ <param>-Dpython.cachedir.skip=true</param>
+ <param>-Dpython.path=${basedir}/jython-lib.jar/Lib:${mllib.dir}</param>
+ <param>${basedir}/generate</param>
+ <param>${generated.path}</param>
+ <param>org.apache.qpidity</param>
+ <param>${specs.dir}/amqp-transitional.0-10.xml</param>
+ </params>
+ </configuration>
+ <goals>
+ <goal>jython</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
<!-- Backports the module to Java 1.4. This is done during the packaging phase as a transformation of the Jar. -->
<plugin>
<groupId>org.codehaus.mojo</groupId>