<?xml version="1.0" encoding="UTF-8"?>
<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>

  <prerequisites>
    <maven>3.0</maven>
  </prerequisites>

  <groupId>org.knowm.xchange</groupId>
  <artifactId>xchange-parent</artifactId>
  <version>5.1.0</version>
  <packaging>pom</packaging>

  <name>XChange</name>
  <description>XChange is a Java library providing a simple and consistent API for interacting with
    a diverse set of cryptocurrency exchanges.
  </description>

  <url>http://knowm.org/open-source/xchange</url>
  <inceptionYear>2012</inceptionYear>


  <organization>
    <name>Knowm Inc.</name>
    <url>http://knowm.org/open-source/xchange/</url>
  </organization>

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

    <version.java>1.8</version.java>
    <version.assertj>3.23.1</version.assertj>
    <version.commons.lang3>3.12.0</version.commons.lang3>
    <version.fasterxml>2.14.1</version.fasterxml>
    <version.github.mmazi>2.1.0</version.github.mmazi>
    <version.resilience4j>1.7.0</version.resilience4j>
    <version.junit>4.13.2</version.junit>
    <version.lombok>1.18.22</version.lombok>
    <version.knowm.xchart>3.8.2</version.knowm.xchart>
    <version.qos.logback>1.4.5</version.qos.logback>
    <version.reflections>0.10.2</version.reflections>
    <version.slf4j>2.0.6</version.slf4j>
    <version.crypto>5.0.0</version.crypto>
    <version.java-jwt>3.19.2</version.java-jwt>

    <skipIntegrationTests>true</skipIntegrationTests>
  </properties>

  <developers>
    <developer>
      <name>Tim Molter</name>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>MIT</name>
      <url>http://www.opensource.org/licenses/mit-license.php</url>
      <distribution>repo</distribution>
      <comments>All source code is under the MIT license.</comments>
    </license>
  </licenses>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/knowm/XChange/issues</url>
  </issueManagement>

  <distributionManagement>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>sonatype-nexus-staging</id>
      <name>Nexus Release Repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <downloadUrl>https://oss.sonatype.org/content/groups/public/org/knowm/xchange</downloadUrl>
  </distributionManagement>

  <scm>
    <connection>scm:git:git@github.com:knowm/XChange.git</connection>
    <developerConnection>scm:git:git@github.com:knowm/XChange.git</developerConnection>
    <url>git@github.com:knowm/XChange.git</url>
    <tag>xchange-5.1.0</tag>
  </scm>

  <modules>
    <module>xchange-bankera</module>
    <module>xchange-bibox</module>
    <module>xchange-binance</module>
    <module>xchange-bitbay</module>
    <module>xchange-bitcoinaverage</module>
    <module>xchange-bitcoincharts</module>
    <module>xchange-bitcoincore</module>
    <module>xchange-bitcoinde</module>
    <module>xchange-bitcointoyou</module>
    <module>xchange-bitfinex</module>
    <module>xchange-bitflyer</module>
    <module>xchange-bithumb</module>
    <module>xchange-ascendex</module>
    <module>xchange-bitmex</module>
    <module>xchange-bitso</module>
    <module>xchange-bitstamp</module>
    <module>xchange-bittrex</module>
    <module>xchange-bity</module>
    <module>xchange-bitz</module>
    <module>xchange-bl3p</module>
    <module>xchange-bleutrade</module>
    <module>xchange-blockchain</module>
    <module>xchange-btcc</module>
    <module>xchange-btcmarkets</module>
    <module>xchange-btcturk</module>
    <module>xchange-bybit</module>
    <module>xchange-ccex</module>
    <module>xchange-cexio</module>
    <module>xchange-coinbase</module>
    <module>xchange-coinbasepro</module>
    <module>xchange-coincheck</module>
    <module>xchange-coindeal</module>
    <module>xchange-coindirect</module>
    <module>xchange-coinjar</module>
    <module>xchange-coinegg</module>
    <module>xchange-coinex</module>
    <module>xchange-coinone</module>
    <module>xchange-coinfloor</module>
    <module>xchange-coingi</module>
    <module>xchange-coinmarketcap</module>
    <module>xchange-coinmate</module>
    <module>xchange-core</module>
    <module>xchange-cryptofacilities</module>
    <module>xchange-cryptowatch</module>
    <module>xchange-deribit</module>
    <module>xchange-dvchain</module>
    <module>xchange-dydx</module>
    <module>xchange-exmo</module>
    <module>xchange-examples</module>
    <module>xchange-ftx</module>
    <module>xchange-gateio</module>
    <module>xchange-globitex</module>
    <module>xchange-gemini</module>
    <module>xchange-hitbtc</module>
    <module>xchange-huobi</module>
    <module>xchange-idex</module>
    <module>xchange-independentreserve</module>
    <module>xchange-itbit</module>
    <module>xchange-koineks</module>
    <module>xchange-koinim</module>
    <module>xchange-kraken</module>
    <module>xchange-kucoin</module>
    <module>xchange-kuna</module>
    <module>xchange-lgo</module>
    <module>xchange-latoken</module>
    <module>xchange-livecoin</module>
    <module>xchange-luno</module>
    <module>xchange-lykke</module>
    <module>xchange-mercadobitcoin</module>
    <module>xchange-mexc</module>
    <module>xchange-okcoin</module>
    <module>xchange-okex</module>
    <module>xchange-openexchangerates</module>
    <module>xchange-paribu</module>
    <module>xchange-paymium</module>
    <module>xchange-poloniex</module>
    <module>xchange-quoine</module>
    <module>xchange-ripple</module>
    <module>xchange-serum</module>
    <module>xchange-simulated</module>
    <module>xchange-therock</module>
    <module>xchange-tradeogre</module>
    <module>xchange-truefx</module>
    <module>xchange-upbit</module>
    <module>xchange-vaultoro</module>
    <module>xchange-yobit</module>
    <module>xchange-zaif</module>
    <module>xchange-enigma</module>


    <module>xchange-stream-bankera</module>
    <module>xchange-stream-binance</module>
    <module>xchange-stream-bitfinex</module>
    <module>xchange-stream-bitflyer</module>
    <module>xchange-stream-bitmex</module>
    <module>xchange-stream-bitstamp</module>
    <module>xchange-stream-btcmarkets</module>
    <module>xchange-stream-cexio</module>
    <module>xchange-stream-coinbasepro</module>
    <module>xchange-stream-coinjar</module>
    <module>xchange-stream-coinmate</module>
    <module>xchange-stream-core</module>
    <module>xchange-stream-dydx</module>
    <module>xchange-stream-ftx</module>
    <module>xchange-stream-gateio</module>
    <module>xchange-stream-gemini</module>
    <module>xchange-stream-gemini-v2</module>
    <module>xchange-stream-hitbtc</module>
    <module>xchange-stream-huobi</module>
    <module>xchange-stream-kraken</module>
    <module>xchange-stream-lgo</module>
    <module>xchange-stream-okcoin</module>
    <module>xchange-stream-okex</module>
    <module>xchange-stream-poloniex2</module>
    <module>xchange-stream-serum</module>
    <module>xchange-stream-service-core</module>
    <module>xchange-stream-service-netty</module>
    <module>xchange-stream-service-pubnub</module>
    <module>xchange-stream-coincheck</module>
  </modules>

  <ciManagement>
    <url>https://travis-ci.org/github/knowm/XChange</url>
  </ciManagement>

  <repositories>
    <repository>
      <id>sonatype-oss-public</id>
      <url>https://oss.sonatype.org/content/groups/public/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <dependencyManagement>
    <dependencies>

      <!-- Rest client -->
      <dependency>
        <groupId>com.github.mmazi</groupId>
        <artifactId>rescu</artifactId>
        <version>${version.github.mmazi}</version>
        <exclusions>
          <exclusion>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>io.github.resilience4j</groupId>
        <artifactId>resilience4j-all</artifactId>
        <version>${version.resilience4j}</version>
      </dependency>

      <!--For String Joining, etc. -->
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>${version.commons.lang3}</version>
      </dependency>

      <!-- Charting -->
      <dependency>
        <groupId>org.knowm.xchart</groupId>
        <artifactId>xchart</artifactId>
        <version>${version.knowm.xchart}</version>
      </dependency>

      <!-- Reflections - java runtime metadata analysis for integration testing -->
      <dependency>
        <groupId>org.reflections</groupId>
        <artifactId>reflections</artifactId>
        <version>${version.reflections}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>com.fasterxml.jackson.dataformat</groupId>
        <artifactId>jackson-dataformat-csv</artifactId>
        <version>${version.fasterxml}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${version.fasterxml}</version>
      </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>${version.fasterxml}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>${version.fasterxml}</version>
        </dependency>
      <dependency>
        <groupId>org.web3j</groupId>
        <artifactId>crypto</artifactId>
        <version>${version.crypto}</version>
      </dependency>

      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>31.1-jre</version>
      </dependency>

      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>3.12.4</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>com.github.tomakehurst</groupId>
        <artifactId>wiremock-jre8</artifactId>
        <version>2.35.0</version>
        <scope>test</scope>
      </dependency>

      <!-- SLF4J implementation for use in examples -->
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>${version.qos.logback}</version>
      </dependency>

      <!-- Lombok for boilerplate -->
      <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>${version.lombok}</version>
        <scope>provided</scope>
      </dependency>

      <!-- jwt for auth -->
      <dependency>
        <groupId>com.auth0</groupId>
        <artifactId>java-jwt</artifactId>
        <version>${version.java-jwt}</version>
      </dependency>

      <!-- for streaming-->
      <dependency>
        <groupId>io.reactivex.rxjava2</groupId>
        <artifactId>rxjava</artifactId>
        <version>2.2.21</version>
      </dependency>
      <dependency>
        <groupId>com.pubnub</groupId>
        <artifactId>pubnub-gson</artifactId>
        <version>4.31.3</version>
      </dependency>
        <!-- Netty version compatible with service-wamp -->
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-all</artifactId>
            <version>4.1.86.Final</version>
        </dependency>

    </dependencies>

  </dependencyManagement>

  <!-- All children will have these dependencies -->
  <dependencies>
    <!-- Logging is through SLF4J -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${version.slf4j}</version>
    </dependency>

    <!-- javax APIs -->
    <dependency>
      <groupId>javax.annotation</groupId>
      <artifactId>javax.annotation-api</artifactId>
      <version>1.3.2</version>
    </dependency>

    <!-- SLF4J implementation for use in examples -->
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- JUnit for testing -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${version.junit}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${version.assertj}</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <profiles>
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
            <name>gpg.passphrase</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.0.1</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>

          <!-- Generates a source code JAR during package -->
          <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</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!-- Generates JavaDocs during package -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.4.1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <doclint>none</doclint>
                </configuration>
              </execution>
            </executions>
          </plugin>

        </plugins>
      </build>
    </profile>
  </profiles>

  <build>

    <plugins>
      <!-- Ensure compilation is done under Java 8 in all environments -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.10.1</version>
        <configuration>
          <source>${version.java}</source>
          <target>${version.java}</target>
          <showDeprecation>true</showDeprecation>
          <showWarnings>true</showWarnings>
        </configuration>
      </plugin>
      <!-- for deploying to Maven Central -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
        </configuration>
      </plugin>

      <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</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.4.1</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <quiet>true</quiet>
          <doclint>none</doclint>
          <source>${version.java}</source>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.0.0-M7</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>3.0.0-M7</version>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <skipTests>${skipIntegrationTests}</skipTests>
          <includes>
            <include>**/*Integration.java</include>
          </includes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.coveo</groupId>
        <artifactId>fmt-maven-plugin</artifactId>
        <version>2.13</version>
        <configuration>
          <filesNamePattern>.*\.java</filesNamePattern>
          <skip>false</skip>
        </configuration>
        <executions>
          <execution>
            <goals>
<!--              <goal>format</goal>-->
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

</project>

