blob: b5ad29f95c800ddaac0e47a873df38d9f832273e [file]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-parent</artifactId>
<version>2.0.8-SNAPSHOT</version>
</parent>
<artifactId>iotdb-distribution</artifactId>
<packaging>pom</packaging>
<name>IoTDB: Distribution</name>
<properties>
<proguard.config>proguard.conf</proguard.config>
<jdk.library>${java.home}/jmods</jdk.library>
<proguard.keep.option>-keepattributes *Annotation*, Signature, InnerClasses, EnclosingMethod, Exceptions, LineNumberTable, SourceFile</proguard.keep.option>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-server</artifactId>
<version>2.0.8-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-cli</artifactId>
<version>2.0.8-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>com.timecho.iotdb</groupId>
<artifactId>service-rpc</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-thrift-confignode</artifactId>
</exclusion>
<exclusion>
<groupId>com.timecho.iotdb</groupId>
<artifactId>timechodb-thrift</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-thrift-ainode</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>node-commons</artifactId>
</exclusion>
<exclusion>
<groupId>com.timecho.iotdb</groupId>
<artifactId>iotdb-thrift-commons</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-consensus</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-server</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>external-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>metrics-interface</artifactId>
</exclusion>
<exclusion>
<groupId>com.timecho.iotdb</groupId>
<artifactId>object-storage</artifactId>
</exclusion>
<exclusion>
<groupId>com.timecho.iotdb</groupId>
<artifactId>session-parent</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-antlr</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>pipe-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>trigger-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>udf-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.tsfile</groupId>
<artifactId>tsfile</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.tsfile</groupId>
<artifactId>common</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>tsfile-remote-sink</artifactId>
<version>2.0.8-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-confignode</artifactId>
<version>2.0.8-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>com.timecho.iotdb</groupId>
<artifactId>service-rpc</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-thrift-confignode</artifactId>
</exclusion>
<exclusion>
<groupId>com.timecho.iotdb</groupId>
<artifactId>timechodb-thrift</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-thrift-ainode</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>node-commons</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
</exclusion>
<exclusion>
<groupId>com.timecho.iotdb</groupId>
<artifactId>iotdb-thrift-commons</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-consensus</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-server</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>external-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>metrics-interface</artifactId>
</exclusion>
<exclusion>
<groupId>com.timecho.iotdb</groupId>
<artifactId>object-storage</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.ratis</groupId>
<artifactId>ratis-common</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>pipe-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>trigger-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>udf-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.tsfile</groupId>
<artifactId>tsfile</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.tsfile</groupId>
<artifactId>common</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.timecho.iotdb</groupId>
<artifactId>timecho-server</artifactId>
<version>2.0.8-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>com.timecho.iotdb</groupId>
<artifactId>service-rpc</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-thrift-confignode</artifactId>
</exclusion>
<exclusion>
<groupId>com.timecho.iotdb</groupId>
<artifactId>timechodb-thrift</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-thrift-ainode</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>node-commons</artifactId>
</exclusion>
<exclusion>
<groupId>com.timecho.iotdb</groupId>
<artifactId>iotdb-thrift-commons</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-consensus</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-server</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>external-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>metrics-interface</artifactId>
</exclusion>
<exclusion>
<groupId>com.timecho.iotdb</groupId>
<artifactId>object-storage</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.tsfile</groupId>
<artifactId>tsfile</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.tsfile</groupId>
<artifactId>common</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.timecho.iotdb</groupId>
<artifactId>timecho-confignode</artifactId>
<version>2.0.8-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-confignode</artifactId>
</exclusion>
<exclusion>
<groupId>com.timecho.iotdb</groupId>
<artifactId>service-rpc</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-thrift-confignode</artifactId>
</exclusion>
<exclusion>
<groupId>com.timecho.iotdb</groupId>
<artifactId>timechodb-thrift</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-thrift-ainode</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>node-commons</artifactId>
</exclusion>
<exclusion>
<groupId>com.timecho.iotdb</groupId>
<artifactId>iotdb-thrift-commons</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-consensus</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-server</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.tsfile</groupId>
<artifactId>tsfile</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.tsfile</groupId>
<artifactId>common</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>mqtt</artifactId>
<version>2.0.8-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>rest</artifactId>
<version>2.0.8-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.github.wvengen</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<version>2.7.0</version>
<executions>
<!-- Obfuscate IoTDB Server -->
<execution>
<id>obfuscate-timechodb</id>
<phase>package</phase>
<goals>
<goal>proguard</goal>
</goals>
<configuration>
<proguardVersion>7.7.0</proguardVersion>
<assembly>
<inclusions>
<inclusion>
<groupId>org.apache.tsfile</groupId>
<artifactId>tsfile</artifactId>
<filter>!META-INF/**</filter>
</inclusion>
<inclusion>
<groupId>org.apache.iotdb</groupId>
<artifactId>*</artifactId>
<filter>!org/apache/iotdb/rest/**,!org/apache/iotdb/mqtt/**</filter>
</inclusion>
<inclusion>
<groupId>com.timecho.iotdb</groupId>
<artifactId>*</artifactId>
</inclusion>
</inclusions>
</assembly>
<generateTemporaryConfigurationFile>true</generateTemporaryConfigurationFile>
<outputDirectory>${project.basedir}/target</outputDirectory>
<outjar>timechodb-server-${project.version}.jar</outjar>
<includeDependency>true</includeDependency>
<proguardInclude>${project.basedir}/src/security/${proguard.config}</proguardInclude>
<libs>
<lib>${jdk.library}</lib>
</libs>
<options>
<option>-printmapping ${project.basedir}/target/obfuscation-mapping.txt</option>
<option>-printseeds ${project.basedir}/target/obfuscation-seeds.txt</option>
<option>-printusage ${project.basedir}/target/obfuscation-usage.txt</option>
<option>-printconfiguration ${project.basedir}/target/obfuscation-configuration.txt</option>
<option>${proguard.keep.option}</option>
</options>
<addManifest>true</addManifest>
<addMavenDescriptor>true</addMavenDescriptor>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<!-- 对于 pom 项目,强制生成 JAR -->
<outputFile>${project.build.directory}/common-dependency.jar</outputFile>
<createDependencyReducedPom>false</createDependencyReducedPom>
<shadedArtifactAttached>false</shadedArtifactAttached>
<!-- 过滤器配置:排除所有核心代码,仅保留第三方依赖 -->
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<!-- 排除核心代码包 -->
<exclude>org/apache/tsfile/**</exclude>
<exclude>org/apache/iotdb/**</exclude>
<exclude>com/timecho/**</exclude>
<!-- 排除签名文件 -->
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<!-- 排除 Maven 元数据 -->
<exclude>META-INF/maven/**</exclude>
</excludes>
</filter>
<!-- 明确排除核心项目的依赖 -->
<filter>
<artifact>org.apache.tsfile:*</artifact>
<excludes>
<exclude>**</exclude>
</excludes>
</filter>
<filter>
<artifact>org.apache.iotdb:*</artifact>
<excludes>
<exclude>**</exclude>
</excludes>
</filter>
<filter>
<artifact>com.timecho.iotdb:*</artifact>
<excludes>
<exclude>**</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
<!-- JAR 签名:使用 jarsigner 对生成的核心 JAR 进行签名。
需提供属性:-Dkeystore=/path/ks.jks -Dstorepass=xxx -Dkeypass=xxx -Dalias=timechodb
可跳过:-Djarsigner.skip=true -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-core-jars</id>
<phase>package</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<skip>${jarsigner.skip}</skip>
<archiveDirectory>${project.build.directory}</archiveDirectory>
<includes>
<include>timechodb-server-${project.version}.jar</include>
<include>common-dependency.jar</include>
</includes>
<keystore>${keystore}</keystore>
<storepass>${storepass}</storepass>
<keypass>${keypass}</keypass>
<alias>${alias}</alias>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<!-- Package binaries( if no need proguard, use this )-->
<!-- <execution>
<id>all-bin</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>src/assembly/inner.xml</descriptor>
</descriptors>
<finalName>timechodb-${project.version}</finalName>
</configuration>
</execution>-->
<!-- Package binaries-->
<execution>
<id>all-bin</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>src/assembly/all.xml</descriptor>
<descriptor>src/assembly/external-service-impl.xml</descriptor>
<descriptor>src/assembly/library-pipe.xml</descriptor>
</descriptors>
<finalName>timechodb-${project.version}${locale.suffix}</finalName>
</configuration>
</execution>
<execution>
<id>security-file</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>src/assembly/security-file.xml</descriptor>
</descriptors>
<finalName>timechodb-${project.version}${locale.suffix}</finalName>
</configuration>
</execution>
</executions>
</plugin>
<!--
Create SHA512 checksum files for the release artifacts.
-->
<plugin>
<groupId>net.nicoulaj.maven.plugins</groupId>
<artifactId>checksum-maven-plugin</artifactId>
<executions>
<execution>
<id>sign-source-release</id>
<goals>
<goal>files</goal>
</goals>
<phase>package</phase>
<configuration>
<algorithms>
<algorithm>SHA-512</algorithm>
</algorithms>
<fileSets>
<!--bin-all-->
<fileSet>
<directory>${project.build.directory}</directory>
<includes>
<include>timechodb-${project.version}${locale.suffix}-bin.zip</include>
<include>timechodb-${project.version}${locale.suffix}-external-service-impl-bin.zip</include>
<include>timechodb-${project.version}${locale.suffix}-library-pipe-bin.zip</include>
</includes>
</fileSet>
<!--security-file-->
<fileSet>
<directory>${project.build.directory}</directory>
<includes>
<include>timechodb-${project.version}${locale.suffix}-security-file.zip</include>
</includes>
</fileSet>
</fileSets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>with-cpp</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<!-- Package binaries-->
<execution>
<id>all-bin</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors combine.children="append">
<descriptor>src/assembly/client-cpp.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<!--
Create SHA512 checksum files for the release artifacts.
-->
<plugin>
<groupId>net.nicoulaj.maven.plugins</groupId>
<artifactId>checksum-maven-plugin</artifactId>
<executions>
<execution>
<id>sign-source-release</id>
<goals>
<goal>files</goal>
</goals>
<phase>package</phase>
<configuration>
<fileSets>
<fileSet>
<includes combine.children="append">
<include>apache-iotdb-${project.version}-client-cpp-${os.classifier}-bin.zip</include>
</includes>
</fileSet>
</fileSets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>with-ainode</id>
<dependencies>
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-ainode</artifactId>
<version>2.0.8-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<!-- Package binaries-->
<execution>
<id>all-bin</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors combine.children="append">
<descriptor>src/assembly/ainode.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<!--
Create SHA512 checksum files for the release artifacts.
-->
<plugin>
<groupId>net.nicoulaj.maven.plugins</groupId>
<artifactId>checksum-maven-plugin</artifactId>
<executions>
<execution>
<id>sign-source-release</id>
<goals>
<goal>files</goal>
</goals>
<phase>package</phase>
<configuration>
<fileSets>
<fileSet>
<includes combine.children="append">
<include>timechodb-${project.version}${locale.suffix}-ainode-bin.zip</include>
</includes>
</fileSet>
</fileSets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>with-integration-tests</id>
<properties>
<proguard.config>proguard-it.conf</proguard.config>
<jarsigner.skip>true</jarsigner.skip>
</properties>
</profile>
<profile>
<id>.java-9-below</id>
<activation>
<jdk>(,9)</jdk>
</activation>
<properties>
<jdk.library>${java.home}/lib</jdk.library>
</properties>
</profile>
<profile>
<id>.java-9-and-above</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<properties>
<jdk.library>${java.home}/jmods</jdk.library>
</properties>
</profile>
<profile>
<id>release</id>
<properties>
<proguard.keep.option>-keepattributes *Annotation*, Signature, InnerClasses, EnclosingMethod, Exceptions, LineNumberTable</proguard.keep.option>
</properties>
</profile>
</profiles>
</project>