pom.xml 67.2 KB
Newer Older
1
<?xml version="1.0" encoding="UTF-8"?>
2 3
<!--

4 5 6 7 8 9 10
    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
11 12 13

        http://www.apache.org/licenses/LICENSE-2.0

14 15 16 17 18 19
    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.
20 21

-->
X
XuYi 已提交
22 23 24 25 26
<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</groupId>
        <artifactId>apache</artifactId>
27
        <version>23</version>
X
XuYi 已提交
28 29
    </parent>
    <groupId>org.apache.iotdb</groupId>
30
    <artifactId>iotdb-parent</artifactId>
31
    <version>0.13.0-SNAPSHOT</version>
X
XuYi 已提交
32
    <packaging>pom</packaging>
33
    <name>Apache IoTDB Project Parent POM</name>
X
XuYi 已提交
34 35 36 37 38 39 40 41
    <description>This is the top level project that builds, packages the tsfile, iotdb engine, jdbc, and integration libs.</description>
    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <scm>
42 43 44
        <connection>scm:git:ssh://git@github.com/apache/iotdb.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/apache/iotdb.git</developerConnection>
        <url>ssh://git@github.com:apache/iotdb.git</url>
J
Jialin Qiao 已提交
45
        <tag>rel/0.10</tag>
X
XuYi 已提交
46
    </scm>
47 48 49 50
    <!-- Only configure the site distribution as the rest is handled by the apache parent -->
    <distributionManagement>
        <site>
            <id>apache.website</id>
51
            <url>scm:git:https://gitbox.apache.org/repos/asf/iotdb-website.git</url>
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
        </site>
    </distributionManagement>
    <issueManagement>
        <system>Jira</system>
        <url>https://issues.apache.org/jira/browse/iotdb</url>
    </issueManagement>
    <mailingLists>
        <mailingList>
            <name>Apache IoTDB Developer List</name>
            <subscribe>mailto:dev-subscribe@iotdb.apache.org</subscribe>
            <unsubscribe>mailto:dev-unsubscribe@iotdb.apache.org</unsubscribe>
            <post>mailto:dev@iotdb.apache.org</post>
            <archive>http://mail-archives.apache.org/mod_mbox/iotdb-dev/</archive>
        </mailingList>
        <mailingList>
            <name>IoTDB Commits List</name>
            <subscribe>mailto:commit-subscribe@iotdb.apache.org</subscribe>
            <unsubscribe>mailto:commits-unsubscribe@iotdb.apache.org</unsubscribe>
            <post>mailto:commits@iotdb.apache.org</post>
            <archive>http://mail-archives.apache.org/mod_mbox/iotdb-commits/</archive>
        </mailingList>
        <mailingList>
            <name>IoTDB Jira Notifications List</name>
            <subscribe>mailto:notifications-subscribe@iotdb.apache.org</subscribe>
            <unsubscribe>mailto:notifications-unsubscribe@iotdb.apache.org</unsubscribe>
            <post>mailto:notifications@iotdb.apache.org</post>
            <archive>http://mail-archives.apache.org/mod_mbox/iotdb-notifications/</archive>
        </mailingList>
    </mailingLists>
81 82
    <modules>
        <module>tsfile</module>
83 84
        <module>antlr</module>
        <module>thrift</module>
85 86
        <module>thrift-cluster</module>
        <module>thrift-sync</module>
87 88 89
        <module>service-rpc</module>
        <module>jdbc</module>
        <module>session</module>
90
        <module>cli</module>
91 92 93 94
        <module>server</module>
        <module>example</module>
        <module>grafana</module>
        <module>spark-tsfile</module>
95
        <module>hadoop</module>
96
        <module>spark-iotdb-connector</module>
97
        <module>flink-tsfile-connector</module>
98
        <module>flink-iotdb-connector</module>
99
        <module>distribution</module>
J
Jackie Tien 已提交
100
        <module>hive-connector</module>
101
        <module>cluster</module>
C
chaow 已提交
102
        <module>cross-tests</module>
103
        <module>zeppelin-interpreter</module>
104
        <module>client-py</module>
105 106
        <module>compile-tools</module>
        <module>client-cpp</module>
107
    </modules>
108
    <!-- Properties Management -->
X
XuYi 已提交
109 110 111
    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
112
        <maven.assembly.version>3.1.0</maven.assembly.version>
113
        <scala.library.version>2.11</scala.library.version>
114
        <scala.version>2.11.12</scala.version>
J
Jackie Tien 已提交
115 116
        <hadoop2.version>2.7.3</hadoop2.version>
        <hive2.version>2.3.6</hive2.version>
X
XuYi 已提交
117 118
        <junit.version>4.12</junit.version>
        <slf4j.version>1.7.12</slf4j.version>
119
        <logback.version>1.2.3</logback.version>
X
XuYi 已提交
120
        <joda.version>2.9.9</joda.version>
121
        <spark.version>2.4.3</spark.version>
122
        <flink.version>1.11.1</flink.version>
X
XuYi 已提交
123
        <common.io.version>2.5</common.io.version>
124
        <commons.collections4>4.4</commons.collections4>
W
wshao08 已提交
125
        <!-- keep consistent with client-cpp/tools/thrift/pom.xml-->
126
        <thrift.version>0.14.1</thrift.version>
127
        <airline.version>0.8</airline.version>
128
        <jackson.version>2.11.0</jackson.version>
Z
zhutianci 已提交
129
        <antlr4.version>4.8-1</antlr4.version>
130 131 132 133 134
        <common.cli.version>1.3.1</common.cli.version>
        <common.codec.version>1.13</common.codec.version>
        <common.collections.version>3.2.2</common.collections.version>
        <common.lang3.version>3.8.1</common.lang3.version>
        <common.logging.version>1.1.3</common.logging.version>
135
        <org.slf4j.version>1.7.30</org.slf4j.version>
H
HouliangQi 已提交
136
        <guava.version>24.1.1</guava.version>
137
        <jline.version>2.14.5</jline.version>
138
        <jetty.version>9.4.35.v20201120</jetty.version>
139
        <metrics.version>3.2.6</metrics.version>
140
        <javax.xml.bind.version>2.4.0-b180725.0427</javax.xml.bind.version>
141
        <felix.version>5.1.1</felix.version>
142
        <snappy.version>1.1.8.4</snappy.version>
143
        <netty.version>4.1.53.Final</netty.version>
144
        <!-- URL of the ASF SonarQube server -->
X
Xiangdong Huang 已提交
145 146
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
        <sonar.organization>apache</sonar.organization>
147 148
        <!-- Exclude all generated code -->
        <sonar.exclusions>**/generated-sources</sonar.exclusions>
149
        <sonar.java.checkstyle.reportPaths>target/checkstyle-report.xml</sonar.java.checkstyle.reportPaths>
150 151
        <sonar.coverage.jacoco.xmlReportPaths>target/jacoco-merged-reports/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
        <sonar.junit.reportPaths>target/surefire-reports,target/failsafe-reports</sonar.junit.reportPaths>
X
Xiangdong Huang 已提交
152
        <!-- By default, the argLine is empty-->
153
        <gson.version>2.8.6</gson.version>
154
        <argLine/>
155 156
        <!-- whether enable compiling the cpp client-->
        <client-cpp>false</client-cpp>
157 158
        <!-- disable enforcer by default-->
        <enforcer.skip>true</enforcer.skip>
159
        <spotless.version>2.4.2</spotless.version>
X
XuYi 已提交
160
    </properties>
161 162 163 164 165
    <!--
        if we claim dependencies in dependencyManagement, then we do not claim
        their version in sub-project's pom, but we have to claim themselves again
        in sub-projects
    -->
X
XuYi 已提交
166 167
    <dependencyManagement>
        <dependencies>
168 169 170 171
            <!--
                in the subprojects, you have to claim logback again, because maybe
                someone in your dependences uses log4j lib.
            -->
X
XuYi 已提交
172 173 174 175 176
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
            </dependency>
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.module</groupId>
                <artifactId>jackson-module-paranamer</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.module</groupId>
                <artifactId>jackson-module-scala_2.11</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
H
HouliangQi 已提交
205
                <version>[${guava.version},)</version>
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
            </dependency>
            <dependency>
                <groupId>commons-cli</groupId>
                <artifactId>commons-cli</artifactId>
                <version>${common.cli.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>${common.codec.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-collections</groupId>
                <artifactId>commons-collections</artifactId>
                <version>${common.collections.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${common.io.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>${common.logging.version}</version>
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty</artifactId>
                <version>3.9.9.Final</version>
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-all</artifactId>
240
                <version>${netty.version}</version>
241 242 243 244
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-buffer</artifactId>
245
                <version>${netty.version}</version>
246 247 248 249
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-common</artifactId>
250
                <version>${netty.version}</version>
251 252 253 254 255 256 257 258 259
            </dependency>
            <dependency>
                <groupId>javax.annotation</groupId>
                <artifactId>javax.annotation-api</artifactId>
                <version>1.3.2</version>
            </dependency>
            <dependency>
                <groupId>javax.xml.bind</groupId>
                <artifactId>jaxb-api</artifactId>
260
                <version>${javax.xml.bind.version}</version>
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
            </dependency>
            <dependency>
                <groupId>jline</groupId>
                <artifactId>jline</artifactId>
                <version>${jline.version}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.17</version>
            </dependency>
277 278 279 280 281
            <dependency>
                <groupId>net.jpountz.lz4</groupId>
                <artifactId>lz4</artifactId>
                <version>1.3.0</version>
            </dependency>
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-server</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-webapp</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-core</artifactId>
                <version>${metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-jvm</artifactId>
                <version>${metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-json</artifactId>
                <version>${metrics.version}</version>
            </dependency>
307 308 309 310 311 312 313 314 315 316 317 318 319 320
            <dependency>
                <groupId>me.tongfei</groupId>
                <artifactId>progressbar</artifactId>
                <version>0.7.3</version>
                <exclusions>
                    <!-- This transitive dependency duplicates classes from jline:jline:jar:2.14.5:compile -->
                    <exclusion>
                        <groupId>org.fusesource.jansi</groupId>
                        <artifactId>jansi</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.antlr</groupId>
321 322
                <artifactId>antlr4-runtime</artifactId>
                <version>${antlr4.version}</version>
323 324 325 326 327 328 329 330 331 332 333 334 335 336
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-collections4</artifactId>
                <version>${commons.collections4}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${common.lang3.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.hadoop</groupId>
                <artifactId>hadoop-client</artifactId>
J
Jackie Tien 已提交
337 338 339 340 341 342 343 344 345 346 347
                <version>${hadoop2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.hive</groupId>
                <artifactId>hive-serde</artifactId>
                <version>${hive2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.hive</groupId>
                <artifactId>hive-exec</artifactId>
                <version>${hive2.version}</version>
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371
            </dependency>
            <dependency>
                <groupId>org.apache.spark</groupId>
                <artifactId>spark-core_2.11</artifactId>
                <version>${spark.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.spark</groupId>
                <artifactId>spark-sql_2.11</artifactId>
                <version>${spark.version}</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.jackson</groupId>
                <artifactId>jackson-core-asl</artifactId>
                <version>1.9.13</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.jackson</groupId>
                <artifactId>jackson-mapper-asl</artifactId>
                <version>1.9.13</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jaxb</groupId>
                <artifactId>jaxb-runtime</artifactId>
372
                <version>3.0.0</version>
373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432
                <exclusions>
                    <exclusion>
                        <groupId>jakarta.activation</groupId>
                        <artifactId>jakarta.activation-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.javassist</groupId>
                <artifactId>javassist</artifactId>
                <version>3.24.0-GA</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>1.10.19</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>2.23.0</version>
            </dependency>
            <dependency>
                <groupId>org.objenesis</groupId>
                <artifactId>objenesis</artifactId>
                <version>3.0.1</version>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-core</artifactId>
                <version>2.0.2</version>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-api-mockito2</artifactId>
                <version>2.0.2</version>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-module-junit4</artifactId>
                <version>2.0.2</version>
            </dependency>
            <dependency>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-library</artifactId>
                <version>${scala.version}</version>
            </dependency>
            <dependency>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-reflect</artifactId>
                <version>${scala.version}</version>
            </dependency>
            <dependency>
                <groupId>org.scalatest</groupId>
                <artifactId>scalatest_2.11</artifactId>
                <version>3.0.5</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jcl-over-slf4j</artifactId>
433
                <version>${org.slf4j.version}</version>
434 435 436 437
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jul-to-slf4j</artifactId>
438
                <version>${org.slf4j.version}</version>
439 440 441 442
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
443
                <version>${org.slf4j.version}</version>
444 445 446 447
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
448
                <version>${org.slf4j.version}</version>
449 450 451 452
            </dependency>
            <dependency>
                <groupId>org.xerial.snappy</groupId>
                <artifactId>snappy-java</artifactId>
453
                <version>${snappy.version}</version>
454
            </dependency>
X
XuYi 已提交
455 456 457 458 459 460 461 462 463 464 465 466 467 468 469
            <dependency>
                <groupId>org.apache.thrift</groupId>
                <artifactId>libthrift</artifactId>
                <version>${thrift.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.apache.httpcomponents</groupId>
                        <artifactId>httpclient</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.httpcomponents</groupId>
                        <artifactId>httpcore</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
470 471 472 473 474
            <dependency>
                <groupId>io.airlift</groupId>
                <artifactId>airline</artifactId>
                <version>${airline.version}</version>
            </dependency>
475 476 477 478 479
            <dependency>
                <groupId>org.fusesource.mqtt-client</groupId>
                <artifactId>mqtt-client</artifactId>
                <version>1.12</version>
            </dependency>
480 481 482 483 484 485 486
            <!-- many dependencies (hadoop, spark, hive, flink) use findbugs but with different version...-->
            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <!-- spark uses the lastest version than hive, flink and hadoop-->
                <version>3.0.2</version>
            </dependency>
487 488 489 490 491
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${gson.version}</version>
            </dependency>
X
XuYi 已提交
492 493 494
        </dependencies>
    </dependencyManagement>
    <dependencies>
495 496 497 498 499 500 501 502
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
X
XuYi 已提交
503 504 505 506 507 508 509 510 511 512
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <scope>test</scope>
        </dependency>
513 514 515 516 517 518
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers</artifactId>
            <version>1.15.2</version>
            <scope>test</scope>
        </dependency>
X
XuYi 已提交
519 520 521 522
    </dependencies>
    <build>
        <pluginManagement>
            <plugins>
523 524 525 526 527 528 529 530 531 532
                <!-- using `mvn -N versions:update-child-modules` can update the version
                of child modules to what their parent claims -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.3</version>
                    <configuration>
                        <generateBackupPoms>false</generateBackupPoms>
                    </configuration>
                </plugin>
X
XuYi 已提交
533 534 535 536 537 538
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <excludePackageNames>*thrift*</excludePackageNames>
                        <!--
539 540 541
                          This will suppress the generation of a hidden timestamp at the top of each generated html page
                          and hopefully let the site generation nod to too big updates every time.
                        -->
X
XuYi 已提交
542 543 544 545 546 547
                        <notimestamp>true</notimestamp>
                        <!--Don't fail the build, just because there were issues in the JavaDoc generation.-->
                        <failOnError>false</failOnError>
                    </configuration>
                </plugin>
                <!--
548 549 550
                  We need to increase the memory available to tests as we were
                  getting out-of-memory errors when building on windows machines.
                -->
X
XuYi 已提交
551 552 553 554
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
X
Xiangdong Huang 已提交
555
                        <argLine>${argLine} -Xmx1024m</argLine>
X
XuYi 已提交
556 557
                    </configuration>
                </plugin>
558 559 560 561 562 563
                <!--
                    Plugin for doing the code analysis.
                -->
                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
X
Xiangdong Huang 已提交
564
                    <version>3.6.1.1688</version>
565
                </plugin>
566 567 568 569
                <plugin>
                    <groupId>org.apache.rat</groupId>
                    <artifactId>apache-rat-plugin</artifactId>
                    <configuration>
570
                        <consoleOutput>true</consoleOutput>
571 572 573
                        <excludes>
                            <!-- Git related files -->
                            <exclude>**/.git/**</exclude>
Q
qiaojialin 已提交
574
                            <exclude>**/.mvn/**</exclude>
575
                            <exclude>**/.gitignore</exclude>
576
                            <exclude>**/.gitmodules</exclude>
577
                            <exclude>**/.git-blame-ignore-revs</exclude>
578 579 580 581 582 583 584 585 586 587 588
                            <!-- Maven related files -->
                            <exclude>**/target/**</exclude>
                            <!-- Eclipse related files -->
                            <exclude>**/.project</exclude>
                            <exclude>**/.settings/**</exclude>
                            <exclude>**/.classpath</exclude>
                            <!-- IntelliJ related files -->
                            <exclude>**/.idea/**</exclude>
                            <exclude>**/*.iml</exclude>
                            <!-- Runtime log -->
                            <exclude>**/*.log</exclude>
589 590
                            <!-- Exclude CVS files -->
                            <exclude>**/*.cvs</exclude>
铁头乔's avatar
铁头乔 已提交
591 592
                            <!-- licenses -->
                            <exclude>licenses/*</exclude>
593
                            <!-- only for Travis CI with WinOS-->
S
Sail 已提交
594 595
                            <exclude>hadoopbin</exclude>
                            <exclude>windowssystem32</exclude>
596
                            <!-- generated by Github -->
597
                            <exclude>**/.github/**</exclude>
J
Jialin Qiao 已提交
598 599 600 601
                            <!-- figures -->
                            <exclude>**/.eps</exclude>
                            <exclude>**/.png</exclude>
                            <exclude>**/.jpg</exclude>
602
                            <exclude>**/.jpeg</exclude>
603 604
                            <!--Generated by Apache Release -->
                            <exclude>local-snapshots-dir/**</exclude>
605 606
                            <!-- JSON can't contain comments and therefore no Apache header -->
                            <exclude>*.json</exclude>
J
Jiang Tian 已提交
607 608
                            <!-- visualization plans -->
                            <exclude>**/*.plan</exclude>
609 610
                            <exclude>**/NOTICE-binary</exclude>
                            <exclude>**/LICENSE-binary</exclude>
611 612
                            <!-- json does not support comments-->
                            <exclude>**/*.json</exclude>
613 614
                            <!-- the zeppelin export file format-->
                            <exclude>**/*.zpln</exclude>
615 616 617
                            <!-- exclude go.mod and go.sum in iotdb-client-go submodule-->
                            <exclude>**/go.mod</exclude>
                            <exclude>**/go.sum</exclude>
618 619 620 621
                            <!-- python -->
                            <exclude>.pytest_cache/**</exclude>
                            <exclude>venv/**</exclude>
                            <exclude>apache_iotdb.egg-info/**</exclude>
622 623 624
                        </excludes>
                    </configuration>
                </plugin>
625 626 627 628 629 630 631 632 633 634 635 636 637
                <plugin>
                    <groupId>com.diffplug.spotless</groupId>
                    <artifactId>spotless-maven-plugin</artifactId>
                    <version>${spotless.version}</version>
                    <configuration>
                        <java>
                            <googleJavaFormat>
                                <version>1.7</version>
                                <style>GOOGLE</style>
                            </googleJavaFormat>
                            <importOrder>
                                <order>org.apache.iotdb,,javax,java,\#</order>
                            </importOrder>
638
                            <removeUnusedImports/>
639 640 641 642 643 644 645 646 647 648 649 650
                        </java>
                    </configuration>
                    <executions>
                        <execution>
                            <id>spotless-check</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
X
XuYi 已提交
651 652 653
            </plugins>
        </pluginManagement>
        <plugins>
654 655 656 657 658 659 660 661 662 663 664 665 666
            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <version>4.3.0</version>
                <configuration>
                    <jacocoReports>
                        <jacocoReport>code-coverage/target/jacoco-merged-reports/jacoco.xml</jacocoReport>
                    </jacocoReports>
                    <sourceEncoding>UTF-8</sourceEncoding>
                    <sourceDirectories>
                        <!-- put all source folders not in src/main/java here-->
                        <sourceDirectory>antlr/target/generated-sources/antlr4</sourceDirectory>
                        <sourceDirectory>thrift/target/generated-sources/thrift</sourceDirectory>
667 668
                        <sourceDirectory>thrift-sync/target/generated-sources/thrift</sourceDirectory>
                        <sourceDirectory>thrift-cluster/target/generated-sources/thrift</sourceDirectory>
669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691
                        <sourceDirectory>spark-iotdb-connector/src/main/scala</sourceDirectory>
                        <sourceDirectory>spark-tsfile/src/main/scala</sourceDirectory>
                    </sourceDirectories>
                </configuration>
                <!-- JDK11 removes the following libs. We have to add them-->
                <dependencies>
                    <dependency>
                        <groupId>javax.xml.bind</groupId>
                        <artifactId>jaxb-api</artifactId>
                        <version>2.3.0</version>
                    </dependency>
                    <dependency>
                        <groupId>com.sun.xml.bind</groupId>
                        <artifactId>jaxb-core</artifactId>
                        <version>2.3.0</version>
                    </dependency>
                    <dependency>
                        <groupId>com.sun.xml.bind</groupId>
                        <artifactId>jaxb-impl</artifactId>
                        <version>2.3.0</version>
                    </dependency>
                </dependencies>
            </plugin>
692 693 694 695 696 697 698 699 700 701 702 703 704 705
            <!--
                      Strange things usually happen if you run with a too low Java version.
                      This plugin not only checks the minimum java version of 1.8, but also
                      checks all dependencies (and transitive dependencies) for reported CVEs.
                    -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.0.0-M2</version>
                <!--$NO-MVN-MAN-VER$-->
                <executions>
                    <!-- Ensure we're not mixing dependency versions -->
                    <execution>
                        <id>enforce-version-convergence</id>
706
                        <phase>validate</phase>
707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772
                        <configuration>
                            <rules>
                                <dependencyConvergence/>
                            </rules>
                        </configuration>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                    <!--
                        Fails the build if classes are included from multiple
                        artifacts and these are not identical.
                    -->
                    <!--execution>
                        <id>enforce-ban-duplicate-classes</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <banDuplicateClasses>
                                    <scopes>
                                        <scope>compile</scope>
                                        <scope>provided</scope>
                                    </scopes>
                                    <findAllDuplicates>true</findAllDuplicates>
                                    <ignoreWhenIdentical>true</ignoreWhenIdentical>
                                </banDuplicateClasses>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution-->
                    <!-- Make sure no dependencies are used for which known vulnerabilities exist. -->
                    <execution>
                        <id>vulnerability-checks</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <!-- Just generate warnings for now -->
                            <fail>false</fail>
                            <rules>
                                <requireJavaVersion>
                                    <version>1.8.0</version>
                                </requireJavaVersion>
                                <!-- Disabled for now as it breaks the ability to build single modules -->
                                <!--reactorModuleConvergence/-->
                                <banVulnerable implementation="org.sonatype.ossindex.maven.enforcer.BanVulnerableDependencies"/>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.sonatype.ossindex.maven</groupId>
                        <artifactId>ossindex-maven-enforcer-rules</artifactId>
                        <version>1.0.0</version>
                    </dependency>
                    <dependency>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>extra-enforcer-rules</artifactId>
                        <version>1.2</version>
                    </dependency>
                </dependencies>
            </plugin>
X
XuYi 已提交
773
            <!--
774 775 776 777 778 779 780 781
              Even if Maven transitively pulls in dependencies, relying on these can
              quite often cause hard to find problems. So it's a good practice to make
              sure everything directly required is also directly added as a dependency.
              On the other side adding unused dependency only over-complicates the
              the dependency graph, so the maven-dependency-plugin checks we depend on
              what we need and only that and that runtime dependencies are correctly
              imported with runtime scope.
            -->
X
XuYi 已提交
782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>check-dependencies</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>analyze-only</goal>
                        </goals>
                        <configuration>
                            <failOnWarning>false</failOnWarning>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
                <version>2.8.1</version>
            </plugin>
            <!--for code style check -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
807 808 809 810 811
                <version>3.0.0</version>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
812
                        <version>8.18</version>
813 814
                    </dependency>
                </dependencies>
X
XuYi 已提交
815 816 817 818 819 820 821 822
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
823
                            <outputFile>target/checkstyle-report.xml</outputFile>
X
XuYi 已提交
824 825 826 827
                            <configLocation>checkstyle.xml</configLocation>
                        </configuration>
                    </execution>
                </executions>
828 829 830
                <configuration>
                    <configLocation>checkstyle.xml</configLocation>
                </configuration>
X
XuYi 已提交
831 832
            </plugin>
            <!--
833 834 835
              Check if all files contain Apache headers in them.
              Ignore this plugin, we use license-maven-plugin to check apache header.
            -->
836 837 838 839 840 841 842 843 844 845 846 847 848
            <plugin>
                <groupId>org.apache.rat</groupId>
                <artifactId>apache-rat-plugin</artifactId>
                <executions>
                    <execution>
                        <id>license-check</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
X
XuYi 已提交
849 850 851 852 853 854 855 856 857 858 859 860 861 862
            <plugin>
                <groupId>au.com.acegi</groupId>
                <artifactId>xml-format-maven-plugin</artifactId>
                <version>3.0.7</version>
                <executions>
                    <execution>
                        <id>xml-format</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>xml-format</goal>
                        </goals>
                        <configuration>
                            <!-- configure your formatting preferences here (see link below) -->
                            <indentSize>4</indentSize>
W
wshao08 已提交
863
                            <excludes>**/target/**</excludes>
X
XuYi 已提交
864 865 866 867 868
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!--
869 870
              Generate the legally required text files in the jars
            -->
X
XuYi 已提交
871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-remote-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>process-resource-bundles</id>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <configuration>
                            <resourceBundles>
                                <!-- Will generate META-INF/{DEPENDENCIES,LICENSE,NOTICE} -->
                                <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
                            </resourceBundles>
                            <!-- Content in this directory will be appended to generated resources -->
                            <appendedResourcesDirectory>${basedir}/src/remote-resources</appendedResourcesDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923
            <plugin>
                <!-- Separates the unit tests from the integration tests. -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unit-tests</id>
                        <phase>test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <includes>
                                <!-- Include unit tests within integration-test phase. -->
                                <include>src/test/**/*Test.java</include>
                            </includes>
                            <excludes>
                                <!-- Exclude integration tests within (unit) test phase. -->
                                <exclude>src/test/**/*IT.java</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>integration-tests</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <includes>
                                <!-- Include integration tests within integration-test phase. -->
                                <include>src/test/**/*IT.java</include>
                            </includes>
924 925 926 927
                            <excludes>
                                <!-- Exclude unit tests within (unit) test phase. -->
                                <exclude>src/test/**/*Test.java</exclude>
                            </excludes>
928 929 930 931
                        </configuration>
                    </execution>
                </executions>
            </plugin>
932 933 934 935 936 937 938 939 940 941 942 943 944 945 946
            <!-- Also package the sources as jar -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>create-source-package</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
X
XuYi 已提交
947 948 949
        </plugins>
    </build>
    <profiles>
950
        <!-- spotless is too slow, so we put it into a profile to skip it if needed -->
951
        <!-- currently spotless cannot run on jdk16, due to JEP 396: Strongly Encapsulate JDK Internals by Default-->
952 953 954 955
        <profile>
            <id>spotless</id>
            <activation>
                <!-- activeByDefault does not take effect-->
956
                <jdk>[1.8,16)</jdk>
957 958 959 960 961 962 963 964 965 966 967 968 969
                <file>
                    <exists>.</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.diffplug.spotless</groupId>
                        <artifactId>spotless-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
X
XuYi 已提交
970
        <!--
971 972 973
          A set of profiles defining the different properties needed to download and run thrift
          They are automatically activated depending on the OS you are using.
        -->
X
XuYi 已提交
974 975 976 977 978 979 980 981
        <profile>
            <id>windows</id>
            <activation>
                <os>
                    <family>windows</family>
                </os>
            </activation>
            <properties>
982
                <os.classifier>windows-x86_64</os.classifier>
X
XuYi 已提交
983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998
                <thrift.download-url>http://artfiles.org/apache.org/thrift/${thrift.version}/thrift-${thrift.version}.exe</thrift.download-url>
                <thrift.executable>thrift-${thrift.version}-win-x86_64.exe</thrift.executable>
                <thrift.skip-making-executable>true</thrift.skip-making-executable>
                <thrift.exec-cmd.executable>echo</thrift.exec-cmd.executable>
                <thrift.exec-cmd.args>"Do nothing"</thrift.exec-cmd.args>
            </properties>
        </profile>
        <!-- Has to be listed before "mac" as it seems a mac is both "mac" and "unix" -->
        <profile>
            <id>unix</id>
            <activation>
                <os>
                    <family>unix</family>
                </os>
            </activation>
            <properties>
999
                <os.classifier>linux-x86_64</os.classifier>
1000 1001
                <thrift.download-url>https://github.com/apache/iotdb-bin-resources/raw/main/compile-tools/thrift-0.14-ubuntu</thrift.download-url>
                <thrift.executable>thrift_0.14.1_linux.exe</thrift.executable>
X
XuYi 已提交
1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014
                <thrift.skip-making-executable>false</thrift.skip-making-executable>
                <thrift.exec-cmd.executable>chmod</thrift.exec-cmd.executable>
                <thrift.exec-cmd.args>+x ${project.build.directory}/tools/${thrift.executable}</thrift.exec-cmd.args>
            </properties>
        </profile>
        <profile>
            <id>mac</id>
            <activation>
                <os>
                    <family>mac</family>
                </os>
            </activation>
            <properties>
1015
                <os.classifier>mac-x86_64</os.classifier>
1016 1017
                <thrift.download-url>https://github.com/apache/iotdb-bin-resources/raw/main/compile-tools/thrift-0.14-MacOS</thrift.download-url>
                <thrift.executable>thrift_0.14.1_mac.exe</thrift.executable>
X
XuYi 已提交
1018 1019 1020 1021 1022
                <thrift.skip-making-executable>false</thrift.skip-making-executable>
                <thrift.exec-cmd.executable>chmod</thrift.exec-cmd.executable>
                <thrift.exec-cmd.args>+x ${project.build.directory}/tools/${thrift.executable}</thrift.exec-cmd.args>
            </properties>
        </profile>
1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046
        <!-- for TestContainer. As it requires docker, we have to detect whether docker exists.-->
        <profile>
            <!-- Mac and Unix-->
            <id>unixDockerCheck</id>
            <activation>
                <file>
                    <exists>/var/run/docker.sock</exists>
                </file>
            </activation>
            <modules>
                <module>testcontainer</module>
            </modules>
        </profile>
        <profile>
            <id>WinDockerCheck</id>
            <activation>
                <file>
                    <exists>C:\Program Files\Docker\Docker\resources\bin\docker.exe</exists>
                </file>
            </activation>
            <modules>
                <module>testcontainer</module>
            </modules>
        </profile>
1047 1048 1049 1050 1051 1052 1053
        <!-- Some APIs were removed in Java 11, so we need to add replacements -->
        <profile>
            <id>java-11-and-above</id>
            <activation>
                <!-- This needs to be updated as soon as Java 20 is shipped -->
                <jdk>[11,20)</jdk>
            </activation>
1054 1055 1056
            <properties>
                <maven.compiler.release>8</maven.compiler.release>
            </properties>
1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072
            <dependencies>
                <!-- for jdk-11 -->
                <dependency>
                    <groupId>javax.annotation</groupId>
                    <artifactId>javax.annotation-api</artifactId>
                </dependency>
                <dependency>
                    <groupId>javax.xml.bind</groupId>
                    <artifactId>jaxb-api</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.glassfish.jaxb</groupId>
                    <artifactId>jaxb-runtime</artifactId>
                </dependency>
            </dependencies>
        </profile>
1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085
        <!-- Add argLine for Java 16 and above, due to [JEP 396: Strongly Encapsulate JDK Internals by Default]
          (https://openjdk.java.net/jeps/396) -->
        <profile>
            <id>java-16-and-above</id>
            <activation>
                <!-- This needs to be updated as soon as Java 20 is shipped -->
                <jdk>[16,20)</jdk>
            </activation>
            <properties>
                <maven.compiler.release>8</maven.compiler.release>
                <argLine>--illegal-access=permit --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</argLine>
            </properties>
        </profile>
X
XuYi 已提交
1086
        <!--
1087 1088 1089
          Self activating profile, that activates itself as soon as a "src/main/thrift" directory is found.
          The different plugins here download the thrift executable matching the current os, make that
          executable (on mac and unix/linux) and run the code generation.
1090

1091 1092 1093 1094
          Note to the Download: The download-maven-plugin checks if a resource is previously downloaded
          and only downloads each file once. It caches downloaded files in:
          {maven local repo}/.cache/download-maven-plugin
        -->
X
XuYi 已提交
1095 1096 1097 1098 1099 1100 1101
        <profile>
            <id>thrift-generation</id>
            <activation>
                <file>
                    <exists>src/main/thrift</exists>
                </file>
            </activation>
1102 1103 1104
            <properties>
                <thrift.exec.absolute.path>${project.build.directory}/tools/${thrift.executable}</thrift.exec.absolute.path>
            </properties>
X
XuYi 已提交
1105 1106 1107 1108 1109
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.googlecode.maven-download-plugin</groupId>
                        <artifactId>download-maven-plugin</artifactId>
1110
                        <version>1.3.0</version>
X
XuYi 已提交
1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150
                        <executions>
                            <execution>
                                <id>get-thrift-executable</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <url>${thrift.download-url}</url>
                                    <outputDirectory>${project.build.directory}/tools</outputDirectory>
                                    <outputFileName>${thrift.executable}</outputFileName>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.6.0</version>
                        <executions>
                            <execution>
                                <id>make-thrift-executable-executable</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <skip>${thrift.skip-making-executable}</skip>
                                    <executable>${thrift.exec-cmd.executable}</executable>
                                    <commandlineArgs>${thrift.exec-cmd.args}</commandlineArgs>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.thrift.tools</groupId>
                        <artifactId>maven-thrift-plugin</artifactId>
                        <version>0.1.11</version>
                        <executions>
                            <execution>
1151
                                <id>generate-thrift-sources-java</id>
X
XuYi 已提交
1152 1153 1154 1155 1156 1157
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>compile</goal>
                                </goals>
                                <configuration>
                                    <generator>java</generator>
1158
                                    <thriftExecutable>${thrift.exec.absolute.path}</thriftExecutable>
X
XuYi 已提交
1159 1160 1161
                                    <thriftSourceRoot>${basedir}/src/main/thrift</thriftSourceRoot>
                                </configuration>
                            </execution>
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171
                            <execution>
                                <id>generate-thrift-sources-python</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>compile</goal>
                                </goals>
                                <configuration>
                                    <generator>py</generator>
                                    <thriftExecutable>${thrift.exec.absolute.path}</thriftExecutable>
                                    <thriftSourceRoot>${basedir}/src/main/thrift</thriftSourceRoot>
S
SilverNarcissus 已提交
1172
                                    <outputDirectory>${project.build.directory}/generated-sources-python/</outputDirectory>
1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187
                                </configuration>
                            </execution>
                            <execution>
                                <id>generate-thrift-sources-go</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>compile</goal>
                                </goals>
                                <configuration>
                                    <generator>go</generator>
                                    <thriftExecutable>${thrift.exec.absolute.path}</thriftExecutable>
                                    <thriftSourceRoot>${basedir}/src/main/thrift</thriftSourceRoot>
                                    <outputDirectory>${project.build.directory}/generated-sources-go</outputDirectory>
                                </configuration>
                            </execution>
X
XuYi 已提交
1188 1189 1190 1191 1192
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
1193
        <!-- Make sure the source assembly has the right name -->
1194 1195 1196 1197 1198 1199 1200
        <profile>
            <id>apache-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
1201
                        <version>${maven.assembly.version}</version>
1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214
                        <executions>
                            <execution>
                                <id>source-release-assembly</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <!-- heads up: combine.self in the following is highlighted
                                    as an error in Eclipse's xml editor view.
                                    Just ignore that.
                                    See  https://issues.apache.org/jira/browse/MNG-5454  sigh.
                                 -->
                                <configuration combine.self="append">
1215
                                    <finalName>apache-iotdb-${project.version}</finalName>
1216 1217 1218 1219 1220 1221
                                    <archive>
                                        <manifest>
                                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                                        </manifest>
                                    </archive>
1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <!--
                      Create SHA512 checksum files for the release artifacts.
                    -->
                    <plugin>
                        <groupId>net.nicoulaj.maven.plugins</groupId>
                        <artifactId>checksum-maven-plugin</artifactId>
                        <version>1.8</version>
                        <executions>
                            <execution>
                                <id>sign-source-release</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>files</goal>
                                </goals>
                                <configuration>
                                    <algorithms>
                                        <algorithm>SHA-512</algorithm>
                                    </algorithms>
                                    <fileSets>
                                        <fileSet>
                                            <directory>${project.build.directory}</directory>
                                            <includes>
1248
                                                <include>apache-iotdb-${project.version}-source-release.zip</include>
1249 1250 1251 1252 1253
                                            </includes>
                                        </fileSet>
                                    </fileSets>
                                </configuration>
                            </execution>
1254 1255 1256 1257 1258
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
1259 1260 1261 1262 1263 1264 1265 1266
        <!-- enable site-->
        <!-- use `mvn package -P site -pl site` to compile the site module only -->
        <profile>
            <id>site</id>
            <modules>
                <module>site</module>
            </modules>
        </profile>
1267
        <!-- code coverage for ut and it, and then merge them together.-->
X
Xiangdong Huang 已提交
1268 1269
        <profile>
            <id>code-coverage</id>
1270 1271 1272
            <modules>
                <module>code-coverage</module>
            </modules>
X
Xiangdong Huang 已提交
1273 1274 1275 1276 1277 1278 1279 1280 1281
            <build>
                <plugins>
                    <!-- Jacoco is a code coverage analysis plugin when tests run.
                    (not a static code analysis tool)-->
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>0.8.5</version>
                        <configuration>
1282 1283 1284 1285 1286 1287
                            <excludes>
                                <exclude>org/apache/iotdb/service/sync/thrift/*</exclude>
                                <exclude>org/apache/iotdb/service/rpc/thrift/*</exclude>
                                <exclude>org/apache/iotdb/cluster/rpc/thrift/*</exclude>
                                <exclude>org/apache/iotdb/db/qp/sql/*</exclude>
                            </excludes>
X
Xiangdong Huang 已提交
1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315
                            <rules>
                                <rule implementation="org.jacoco.maven.RuleConfiguration">
                                    <element>BUNDLE</element>
                                    <limits>  
                                        <!-- Cover methodes >=30%. (the plugin does not support
                                        ignore getter and setter and toString etc..) -->
                                        <limit implementation="org.jacoco.report.check.Limit">
                                            <counter>METHOD</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.00</minimum>
                                        </limit>
                                        <!-- if-else, swtich etc.. >=70% -->
                                        <limit implementation="org.jacoco.report.check.Limit">
                                            <counter>BRANCH</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.00</minimum>
                                        </limit>
                                        <!-- class files >=95% -->
                                        <limit implementation="org.jacoco.report.check.Limit">
                                            <counter>CLASS</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.00</minimum>
                                        </limit>
                                    </limits>
                                </rule>
                            </rules>
                        </configuration>
                        <executions>
1316 1317
                            <!-- see https://natritmeyer.com/howto/reporting-aggregated-unit-and-integration-test-coverage-with-jacoco/-->
                            <!-- For UT-->
X
Xiangdong Huang 已提交
1318
                            <execution>
1319
                                <id>prepare-ut</id>
X
Xiangdong Huang 已提交
1320 1321 1322
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
1323
                                <configuration>
1324
                                    <destFile>${project.build.directory}/${project.build.finalName}-jacoco-unit-tests.exec</destFile>
1325 1326
                                    <propertyName>surefire.jacoco.args</propertyName>
                                </configuration>
X
Xiangdong Huang 已提交
1327 1328 1329
                            </execution>
                            <!-- attached to Maven test phase -->
                            <execution>
1330
                                <id>ut-report</id>
X
Xiangdong Huang 已提交
1331 1332 1333 1334 1335 1336
                                <phase>test</phase>
                                <goals>
                                    <goal>report</goal>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
1337
                                    <dataFile>${project.build.directory}/${project.build.finalName}-jacoco-unit-tests.exec</dataFile>
1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348
                                    <outputDirectory>${project.build.directory}/jacoco-unit-reports</outputDirectory>
                                </configuration>
                            </execution>
                            <!-- For IT-->
                            <execution>
                                <id>before-integration-test-execution</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                                <configuration>
1349
                                    <destFile>${project.build.directory}/${project.build.finalName}-jacoco-integration-tests.exec</destFile>
1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360
                                    <propertyName>failsafe.jacoco.args</propertyName>
                                </configuration>
                            </execution>
                            <execution>
                                <id>after-integration-test-execution</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>report</goal>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
1361
                                    <dataFile>${project.build.directory}/${project.build.finalName}-jacoco-integration-tests.exec</dataFile>
1362
                                    <outputDirectory>${project.build.directory}/jacoco-integration-reports</outputDirectory>
X
Xiangdong Huang 已提交
1363 1364
                                </configuration>
                            </execution>
1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379
                            <execution>
                                <id>merge-unit-and-integration</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>merge</goal>
                                </goals>
                                <configuration>
                                    <fileSets>
                                        <fileSet>
                                            <directory>${project.build.directory}/</directory>
                                            <includes>
                                                <include>*.exec</include>
                                            </includes>
                                        </fileSet>
                                    </fileSets>
1380
                                    <destFile>${project.build.directory}/${project.build.finalName}-merged.exec</destFile>
1381 1382 1383 1384 1385 1386 1387 1388 1389 1390
                                </configuration>
                            </execution>
                            <execution>
                                <id>create-merged-report</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>report</goal>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
1391 1392
                                    <dataFile>${project.build.directory}/${project.build.finalName}-merged.exec</dataFile>
                                    <outputDirectory>${project.build.directory}/jacoco-merged-reports</outputDirectory>
1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- overwrite argLine-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <argLine>@{surefire.jacoco.args} -Xmx1024m</argLine>
                        </configuration>
                    </plugin>
                    <!-- for IT-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <configuration>
                            <argLine>@{failsafe.jacoco.args} -Xmx1024m</argLine>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>integration-test</goal>
1416
                                    <goal>verify</goal>
1417 1418 1419 1420 1421 1422 1423 1424
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- upload code coverage report to coveralls.io-->
1425
        <!-- to enable coveralls locally, you need to get the repoToken from https://coveralls.io/github/apache/iotdb.
1426
             use `mvn post-integration-test -Pcode-coverage -DrepoToken=TOKEN`-->
1427
        <profile>
1428
            <id>enforce</id>
1429
            <properties>
1430
                <enforcer.skip>false</enforcer.skip>
1431
            </properties>
W
wshao08 已提交
1432
        </profile>
X
XuYi 已提交
1433
    </profiles>
X
xingtanzjr 已提交
1434
</project>