jetty.project/jetty-setuid/libsetuid_linux/pom.xml

137 lines
4.3 KiB
XML
Raw Normal View History

<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/maven-v4_0_0.xsd">
<parent>
<groupId>org.eclipse.jetty.setuid</groupId>
<artifactId>jetty-setuid-parent</artifactId>
<version>9.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>libsetuid_linux</artifactId>
<name>Jetty :: SetUID Linux Native</name>
<packaging>so</packaging>
<properties>
<native-source-dir>target/native</native-source-dir>
<jetty-setuid-linkerStartOption>-shared -lc -ldl-shared -lc -ldl</jetty-setuid-linkerStartOption>
<jetty-setuid-linkerEndOption>target/libsetuid_linux.so</jetty-setuid-linkerEndOption>
</properties>
<build>
<finalName>libsetuid_linux</finalName>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.eclipse.jetty.setuid</groupId>
<artifactId>jetty-setuid-native</artifactId>
<version>${project.version}</version>
<overWrite>true</overWrite>
<outputDirectory>${native-source-dir}/</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>copy-jni-implementation</id>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<copy failonerror="false"
file="${native-source-dir}/org_eclipse_jetty_setuid_SetUID.c"
todir="target/generated" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>native-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<javahOS>mac</javahOS>
<jdkIncludePath>${java.home}/include</jdkIncludePath>
<compilerStartOptions>
<compilerStartOption>-fPIC -O</compilerStartOption>
</compilerStartOptions>
<sources>
<source>
<directory>target/generated</directory>
<fileNames>
<fileName>org_eclipse_jetty_setuid_SetUID.c</fileName>
</fileNames>
</source>
</sources>
<linkerStartOptions>
<linkerStartOption>${jetty-setuid-linkerStartOption}</linkerStartOption>
</linkerStartOptions>
<linkerEndOptions>
<linkerEndOptions>-o
${project.build.directory}/libsetuid.so</linkerEndOptions>
</linkerEndOptions>
</configuration>
<executions>
<execution>
<id>javah</id>
<phase>generate-sources</phase>
<configuration>
<classNames>
<className>org.eclipse.jetty.setuid.SetUID</className>
</classNames>
<outputDirectory>target/generated</outputDirectory>
</configuration>
<goals>
<goal>javah</goal>
</goals>
</execution>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-test-helper</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.setuid</groupId>
<artifactId>jetty-setuid-java</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>