[Pljava-dev] Building pljava.so with maven-nar-plugin?

From: ch at lathspell(dot)de (Christian Hammers)
To:
Subject: [Pljava-dev] Building pljava.so with maven-nar-plugin?
Date: 2013-02-07 16:06:45
Message-ID: 20130207170645.080294f4@james.intern
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev


Am Wed, 06 Feb 2013 08:53:11 +0100
schrieb Thomas Hallgren <thomas at tada.se>:

>
> 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

The javah target of the maven-nar-plugin only scans a single
<classDirectory> directory for actual *.class files, reads their
method signatures and only adds the class if there is at least one
"native" method. The <includes> parameter does not help here.

I added a <extraClasses> parameter to it that just adds its values
to the end of the javah call and with that it would work.
My pull requests for the maven-nar-plugin are here:
* https://github.com/maven-nar/maven-nar-plugin/pull/22
* https://github.com/maven-nar/maven-nar-plugin/pull/21

bye,

-christian-

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Thomas Hallgren 2013-02-07 22:31:58 [Pljava-dev] Building pljava.so with maven-nar-plugin?
Previous Message Thomas Hallgren 2013-02-06 07:53:11 [Pljava-dev] Building pljava.so with maven-nar-plugin?