|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | +Licensed to the Apache Software Foundation (ASF) under one |
| 4 | +or more contributor license agreements. See the NOTICE file |
| 5 | +distributed with this work for additional information |
| 6 | +regarding copyright ownership. The ASF licenses this file |
| 7 | +to you under the Apache License, Version 2.0 (the |
| 8 | +"License"); you may not use this file except in compliance |
| 9 | +with the License. You may obtain a copy of the License at |
| 10 | +
|
| 11 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +
|
| 13 | +Unless required by applicable law or agreed to in writing, |
| 14 | +software distributed under the License is distributed on an |
| 15 | +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 16 | +KIND, either express or implied. See the License for the |
| 17 | +specific language governing permissions and limitations |
| 18 | +under the License. |
| 19 | +--> |
| 20 | +<project xmlns="http://maven.apache.org/POM/4.0.0" |
| 21 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 22 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 23 | + <modelVersion>4.0.0</modelVersion> |
| 24 | + |
| 25 | + <parent> |
| 26 | + <artifactId>paimon-faiss</artifactId> |
| 27 | + <groupId>org.apache.paimon</groupId> |
| 28 | + <version>1.4-SNAPSHOT</version> |
| 29 | + </parent> |
| 30 | + |
| 31 | + <artifactId>paimon-faiss-jni</artifactId> |
| 32 | + <name>Paimon : Faiss JNI</name> |
| 33 | + |
| 34 | + <properties> |
| 35 | + <faiss.version>1.7.4</faiss.version> |
| 36 | + <skipFaissTests>true</skipFaissTests> |
| 37 | + </properties> |
| 38 | + |
| 39 | + <dependencies> |
| 40 | + <dependency> |
| 41 | + <groupId>org.slf4j</groupId> |
| 42 | + <artifactId>slf4j-api</artifactId> |
| 43 | + </dependency> |
| 44 | + |
| 45 | + <!-- Test dependencies --> |
| 46 | + <dependency> |
| 47 | + <groupId>org.junit.jupiter</groupId> |
| 48 | + <artifactId>junit-jupiter</artifactId> |
| 49 | + <scope>test</scope> |
| 50 | + </dependency> |
| 51 | + </dependencies> |
| 52 | + |
| 53 | + <build> |
| 54 | + <plugins> |
| 55 | + <!-- Generate JNI headers --> |
| 56 | + <plugin> |
| 57 | + <groupId>org.apache.maven.plugins</groupId> |
| 58 | + <artifactId>maven-antrun-plugin</artifactId> |
| 59 | + <executions> |
| 60 | + <execution> |
| 61 | + <id>generate-jni-headers</id> |
| 62 | + <phase>compile</phase> |
| 63 | + <goals> |
| 64 | + <goal>run</goal> |
| 65 | + </goals> |
| 66 | + <configuration> |
| 67 | + <target> |
| 68 | + <mkdir dir="${project.basedir}/src/main/native/include"/> |
| 69 | + </target> |
| 70 | + </configuration> |
| 71 | + </execution> |
| 72 | + </executions> |
| 73 | + </plugin> |
| 74 | + |
| 75 | + <!-- Resources plugin to include native libraries --> |
| 76 | + <plugin> |
| 77 | + <groupId>org.apache.maven.plugins</groupId> |
| 78 | + <artifactId>maven-resources-plugin</artifactId> |
| 79 | + <configuration> |
| 80 | + <nonFilteredFileExtensions> |
| 81 | + <nonFilteredFileExtension>so</nonFilteredFileExtension> |
| 82 | + <nonFilteredFileExtension>dylib</nonFilteredFileExtension> |
| 83 | + </nonFilteredFileExtensions> |
| 84 | + </configuration> |
| 85 | + </plugin> |
| 86 | + |
| 87 | + <!-- Surefire for tests --> |
| 88 | + <plugin> |
| 89 | + <groupId>org.apache.maven.plugins</groupId> |
| 90 | + <artifactId>maven-surefire-plugin</artifactId> |
| 91 | + <configuration> |
| 92 | + <skipTests>${skipFaissTests}</skipTests> |
| 93 | + </configuration> |
| 94 | + </plugin> |
| 95 | + </plugins> |
| 96 | + </build> |
| 97 | + |
| 98 | + <profiles> |
| 99 | + <!-- Profile for deploying to Maven Central with all platform native libraries --> |
| 100 | + <profile> |
| 101 | + <id>release</id> |
| 102 | + <build> |
| 103 | + <plugins> |
| 104 | + <!-- Include all platform native libraries --> |
| 105 | + <plugin> |
| 106 | + <groupId>org.apache.maven.plugins</groupId> |
| 107 | + <artifactId>maven-resources-plugin</artifactId> |
| 108 | + <executions> |
| 109 | + <execution> |
| 110 | + <id>copy-native-libs</id> |
| 111 | + <phase>prepare-package</phase> |
| 112 | + <goals> |
| 113 | + <goal>copy-resources</goal> |
| 114 | + </goals> |
| 115 | + <configuration> |
| 116 | + <outputDirectory>${project.build.outputDirectory}</outputDirectory> |
| 117 | + <resources> |
| 118 | + <resource> |
| 119 | + <directory>${project.basedir}/src/main/resources</directory> |
| 120 | + <includes> |
| 121 | + <include>**/*.so</include> |
| 122 | + <include>**/*.dylib</include> |
| 123 | + </includes> |
| 124 | + </resource> |
| 125 | + </resources> |
| 126 | + </configuration> |
| 127 | + </execution> |
| 128 | + </executions> |
| 129 | + </plugin> |
| 130 | + </plugins> |
| 131 | + </build> |
| 132 | + </profile> |
| 133 | + </profiles> |
| 134 | +</project> |
| 135 | + |
0 commit comments