agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
Subject: [Pljava-dev] Building pljava.so with maven-nar-plugin?
Date: Wed, 06 Feb 2013 08:53:11 +0100
Message-ID: <51120BE7.6020109@tada.se> (raw)
In-Reply-To: <20130206023102.1b94cc01@james.intern>
References: <20130111204013.00e19939@james.intern>
	<20130112234738.03b606b1@james.intern>
	<50F29266.5070408@tada.se>
	<50F29372.7080808@tada.se>
	<20130206023102.1b94cc01@james.intern>


On 2013-02-06 02:31, Christian Hammers wrote:
> 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?
Not sure why that matters. Executing:

javah java.sql.Types

without giving it a classpath does produce the java_sql_Types.h file 
without problems. Is the current javah configuration deliberately 
stripping off the java runtime?

- thomas


> 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>
>
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at pgfoundry.org
> http://lists.pgfoundry.org/mailman/listinfo/pljava-dev




view thread (10+ messages)  latest in thread

Message-ID: <51120BE7.6020109@tada.se>
Permalink:  ../51120BE7.6020109@tada.se/
Also on:    postgresql.org/message-id/51120BE7.6020109@tada.se

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pljava-dev@postgresql.org
  Subject: Re: [Pljava-dev] Building pljava.so with maven-nar-plugin?
  In-Reply-To: <51120BE7.6020109@tada.se>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox