From: | ch at lathspell(dot)de (Christian Hammers) |
---|---|
To: | |
Subject: | [Pljava-dev] Building pljava.so with maven-nar-plugin? |
Date: | 2013-02-06 01:31:02 |
Message-ID: | 20130206023102.1b94cc01@james.intern |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pljava-dev |
Hello
I played around with the maven-nar-plugin that was recommended on this
list. The below pom.xml does produce .h files from the java classes and
also compiles the C files. What's missing though is a way to get a
.h from "java.sql.Types" as this class is in the JRE's rt.jar and not
in the specified <classDirectory>. Any ideas?
bye,
-christian-
P.S.: Beware the hardcoded paths and Postgres version numbers. Don't
know yet how to integrate pg_config in maven.
P.P.S.: Directoy layout for the C files is:
./src/main
./src/main/c
./src/main/c/type
./src/main/include
./src/main/include/pljava
./src/main/include/pljava/type
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <parent>
<groupId>org.postgresql</groupId>
<artifactId>pljava.app</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>pljava-so</artifactId>
<name>pl/java server side library</name>
<description>Generates the pljava.so library which gets loaded by
the PostgreSQL server.</description> <packaging>nar</packaging>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-nar-plugin</artifactId>
<version>2.1-SNAPSHOT</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-nar-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<javah>
<classPaths>
<classPath>/srv/home/james/workspace/pljava/lathspell-master/pljava-jdbc/target/classes/</classPath>
<classPath>/srv/home/james/workspace/pljava/lathspell-master/pljava-api/target/classes/</classPath>
</classPaths>
<classDirectory>/srv/home/james/workspace/pljava/lathspell-master/pljava-jdbc/target/classes/</classDirectory>
<includes>
<include>org/postgresql/**/*.class</include>
<include>java/sql/Types.class</include>
</includes>
</javah>
<libraries>
<library>
<type>shared</type>
</library>
</libraries>
<c>
<defines>
<define>PKGLIBDIR="target/lib/"</define>
<define>PGSQL_MAJOR_VER=9</define>
<define>PGSQL_MINOR_VER=2</define>
<define>PGSQL_PATCH_VER=0</define>
</defines>
<includePaths>
<includePath>/usr/include/postgresql</includePath>
<includePath>/usr/include/postgresql/9.2/server/</includePath>
<includePath>src/main/include/</includePath>
<includePath>target/nar/javah-include/</includePath>
</includePaths>
</c>
</configuration>
</plugin>
</plugins>
</build>
</project>
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Hallgren | 2013-02-06 07:53:11 | [Pljava-dev] Building pljava.so with maven-nar-plugin? |
Previous Message | Manos Tsahakis | 2013-02-05 15:58:26 | [Pljava-dev] Cannot obtain java.sql.Array from java.sql.ResultSet getArray() method call |