From: ch at lathspell.de (Christian Hammers) Date: Wed, 6 Feb 2013 02:31:02 +0100 Subject: [Pljava-dev] Building pljava.so with maven-nar-plugin? In-Reply-To: <50F29372.7080808@tada.se> References: <20130111204013.00e19939@james.intern> <20130112234738.03b606b1@james.intern> <50F29266.5070408@tada.se> <50F29372.7080808@tada.se> Message-ID: <20130206023102.1b94cc01@james.intern> 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 . 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 4.0.0 org.postgresql pljava.app 0.0.1-SNAPSHOT pljava-so pl/java server side library Generates the pljava.so library which gets loaded by the PostgreSQL server. nar org.apache.maven.plugins maven-nar-plugin 2.1-SNAPSHOT org.apache.maven.plugins maven-nar-plugin true /srv/home/james/workspace/pljava/lathspell-master/pljava-jdbc/target/classes/ /srv/home/james/workspace/pljava/lathspell-master/pljava-api/target/classes/ /srv/home/james/workspace/pljava/lathspell-master/pljava-jdbc/target/classes/ org/postgresql/**/*.class java/sql/Types.class shared PKGLIBDIR="target/lib/" PGSQL_MAJOR_VER=9 PGSQL_MINOR_VER=2 PGSQL_PATCH_VER=0 /usr/include/postgresql /usr/include/postgresql/9.2/server/ src/main/include/ target/nar/javah-include/