<?xml version="1.0" encoding="UTF-8"?>
<!--

    The MIT License

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.

-->
<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>

    <groupId>com.influxdb</groupId>
    <artifactId>influxdb-client</artifactId>
    <version>3.3.0</version>
    <packaging>pom</packaging>

    <modules>
        <module>client-utils</module>
        <module>client-test</module>
        <module>client-core</module>
        <module>client-legacy</module>
        <module>client</module>
        <module>client-reactive</module>
        <module>client-kotlin</module>
        <module>client-scala/cross/2.12</module>
        <module>client-scala/cross/2.13</module>
        <module>client-osgi</module>
        <module>karaf</module>
        <module>spring</module>
        <module>flux-dsl</module>
        <module>examples</module>
    </modules>

    <name>The InfluxDB 2.0 JVM Based Clients</name>
    <description>
        The reference JVM clients for the InfluxDB 2.0 - currently Java, Reactive, Kotlin and Scala clients are implemented.
    </description>

    <url>https://github.com/influxdata/influxdb-client-java</url>
    <inceptionYear>2018</inceptionYear>

    <organization>
        <name>InfluxData, Inc.</name>
        <url>https://influxdata.com</url>
    </organization>

    <licenses>
        <license>
            <name>The MIT License (MIT)</name>
            <url>https://raw.githubusercontent.com/influxdata/influxdb-client-java/master/LICENSE</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Jakub Bednar</name>
            <email>jakub.bednar@bonitoo.io</email>
            <organization>Bonitoo</organization>
            <organizationUrl>https://www.bonitoo.io</organizationUrl>
        </developer>
        <developer>
            <name>Robert Hajek</name>
            <email>robert.hajek@bonitoo.io</email>
            <organization>Bonitoo</organization>
            <organizationUrl>https://www.bonitoo.io</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:influxdata/influxdb-client-java.git</connection>
        <developerConnection>scm:git:git@github.com:influxdata/influxdb-client-java.git</developerConnection>
        <url>http://github.com/influxdata/influxdb-client-java/tree/master</url>
      <tag>v3.3.0</tag>
  </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <site>
            <id>GitHubPages</id>
            <url>https://influxdata.github.io/influxdb-client-java/</url>
        </site>
    </distributionManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <dependency.retrofit.version>2.9.0</dependency.retrofit.version>
        <dependency.okhttp3.version>4.7.2</dependency.okhttp3.version>
        <dependency.gson.version>2.8.8</dependency.gson.version>

        <plugin.surefire.version>2.22.2</plugin.surefire.version>
        <plugin.javadoc.version>3.2.0</plugin.javadoc.version>
        <plugin.checkstyle.version>3.1.1</plugin.checkstyle.version>
        <plugin.jacoco.version>0.8.7</plugin.jacoco.version>
        <plugin.site.version>3.9.0</plugin.site.version>
        <plugin.scala.version>3.4.4</plugin.scala.version>

        <kotlin.version>1.5.10</kotlin.version>
        <karaf.version>4.2.11</karaf.version>
        <junit-jupiter.version>5.6.2</junit-jupiter.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
        </dependency>
    </dependencies>

    <build>

        <plugins>
            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${plugin.javadoc.version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${plugin.checkstyle.version}</version>
                <configuration>
                    <failsOnError>true</failsOnError>
                    <configLocation>scripts/checkstyle.xml</configLocation>
                    <consoleOutput>true</consoleOutput>
                    <linkXRef>false</linkXRef>
                    <excludes>**/examples/**</excludes>
                    <resourceExcludes>**/influx2.properties</resourceExcludes>
                    <sourceDirectories>
                        <sourceDirectory>src/main/java</sourceDirectory>
                    </sourceDirectories>
                </configuration>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>checkstyle</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <header>scripts/license_header.txt</header>
                    <strictCheck>true</strictCheck>
                    <failIfUnknown>true</failIfUnknown>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                        <conf>SCRIPT_STYLE</conf>
                        <cnf>SCRIPT_STYLE</cnf>
                        <toml>SCRIPT_STYLE</toml>
                        <yml>SCRIPT_STYLE</yml>
                    </mapping>
                    <useDefaultExcludes>false</useDefaultExcludes>
                    <includes>**, **/META-INF/services/**</includes>
                    <excludes>**/target/**, **/*.jar, **/.git/**, **/.*, **/*.png, **/*.iml, **/*.bolt, .idea/**,
                        **/*nightly*/**, **/.m2/**, LICENSE, **/*.md, **/PLACEHOLDER, **/.influxdb/**, **/generated/**,
                        **/openapi-generator/**, **/swagger.yml, **/*.json, **/spring.factories, **/PULL_REQUEST_TEMPLATE,
                        release.properties/, **/pom.xml.releaseBackup, **/pom.xml.tag, **/semantic.yml, **/test.txt, **/*.csv,
                        codecov.yml
                    </excludes>
                    <properties>
                        <organizationName>${project.organization.name}</organizationName>
                    </properties>
                </configuration>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${plugin.surefire.version}</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>${plugin.surefire.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${plugin.jacoco.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                            <goal>prepare-agent-integration</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report-integration</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>report-integration</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>${plugin.site.version}</version>
                <configuration>
                    <siteDirectory>scripts/site/</siteDirectory>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <configuration>
                    <rulesUri>file://${project.basedir}/scripts/maven-version-rules.xml</rulesUri>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.0.0-M3</version>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.3.9</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>

        <pluginManagement>
            <plugins>

                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.8</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    </configuration>
                </plugin>
                
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>3.0</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.7</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.karaf.tooling</groupId>
                    <artifactId>karaf-maven-plugin</artifactId>
                    <version>${karaf.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <enableGeneration>true</enableGeneration>
                        <aggregateFeatures>true</aggregateFeatures>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>

            </plugins>
        </pluginManagement>

    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <dependencyDetailsEnabled>true</dependencyDetailsEnabled>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${plugin.javadoc.version}</version>
                <reportSets>
                    <reportSet>
                        <id>default</id>
                        <reports>
                            <report>javadoc</report>
                            <report>aggregate</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>${plugin.surefire.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${plugin.checkstyle.version}</version>
                <configuration>
                    <failsOnError>true</failsOnError>
                    <configLocation>scripts/checkstyle.xml</configLocation>
                    <consoleOutput>true</consoleOutput>
                    <linkXRef>false</linkXRef>
                    <excludes>**/example/**</excludes>
                    <resourceExcludes>**/influx2.properties</resourceExcludes>
                    <sourceDirectories>
                        <sourceDirectory>src/main/java</sourceDirectory>
                    </sourceDirectories>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${plugin.jacoco.version}</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>2.7</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>dependency-updates-report</report>
                            <report>plugin-updates-report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>
    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>com.influxdb</groupId>
                <artifactId>influxdb-client-test</artifactId>
                <version>3.3.0</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>com.influxdb</groupId>
                <artifactId>influxdb-client-core</artifactId>
                <version>3.3.0</version>
            </dependency>

            <dependency>
                <groupId>com.influxdb</groupId>
                <artifactId>influxdb-client-utils</artifactId>
                <version>3.3.0</version>
            </dependency>

            <dependency>
                <groupId>com.influxdb</groupId>
                <artifactId>influxdb-client-java</artifactId>
                <version>3.3.0</version>
            </dependency>

            <dependency>
                <groupId>com.influxdb</groupId>
                <artifactId>influxdb-client-reactive</artifactId>
                <version>3.3.0</version>
            </dependency>

            <dependency>
                <groupId>com.influxdb</groupId>
                <artifactId>influxdb-client-flux</artifactId>
                <version>3.3.0</version>
            </dependency>

            <dependency>
                <groupId>com.squareup.retrofit2</groupId>
                <artifactId>retrofit</artifactId>
                <version>${dependency.retrofit.version}</version>
            </dependency>

            <dependency>
                <groupId>com.squareup.retrofit2</groupId>
                <artifactId>converter-scalars</artifactId>
                <version>${dependency.retrofit.version}</version>
            </dependency>

            <dependency>
                <groupId>com.squareup.retrofit2</groupId>
                <artifactId>converter-gson</artifactId>
                <version>${dependency.retrofit.version}</version>
            </dependency>

            <dependency>
                <groupId>com.squareup.okio</groupId>
                <artifactId>okio</artifactId>
                <version>2.6.0</version>
            </dependency>

            <dependency>
                <groupId>com.squareup.okhttp3</groupId>
                <artifactId>okhttp</artifactId>
                <version>${dependency.okhttp3.version}</version>
            </dependency>

            <dependency>
                <groupId>com.squareup.okhttp3</groupId>
                <artifactId>logging-interceptor</artifactId>
                <version>${dependency.okhttp3.version}</version>
            </dependency>

            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${dependency.gson.version}</version>
            </dependency>

            <dependency>
                <groupId>io.swagger</groupId>
                <artifactId>swagger-annotations</artifactId>
                <version>1.6.1</version>
            </dependency>

            <dependency>
                <groupId>io.gsonfire</groupId>
                <artifactId>gson-fire</artifactId>
                <version>1.8.4</version>
            </dependency>

            <dependency>
                <groupId>io.reactivex.rxjava2</groupId>
                <artifactId>rxjava</artifactId>
                <version>2.2.19</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-csv</artifactId>
                <version>1.8</version>
            </dependency>

            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <version>3.0.2</version>
            </dependency>

            <dependency>
                <groupId>org.json</groupId>
                <artifactId>json</artifactId>
                <version>20200518</version>
            </dependency>

            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>${junit-jupiter.version}</version>
            </dependency>

            <dependency>
                <groupId>org.junit.platform</groupId>
                <artifactId>junit-platform-runner</artifactId>
                <version>1.6.2</version>
            </dependency>

            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest</artifactId>
                <version>2.2</version>
            </dependency>

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>3.9.0</version>
            </dependency>

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-junit-jupiter</artifactId>
                <version>3.9.0</version>
            </dependency>

            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>3.16.1</version>
            </dependency>

            <dependency>
                <groupId>com.squareup.okhttp3</groupId>
                <artifactId>mockwebserver</artifactId>
                <version>${dependency.okhttp3.version}</version>
            </dependency>

            <dependency>
                <groupId>com.moandjiezana.toml</groupId>
                <artifactId>toml4j</artifactId>
                <version>0.7.2</version>
            </dependency>

            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-stdlib</artifactId>
                <version>${kotlin.version}</version>
            </dependency>

            <dependency>
                <groupId>org.jetbrains.kotlinx</groupId>
                <artifactId>kotlinx-coroutines-core</artifactId>
                <version>1.3.7</version>
            </dependency>
            
        </dependencies>
    </dependencyManagement>

    <profiles>
        <!-- GPG Signature on release -->
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>bonitoo-repository</id>
            <name>Bonitoo.io repository</name>
            <url>https://apitea.com/nexus/content/repositories/bonitoo-snapshot/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>jcenter</id>
            <name>JCenter</name>
            <url>https://jcenter.bintray.com/</url>
        </pluginRepository>
    </pluginRepositories>

</project>
