Use Maven to build the Java sources.
For the samples just compiling the sources is enough: maven java:compile
.
When you integrate JAAS-PAM into your application you may find a JAR file more convenient:
maven jar
The native library is written for the PAM 0.7 API. It will compile against PAM 0.77 for instance.
maven native:compile
will build the native library as target/native/libjaas-pam-n.nn.so
.
You must rename the library to libjaas-pam.so
though or make a symbolic link.
maven native:install
will install it into your local Maven repository.
From now on you can include the library as a dependeny in your Maven enabled projects:
<dependency> <groupId>jaas-pam</groupId> <artifactId>libjaas-pam</artifactId> <version>0.1</version> <type>so</type> </dependency>
Alternatively you can use make
:
Make sure to set the JAVA_HOME
environment variable to the location of the
JDK you would like to compile the native code for.
cd src/unix/ export JAVA_HOME=/opt/sun-jdk-1.4.2.07 make
This will make a target/native/libjaas-pam.so
.