pom.xml 25.7 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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
<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>
    <artifactId>root</artifactId>
    <version>0.8.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    <name>IoTDB Root</name>
    <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>
        <connection>scm:git:git://github.com/thulab/iotdb.git</connection>
        <developerConnection>scm:git:ssh://github.com:thulab/iotdb.git</developerConnection>
        <url>http://github.com/thulab/iotdb/tree/master</url>
        <tag>v0.8.0</tag>
    </scm>
    <!-- Properties Management -->
    <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>
        <scala.version>2.0.1</scala.version>
        <hadoop.version>2.7.3</hadoop.version>
        <junit.version>4.12</junit.version>
        <slf4j.version>1.7.12</slf4j.version>
        <logback.version>1.1.11</logback.version>
        <json.version>20140107</json.version>
        <joda.version>2.9.9</joda.version>
        <spark.version>2.0.1</spark.version>
        <common.io.version>2.5</common.io.version>
        <commons.collections4>4.0</commons.collections4>
        <thrift.version>0.9.3</thrift.version>
63 64 65 66
        <!-- URL of the ASF SonarQube server -->
        <sonar.host.url>https://builds.apache.org/analysis</sonar.host.url>
        <!-- Exclude all generated code -->
        <sonar.exclusions>**/generated-sources</sonar.exclusions>
X
XuYi 已提交
67
    </properties>
68 69 70 71 72
    <!--
        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 已提交
73 74
    <dependencyManagement>
        <dependencies>
75 76 77 78
            <!--
                in the subprojects, you have to claim logback again, because maybe
                someone in your dependences uses log4j lib.
            -->
X
XuYi 已提交
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 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
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
            </dependency>
            <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>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.10.19</version>
            <scope>test</scope>
        </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>
            <version>2.4.0-b180725.0427</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-runtime</artifactId>
            <version>2.4.0-b180725.0644</version>
        </dependency>
    </dependencies>
    <modules>
        <module>tsfile</module>
        <module>jdbc</module>
        <module>iotdb</module>
        <module>grafana</module>
        <module>service-rpc</module>
        <module>iotdb-cli</module>
        <!-- <module>hadoop</module> -->
        <!-- <module>spark</module> -->
    </modules>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <excludePackageNames>*thrift*</excludePackageNames>
                        <!--
149 150 151
                          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 已提交
152 153 154 155 156 157
                        <notimestamp>true</notimestamp>
                        <!--Don't fail the build, just because there were issues in the JavaDoc generation.-->
                        <failOnError>false</failOnError>
                    </configuration>
                </plugin>
                <!--
158 159 160
                  We need to increase the memory available to tests as we were
                  getting out-of-memory errors when building on windows machines.
                -->
X
XuYi 已提交
161 162 163 164
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
165
                        <argLine>-Xmx1024m</argLine>
X
XuYi 已提交
166 167
                    </configuration>
                </plugin>
168 169 170 171 172 173 174 175
                <!--
                    Plugin for doing the code analysis.
                -->
                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>3.6.0.1398</version>
                </plugin>
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 203 204 205
                <plugin>
                    <groupId>org.apache.rat</groupId>
                    <artifactId>apache-rat-plugin</artifactId>
                    <configuration>
                        <excludes>
                            <!-- Git related files -->
                            <exclude>**/.git/**</exclude>
                            <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>
                            <!-- licenses-binary -->
                            <exclude>licenses-binary/*</exclude>
                            <!-- generated by Github -->
                            <exclude>.github/**</exclude>
                            <!--Checkstyle files -->
                            <exclude>.checkstyle</exclude>
                            <!--Generated by Apache Release -->
                            <exclude>local-snapshots-dir/**</exclude>
                        </excludes>
                    </configuration>
                </plugin>
X
XuYi 已提交
206 207 208 209
            </plugins>
        </pluginManagement>
        <plugins>
            <!--
210 211 212 213
              Strange xthings 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.
            -->
X
XuYi 已提交
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 240 241 242 243 244 245 246 247 248 249
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.0.0-M1</version>
                <!--$NO-MVN-MAN-VER$-->
                <executions>
                    <!-- 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>
                </dependencies>
            </plugin>
            <!--
250 251 252 253 254 255 256 257
              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 已提交
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282
            <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>
283 284 285 286 287 288 289 290
                <version>3.0.0</version>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>8.16</version>
                    </dependency>
                </dependencies>
X
XuYi 已提交
291 292 293 294 295 296 297 298 299 300 301 302
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <configLocation>checkstyle.xml</configLocation>
                        </configuration>
                    </execution>
                </executions>
303 304 305
                <configuration>
                    <configLocation>checkstyle.xml</configLocation>
                </configuration>
X
XuYi 已提交
306
            </plugin>
307
            <!-- use mvn license:remove to remove license header; mvn license:format -->
X
xiangdong huang 已提交
308 309
            <!-- we do not recommend using the plugin because it maybe out of control
            (adding headers in some files that you do not want) -->
310
            <!--<plugin>
X
XuYi 已提交
311 312 313 314
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>3.0</version>
                <configuration>
315
                    <header>asf.header</header>
X
XuYi 已提交
316 317 318 319 320 321 322 323 324 325 326
                    <properties>
                        <owner>Apache IoTDB(incubating)</owner>
                        <email>dev@iotdb.apache.org</email>
                        <project.inceptionYear>2019</project.inceptionYear>
                    </properties>
                    <mapping>
                        <g>DOUBLESLASH_STYLE</g>
                        <thrift>SLASHSTAR_STYLE</thrift>
                    </mapping>
                    <excludes>
                        <exclude>**/README.md</exclude>
327 328 329
                        <exclude>**/src/test/resources/*.json</exclude>
                        <exclude>**/src/main/resources/*.json</exclude>
                        <exclude>jdbc/example/data/*.csv</exclude>
X
XuYi 已提交
330 331 332 333 334 335
                        <exclude>**/*.log</exclude>
                        <exclude>licenses-binary/*</exclude>
                        <exclude>.checkstyle</exclude>
                        <exclude>NOTICE*</exclude>
                        <exclude>LICENSE*</exclude>
                        <exclude>License</exclude>
336 337
                        <exclude>asf.header</exclude>
                        <exclude>**/iotdb/data/</exclude>
338
                        <exclude>local-snapshots-dir/**</exclude>
X
XuYi 已提交
339 340 341 342 343 344 345 346 347
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
X
xiangdong huang 已提交
348
            </plugin> -->
X
XuYi 已提交
349
            <!--
350 351 352
              Check if all files contain Apache headers in them.
              Ignore this plugin, we use license-maven-plugin to check apache header.
            -->
353
            <plugin>
X
xiangdong huang 已提交
354 355 356 357 358 359 360 361 362 363 364
                <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>
365
            </plugin>
X
XuYi 已提交
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 401 402 403 404 405 406 407 408 409
            <!--use `mvn cobertura:cobertura` -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <quiet>true</quiet>
                    <formats>
                        <format>xml</format>
                    </formats>
                    <instrumentation>
                        <ignoreTrivial>true</ignoreTrivial>
                    </instrumentation>
                </configuration>
                <executions>
                    <execution>
                        <id>check</id>
                        <!-- skip when executing 'mvn clean test' -->
                        <!-- <phase>test</phase> -->
                        <goals>
                            <goal>cobertura</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <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>
            <!--
410 411
              Generate the legally required text files in the jars
            -->
X
XuYi 已提交
412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437
            <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>
        </plugins>
    </build>
    <profiles>
        <!--
438 439 440
          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 已提交
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487
        <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>
                <thrift.download-url>https://github.com/ccascone/mvn-thrift-compiler/raw/1.0_${thrift.version}/exe/thrift-linux-x86_64.exe</thrift.download-url>
                <thrift.executable>thrift-${thrift.version}-unix-x86_64</thrift.executable>
                <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>
                <thrift.download-url>https://github.com/ccascone/mvn-thrift-compiler/raw/1.0_${thrift.version}/exe/thrift-osx-x86_64.exe</thrift.download-url>
                <thrift.executable>thrift-${thrift.version}-osx-x86_64</thrift.executable>
                <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>
        <!--
488 489 490
          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.
491

492 493 494 495
          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 已提交
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 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 558 559 560 561 562 563 564 565
        <profile>
            <id>thrift-generation</id>
            <activation>
                <file>
                    <exists>src/main/thrift</exists>
                </file>
            </activation>
            <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>
                                <id>generate-thrift-sources</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>compile</goal>
                                </goals>
                                <configuration>
                                    <generator>java</generator>
                                    <thriftExecutable>${project.build.directory}/tools/${thrift.executable}</thriftExecutable>
                                    <thriftSourceRoot>${basedir}/src/main/thrift</thriftSourceRoot>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
X
xingtanzjr 已提交
566
</project>