-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathpom.xml
74 lines (71 loc) · 3.72 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?xml version="1.0" encoding="UTF-8"?>
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.quiche4j</groupId>
<artifactId>quiche4j</artifactId>
<version>0.2.5</version>
</parent>
<artifactId>quiche4j-jni</artifactId>
<packaging>jar</packaging>
<name>Quiche4j/JNI</name>
<properties>
<exec.executable>cargo</exec.executable>
<native.buildMode>release</native.buildMode>
<native.targetDir>target</native.targetDir>
<jni.classifier>${os.detected.classifier}</jni.classifier>
<nativeIncludeDir>${project.basedir}/src</nativeIncludeDir>
<nativeJarWorkdir>${project.build.directory}/native-jar-work</nativeJarWorkdir>
<nativeLibOnlyDir>${project.build.directory}/native-lib-only</nativeLibOnlyDir>
<defaultJarFile>${project.build.directory}/${project.build.finalName}.jar</defaultJarFile>
<nativeJarFile>${project.build.directory}/${project.build.finalName}-${jni.classifier}.jar</nativeJarFile>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.0.0</version>
<executions>
<!-- Build the additional JAR that contains the native library. -->
<execution>
<id>native-jar</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<copy todir="${nativeJarWorkdir}">
<zipfileset src="${defaultJarFile}" />
</copy>
<copy todir="${nativeJarWorkdir}/native-libs/" includeEmptyDirs="false">
<zipfileset dir="${nativeLibOnlyDir}" />
</copy>
<copy todir="${nativeJarWorkdir}/source/" includeEmptyDirs="false">
<zipfileset dir="${nativeIncludeDir}" />
</copy>
<jar destfile="${nativeJarFile}" manifest="${nativeJarWorkdir}/META-INF/MANIFEST.MF" basedir="${nativeJarWorkdir}" index="true" excludes="META-INF/MANIFEST.MF,META-INF/INDEX.LIST" />
<attachartifact file="${nativeJarFile}" classifier="${jni.classifier}" type="jar" />
</target>
</configuration>
</execution>
<!-- build a static library -->
<execution>
<id>build-native-lib</id>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<exec executable="${exec.executable}" failonerror="true" resolveexecutable="false">
<arg line="build --lib --${native.buildMode} --color always --target-dir ${native.targetDir} --out-dir ${nativeLibOnlyDir} -Z unstable-options" />
</exec>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>