pom.xml 55.8 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 27 28 29
<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>
        <version>21</version>
    </parent>
    <groupId>org.apache.iotdb</groupId>
30
    <artifactId>iotdb-parent</artifactId>
J
Jialin Qiao 已提交
31
    <version>0.10.0-SNAPSHOT</version>
X
XuYi 已提交
32
    <packaging>pom</packaging>
33
    <name>Apache IoTDB (incubating) 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/incubator-iotdb.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/apache/incubator-iotdb.git</developerConnection>
        <url>ssh://git@github.com:apache/incubator-iotdb.git</url>
J
Jialin Qiao 已提交
45
        <tag>rel/0.10</tag>
X
XuYi 已提交
46
    </scm>
47 48 49 50 51 52 53 54 55 56
    <modules>
        <module>tsfile</module>
        <module>service-rpc</module>
        <module>jdbc</module>
        <module>session</module>
        <module>client</module>
        <module>server</module>
        <module>example</module>
        <module>grafana</module>
        <module>spark-tsfile</module>
57
        <module>hadoop</module>
58
        <module>spark-iotdb-connector</module>
59
        <module>distribution</module>
J
Jackie Tien 已提交
60
        <module>hive-connector</module>
61
    </modules>
62
    <!-- Properties Management -->
X
XuYi 已提交
63 64 65 66
    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.assembly.version>2.5.5</maven.assembly.version>
67
        <scala.version>2.11.12</scala.version>
J
Jackie Tien 已提交
68 69
        <hadoop2.version>2.7.3</hadoop2.version>
        <hive2.version>2.3.6</hive2.version>
X
XuYi 已提交
70 71 72 73
        <junit.version>4.12</junit.version>
        <slf4j.version>1.7.12</slf4j.version>
        <logback.version>1.1.11</logback.version>
        <joda.version>2.9.9</joda.version>
74
        <spark.version>2.4.3</spark.version>
X
XuYi 已提交
75 76
        <common.io.version>2.5</common.io.version>
        <commons.collections4>4.0</commons.collections4>
77
        <thrift.version>0.13.0</thrift.version>
78
        <airline.version>0.8</airline.version>
79
        <jackson.version>2.10.0</jackson.version>
80
        <antlr4.version>4.7.1</antlr4.version>
81 82 83 84 85 86 87
        <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.lang.version>2.6</common.lang.version>
        <common.lang3.version>3.8.1</common.lang3.version>
        <common.logging.version>1.1.3</common.logging.version>
        <jline.version>2.14.5</jline.version>
88
        <jetty.version>9.4.24.v20191120</jetty.version>
89
        <metrics.version>3.2.6</metrics.version>
90
        <javax.xml.bind.version>2.4.0-b180725.0427</javax.xml.bind.version>
91
        <!-- URL of the ASF SonarQube server -->
X
Xiangdong Huang 已提交
92 93
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
        <sonar.organization>apache</sonar.organization>
94 95
        <!-- Exclude all generated code -->
        <sonar.exclusions>**/generated-sources</sonar.exclusions>
X
Xiangdong Huang 已提交
96 97
        <!-- By default, the argLine is empty-->
        <argLine></argLine>
X
XuYi 已提交
98
    </properties>
99 100 101 102 103
    <!--
        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 已提交
104 105
    <dependencyManagement>
        <dependencies>
106 107 108 109
            <!--
                in the subprojects, you have to claim logback again, because maybe
                someone in your dependences uses log4j lib.
            -->
X
XuYi 已提交
110 111 112 113 114
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
            </dependency>
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 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
            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>fastjson</artifactId>
                <version>1.2.31</version>
            </dependency>
            <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.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <version>3.0.2</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>21.0</version>
            </dependency>
            <dependency>
                <groupId>com.sun.istack</groupId>
                <artifactId>istack-commons-runtime</artifactId>
                <version>3.0.8</version>
            </dependency>
            <dependency>
                <groupId>com.sun.xml.fastinfoset</groupId>
                <artifactId>FastInfoset</artifactId>
                <version>1.2.16</version>
            </dependency>
            <dependency>
                <groupId>commons-lang</groupId>
                <artifactId>commons-lang</artifactId>
                <version>${common.lang.version}</version>
            </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>
203
                <version>4.1.42.Final</version>
204 205 206 207 208 209 210 211 212
            </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>
213
                <version>${javax.xml.bind.version}</version>
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229
            </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>
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254
            <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>
255 256 257 258 259 260 261 262 263 264 265 266 267 268
            <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>
269 270
                <artifactId>antlr4-runtime</artifactId>
                <version>${antlr4.version}</version>
271 272 273 274 275 276 277 278 279 280 281 282 283 284
            </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 已提交
285 286 287 288 289 290 291 292 293 294 295
                <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>
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 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
            </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>
                <version>2.4.0-b180725.0644</version>
                <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>
                <version>1.7.25</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jul-to-slf4j</artifactId>
                <version>1.7.25</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.7.25</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>1.7.25</version>
            </dependency>
            <dependency>
                <groupId>org.xerial.snappy</groupId>
                <artifactId>snappy-java</artifactId>
401
                <version>1.1.7.2</version>
402
            </dependency>
X
XuYi 已提交
403 404 405 406 407 408 409 410 411 412 413 414 415 416 417
            <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>
418 419 420 421 422
            <dependency>
                <groupId>io.airlift</groupId>
                <artifactId>airline</artifactId>
                <version>${airline.version}</version>
            </dependency>
X
XuYi 已提交
423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <pluginManagement>
            <plugins>
440 441 442 443 444 445 446 447 448 449
                <!-- 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 已提交
450 451 452 453 454 455
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <excludePackageNames>*thrift*</excludePackageNames>
                        <!--
456 457 458
                          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 已提交
459 460 461 462 463 464
                        <notimestamp>true</notimestamp>
                        <!--Don't fail the build, just because there were issues in the JavaDoc generation.-->
                        <failOnError>false</failOnError>
                    </configuration>
                </plugin>
                <!--
465 466 467
                  We need to increase the memory available to tests as we were
                  getting out-of-memory errors when building on windows machines.
                -->
X
XuYi 已提交
468 469 470 471
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
X
Xiangdong Huang 已提交
472
                        <argLine>${argLine} -Xmx1024m</argLine>
X
XuYi 已提交
473 474
                    </configuration>
                </plugin>
475 476 477 478 479 480
                <!--
                    Plugin for doing the code analysis.
                -->
                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
X
Xiangdong Huang 已提交
481
                    <version>3.6.1.1688</version>
482
                </plugin>
483 484 485 486
                <plugin>
                    <groupId>org.apache.rat</groupId>
                    <artifactId>apache-rat-plugin</artifactId>
                    <configuration>
487
                        <consoleOutput>true</consoleOutput>
488 489 490
                        <excludes>
                            <!-- Git related files -->
                            <exclude>**/.git/**</exclude>
Q
qiaojialin 已提交
491
                            <exclude>**/.mvn/**</exclude>
492 493 494 495 496 497 498 499 500 501 502 503
                            <exclude>**/.gitignore</exclude>
                            <!-- 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>
504 505
                            <!-- Exclude CVS files -->
                            <exclude>**/*.cvs</exclude>
铁头乔's avatar
铁头乔 已提交
506 507
                            <!-- licenses -->
                            <exclude>licenses/*</exclude>
508 509 510 511
                            <!-- generated by Github -->
                            <exclude>.github/**</exclude>
                            <!--Generated by Apache Release -->
                            <exclude>local-snapshots-dir/**</exclude>
512 513
                            <!-- JSON can't contain comments and therefore no Apache header -->
                            <exclude>*.json</exclude>
J
Jiang Tian 已提交
514 515
                            <!-- visualization plans -->
                            <exclude>**/*.plan</exclude>
516 517
                            <exclude>NOTICE-binary</exclude>
                            <exclude>LICENSE-binary</exclude>
518 519 520
                        </excludes>
                    </configuration>
                </plugin>
X
XuYi 已提交
521 522 523 524
            </plugins>
        </pluginManagement>
        <plugins>
            <!--
525 526 527 528 529 530 531 532
              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 已提交
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557
            <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>
558 559 560 561 562
                <version>3.0.0</version>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
563
                        <version>8.18</version>
564 565
                    </dependency>
                </dependencies>
X
XuYi 已提交
566 567 568 569 570 571 572 573 574 575 576 577
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <configLocation>checkstyle.xml</configLocation>
                        </configuration>
                    </execution>
                </executions>
578 579 580
                <configuration>
                    <configLocation>checkstyle.xml</configLocation>
                </configuration>
X
XuYi 已提交
581 582
            </plugin>
            <!--
583 584 585
              Check if all files contain Apache headers in them.
              Ignore this plugin, we use license-maven-plugin to check apache header.
            -->
586 587 588 589 590 591 592 593 594 595 596 597 598
            <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 已提交
599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617
            <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>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!--
618 619
              Generate the legally required text files in the jars
            -->
X
XuYi 已提交
620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641
            <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>
                                <!-- Will generate META-INF/DISCLAIMER  -->
                                <resourceBundle>org.apache:apache-incubator-disclaimer-resource-bundle:1.1</resourceBundle>
                            </resourceBundles>
                            <!-- Content in this directory will be appended to generated resources -->
                            <appendedResourcesDirectory>${basedir}/src/remote-resources</appendedResourcesDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678
            <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>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
X
XuYi 已提交
679 680 681 682
        </plugins>
    </build>
    <profiles>
        <!--
683 684 685
          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 已提交
686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709
        <profile>
            <id>windows</id>
            <activation>
                <os>
                    <family>windows</family>
                </os>
            </activation>
            <properties>
                <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>
710 711
                <thrift.download-url>https://github.com/jt2594838/mvn-thrift-compiler/raw/master/thrift_0.12.0_0.13.0_linux.exe</thrift.download-url>
                <thrift.executable>thrift_0.12.0_0.13.0_linux.exe</thrift.executable>
X
XuYi 已提交
712 713 714 715 716 717 718 719 720 721 722 723 724
                <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>
725 726
                <thrift.download-url>https://github.com/jt2594838/mvn-thrift-compiler/raw/master/thrift_0.12.0_0.13.0_mac.exe</thrift.download-url>
                <thrift.executable>thrift_0.12.0_0.13.0_mac.exe</thrift.executable>
X
XuYi 已提交
727 728 729 730 731
                <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>
732 733 734 735 736 737 738
        <!-- 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>
739 740 741
            <properties>
                <maven.compiler.release>8</maven.compiler.release>
            </properties>
742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757
            <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>
X
XuYi 已提交
758
        <!--
759 760 761
          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.
762

763 764 765 766
          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 已提交
767 768 769 770 771 772 773
        <profile>
            <id>thrift-generation</id>
            <activation>
                <file>
                    <exists>src/main/thrift</exists>
                </file>
            </activation>
774 775 776
            <properties>
                <thrift.exec.absolute.path>${project.build.directory}/tools/${thrift.executable}</thrift.exec.absolute.path>
            </properties>
X
XuYi 已提交
777 778 779 780 781 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 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.googlecode.maven-download-plugin</groupId>
                        <artifactId>download-maven-plugin</artifactId>
                        <version>1.4.0</version>
                        <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>
823
                                <id>generate-thrift-sources-java</id>
X
XuYi 已提交
824 825 826 827 828 829
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>compile</goal>
                                </goals>
                                <configuration>
                                    <generator>java</generator>
830
                                    <thriftExecutable>${thrift.exec.absolute.path}</thriftExecutable>
X
XuYi 已提交
831 832 833
                                    <thriftSourceRoot>${basedir}/src/main/thrift</thriftSourceRoot>
                                </configuration>
                            </execution>
834 835 836 837 838 839 840 841 842 843
                            <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>
844
                                    <outputDirectory>${project.build.directory}/generated-sources-python/iotdb</outputDirectory>
845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872
                                </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>
                            <execution>
                                <id>generate-thrift-sources-cpp</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>compile</goal>
                                </goals>
                                <configuration>
                                    <generator>cpp</generator>
                                    <thriftExecutable>${thrift.exec.absolute.path}</thriftExecutable>
                                    <thriftSourceRoot>${basedir}/src/main/thrift</thriftSourceRoot>
                                    <outputDirectory>${project.build.directory}/generated-sources-cpp</outputDirectory>
                                </configuration>
                            </execution>
X
XuYi 已提交
873 874 875 876 877
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
878 879 880 881 882 883 884 885 886 887 888 889 890 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 924 925 926
        <!-- Make sure the source assembly has the right name (includes "incubating") -->
        <profile>
            <id>apache-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <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">
                                    <finalName>apache-iotdb-${project.version}-incubating</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>
                        <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>
                                                <include>apache-iotdb-${project.version}-incubating-source-release.zip</include>
927 928 929 930 931
                                            </includes>
                                        </fileSet>
                                    </fileSets>
                                </configuration>
                            </execution>
932 933
                        </executions>
                    </plugin>
934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013
                    <!--
                      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>
                                <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>
1014 1015 1016
                </plugins>
            </build>
        </profile>
1017
        <!-- code coverage for ut and it, and then merge them together.-->
X
Xiangdong Huang 已提交
1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056
        <profile>
            <id>code-coverage</id>
            <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>
                            <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>
1057 1058
                            <!-- see https://natritmeyer.com/howto/reporting-aggregated-unit-and-integration-test-coverage-with-jacoco/-->
                            <!-- For UT-->
X
Xiangdong Huang 已提交
1059
                            <execution>
1060
                                <id>prepare-ut</id>
X
Xiangdong Huang 已提交
1061 1062 1063
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
1064 1065 1066 1067
                                <configuration>
                                    <destFile>${project.build.directory}/jacoco-unit-tests.exec</destFile>
                                    <propertyName>surefire.jacoco.args</propertyName>
                                </configuration>
X
Xiangdong Huang 已提交
1068 1069 1070
                            </execution>
                            <!-- attached to Maven test phase -->
                            <execution>
1071
                                <id>ut-report</id>
X
Xiangdong Huang 已提交
1072 1073 1074 1075 1076 1077
                                <phase>test</phase>
                                <goals>
                                    <goal>report</goal>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104
                                    <dataFile>${project.build.directory}/jacoco-unit-tests.exec</dataFile>
                                    <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>
                                    <destFile>${project.build.directory}/jacoco-integration-tests.exec</destFile>
                                    <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>
                                    <dataFile>${project.build.directory}/jacoco-integration-tests.exec</dataFile>
                                    <outputDirectory>${project.build.directory}/jacoco-integration-reports</outputDirectory>
X
Xiangdong Huang 已提交
1105 1106
                                </configuration>
                            </execution>
1107 1108 1109 1110 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 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183
                            <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>
                                    <destFile>${project.build.directory}/merged.exec</destFile>
                                </configuration>
                            </execution>
                            <execution>
                                <id>create-merged-report</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>report</goal>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
                                    <dataFile>${project.build.directory}/merged.exec</dataFile>
                                </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>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- upload code coverage report to coveralls.io-->
        <!-- to enable coveralls locally, you need to get the repoToken from https://coveralls.io/github/apache/incubator-iotdb.
             use `mvn post-integration-test -pl hadoop  -Pcode-coverage -Pcoveralls -DrepoToken=TOKEN`-->
        <profile>
            <id>coveralls</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.eluder.coveralls</groupId>
                        <artifactId>coveralls-maven-plugin</artifactId>
                        <version>4.3.0</version>

                        <executions>
                            <execution>
                                <id>report to coveralls</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
X
Xiangdong Huang 已提交
1184 1185 1186 1187 1188
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
X
XuYi 已提交
1189
    </profiles>
X
xingtanzjr 已提交
1190
</project>