<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>ai.platon.pulsar</groupId>
  <artifactId>gora-shaded-mongodb</artifactId>
  <name>Pulsar Gora Shaded MongoDB</name>
  <version>0.9</version>
  <description>Since gora-0.x requires mongo-java-driver while spring-boot-2.4.x does not support it,
    we make a shaded jar to hide mongo-java-driver.</description>
  <url>http://platon.ai</url>
  <inceptionYear>2014</inceptionYear>
  <developers>
    <developer>
      <name>Vincent Zhang</name>
      <email>ivincent.zhang@gmail.com</email>
      <organization>platon.ai</organization>
      <timezone>+8</timezone>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:https://github.com/platonai/gora-shaded-mongodb.git</connection>
    <developerConnection>scm:git:https://github.com/platonai/gora-shaded-mongodb</developerConnection>
    <tag>v0.9</tag>
    <url>https://github.com/platonai/gora-shaded-mongodb</url>
  </scm>
  <organization>
    <name>The Platon Data Engine</name>
    <url>http://platon.ai</url>
  </organization>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${version.maven-compiler-plugin}</version>
        <executions>
          <execution>
            <id>default-compile</id>
            <phase>none</phase>
          </execution>
          <execution>
            <id>default-testCompile</id>
            <phase>none</phase>
          </execution>
          <execution>
            <id>java-compile</id>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
          <execution>
            <id>java-test-compile</id>
            <phase>test-compile</phase>
            <goals>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <verbose>true</verbose>
          <fork>true</fork>
          <source>${javac.src.version}</source>
          <target>${javac.target.version}</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>${version.maven-clean-plugin}</version>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>${version.maven-shade-plugin}</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/license/**</exclude>
                    <exclude>META-INF/*</exclude>
                    <exclude>META-INF/maven/**</exclude>
                    <exclude>LICENSE</exclude>
                    <exclude>NOTICE</exclude>
                    <exclude>/*.txt</exclude>
                    <exclude>build.properties</exclude>
                  </excludes>
                </filter>
              </filters>
              <artifactSet>
                <includes>
                  <include>org.apache.gora:gora-core</include>
                  <include>org.apache.gora:gora-mongodb</include>
                  <include>com.mongodb:*</include>
                  <include>org.mongodb:*</include>
                  <include>org.bson:*</include>
                  <include>org.jdom:*</include>
                </includes>
              </artifactSet>
              <relocations>
                <relocation>
                  <pattern>org.mongodb</pattern>
                  <shadedPattern>shaded.org.mongodb</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.mongodb</pattern>
                  <shadedPattern>shaded.com.mongodb</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.bson</pattern>
                  <shadedPattern>shaded.org.bson</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.jdom</pattern>
                  <shadedPattern>shaded.org.jdom</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>platon-deploy</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-release-plugin</artifactId>
            <version>3.0.0-M5</version>
            <configuration>
              <tagNameFormat>v${project.parent.version}</tagNameFormat>
              <updateBranchVersions>false</updateBranchVersions>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <version>${version.maven-source-plugin}</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${version.maven-javadoc-plugin}</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <phase>package</phase>
                <goals>
                  <goal>javadoc</goal>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${version.maven-gpg-plugin}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <gpgArguments>
                <arg>--digest-algo=SHA512</arg>
              </gpgArguments>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.7</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <repositories>
    <repository>
      <id>Central</id>
      <url>https://repo1.maven.org/maven2/</url>
    </repository>
  </repositories>
  <dependencies>
    <dependency>
      <groupId>org.apache.gora</groupId>
      <artifactId>gora-compiler</artifactId>
      <version>0.9</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <artifactId>*</artifactId>
          <groupId>log4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>*</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.avro</groupId>
      <artifactId>avro</artifactId>
      <version>1.8.2</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <artifactId>commons-compress</artifactId>
          <groupId>org.apache.commons</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-common</artifactId>
      <version>2.7.2</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <artifactId>*</artifactId>
          <groupId>*</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>3.2.2</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
  <distributionManagement>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <version.maven-source-plugin>3.3.0</version.maven-source-plugin>
    <version.maven-compiler-plugin>3.8.1</version.maven-compiler-plugin>
    <javac.src.version>11</javac.src.version>
    <mongo.driver.version>3.12.8</mongo.driver.version>
    <version.maven-shade-plugin>3.4.1</version.maven-shade-plugin>
    <version.maven-gpg-plugin>3.1.0</version.maven-gpg-plugin>
    <avro.version>1.8.2</avro.version>
    <commons-collections.version>3.2.2</commons-collections.version>
    <javac.target.version>11</javac.target.version>
    <hadoop-2.version>2.7.2</hadoop-2.version>
    <gora.version>0.9</gora.version>
    <version.maven-clean-plugin>3.2.0</version.maven-clean-plugin>
    <version.maven-javadoc-plugin>3.5.0</version.maven-javadoc-plugin>
  </properties>
</project>
