<?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>io.github.hslightdb</groupId>
  <artifactId>ltjdbc</artifactId>
  <name>PostgreSQL JDBC Driver - JDBC 4.2</name>
  <version>42.2.24-22.4.0.2</version>
  <description>Java JDBC 4.2 (JRE 8+) driver for PostgreSQL database</description>
  <url>https://github.com/hslightdb/pgjdbc</url>
  <developers>
    <developer>
      <id>zhuxudong</id>
      <email>zhuxd34513@hundsun.com</email>
      <roles>
        <role>Developer</role>
      </roles>
      <timezone>+8</timezone>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>BSD-2-Clause</name>
      <url>https://jdbc.postgresql.org/about/license.html</url>
    </license>
  </licenses>
  <scm>
    <connection>https://github.com/hslightdb/pgjdbc.git</connection>
    <url>https://github.com/hslightdb/pgjdbc</url>
  </scm>
  <organization>
    <url>https://www.hundsun.com/</url>
  </organization>
  <build>
    <plugins>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.7</version>
        <executions>
          <execution>
            <id>pre-test</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>post-test</id>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
            <configuration>
              <dataFile>target/jacoco.exec</dataFile>
              <outputDirectory>target/jacoco-ut</outputDirectory>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <includes>
            <include>com/**/*</include>
          </includes>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin.version}</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>${maven-shade-plugin.version}</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <transformers>
                <transformer />
              </transformers>
              <artifactSet>
                <includes>
                  <include>org.ehcache:ehcache</include>
                  <include>com.alibaba:druid</include>
                </includes>
              </artifactSet>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>test</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.6</version>
            <executions>
              <execution>
                <id>default-testResources</id>
                <phase>process-test-resources</phase>
                <goals>
                  <goal>testResources</goal>
                </goals>
              </execution>
              <execution>
                <id>default-resources</id>
                <phase>process-resources</phase>
                <goals>
                  <goal>resources</goal>
                </goals>
              </execution>
              <execution>
                <id>copy-and-filter-allatori-config</id>
                <phase>package</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <outputDirectory>D:\lightdb-all\LightDB\LightDB-DTS\trunk\Sources\LTSQL\ltjdbc/target</outputDirectory>
                  <resources>
                    <resource>
                      <directory>D:\lightdb-all\LightDB\LightDB-DTS\trunk\Sources\LTSQL\ltjdbc/allatori</directory>
                      <includes>
                        <include>allatori.xml</include>
                      </includes>
                      <filtering>true</filtering>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.6.0</version>
            <executions>
              <execution>
                <id>run-allatori</id>
                <phase>package</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <executable>java</executable>
                  <arguments>
                    <argument>-Xms128m</argument>
                    <argument>-Xmx1024m</argument>
                    <argument>-jar</argument>
                    <argument>D:\lightdb-all\LightDB\LightDB-DTS\trunk\Sources\LTSQL\ltjdbc/allatori/allatori.jar</argument>
                    <argument>D:\lightdb-all\LightDB\LightDB-DTS\trunk\Sources\LTSQL\ltjdbc/target/allatori.xml</argument>
                  </arguments>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <executable>java</executable>
              <arguments>
                <argument>-Xms128m</argument>
                <argument>-Xmx1024m</argument>
                <argument>-jar</argument>
                <argument>D:\lightdb-all\LightDB\LightDB-DTS\trunk\Sources\LTSQL\ltjdbc/allatori/allatori.jar</argument>
                <argument>D:\lightdb-all\LightDB\LightDB-DTS\trunk\Sources\LTSQL\ltjdbc/target/allatori.xml</argument>
              </arguments>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.22.2</version>
            <executions>
              <execution>
                <id>default-test</id>
                <phase>test</phase>
                <goals>
                  <goal>test</goal>
                </goals>
                <configuration>
                  <argLine>-Xmx1536m</argLine>
                  <systemPropertyVariables>
                    <build.properties.relative.path>.</build.properties.relative.path>
                  </systemPropertyVariables>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <argLine>-Xmx1536m</argLine>
              <systemPropertyVariables>
                <build.properties.relative.path>.</build.properties.relative.path>
              </systemPropertyVariables>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-jar-plugin</artifactId>
            <version>2.6</version>
            <executions>
              <execution>
                <id>default-jar</id>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <archive>
                    <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
                  </archive>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <archive>
                <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
              </archive>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-shade-plugin</artifactId>
            <version>3.1.0</version>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>shade</goal>
                </goals>
                <configuration>
                  <relocations>
                    <relocation>
                      <pattern>com.ongres</pattern>
                      <shadedPattern>org.postgresql.shaded.com.ongres</shadedPattern>
                    </relocation>
                  </relocations>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <artifactSet>
                <excludes>
                  <exclude>com.github.waffle:waffle-jna</exclude>
                  <exclude>org.slf4j:jcl-over-slf4j</exclude>
                </excludes>
              </artifactSet>
              <filters>
                <filter>
                  <artifact>com.ongres.scram:client</artifact>
                  <excludes>
                    <exclude>LICENSE</exclude>
                    <exclude>META-INF/maven/**</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>com/sun/jna/**</exclude>
                    <exclude>LICENSE</exclude>
                    <exclude>META-INF/maven/**</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.MF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                  </excludes>
                </filter>
              </filters>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.0.0</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <phase>package</phase>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
                <configuration>
                  <excludes>
                    <exclude>org/postgresql/**</exclude>
                  </excludes>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <excludes>
                <exclude>org/postgresql/**</exclude>
              </excludes>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.0.1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <doclint>none</doclint>
                  <show>package</show>
                  <tags>
                    <tag>
                      <name>date</name>
                    </tag>
                  </tags>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <show>package</show>
              <tags>
                <tag>
                  <name>date</name>
                </tag>
              </tags>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>oosrh</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <passphrase>zhuxd34513</passphrase>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.8</version>
            <extensions>true</extensions>
            <executions>
              <execution>
                <id>injected-nexus-deploy</id>
                <phase>deploy</phase>
                <goals>
                  <goal>deploy</goal>
                </goals>
                <configuration>
                  <serverId>oss-release</serverId>
                  <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                  <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <serverId>oss-release</serverId>
              <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <distributionManagement>
        <repository>
          <id>releases</id>
          <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
          <id>snapshots</id>
          <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
      </distributionManagement>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>com.ongres.scram</groupId>
      <artifactId>client</artifactId>
      <version>2.1</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>se.jiderhamn</groupId>
      <artifactId>classloader-leak-test-framework</artifactId>
      <version>1.1.1</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>bcel</artifactId>
          <groupId>org.apache.bcel</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>5.6.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>apiguardian-api</artifactId>
          <groupId>org.apiguardian</groupId>
        </exclusion>
        <exclusion>
          <artifactId>opentest4j</artifactId>
          <groupId>org.opentest4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-platform-commons</artifactId>
          <groupId>org.junit.platform</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <version>5.6.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>apiguardian-api</artifactId>
          <groupId>org.apiguardian</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>5.6.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>junit-platform-engine</artifactId>
          <groupId>org.junit.platform</groupId>
        </exclusion>
        <exclusion>
          <artifactId>apiguardian-api</artifactId>
          <groupId>org.apiguardian</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.junit.vintage</groupId>
      <artifactId>junit-vintage-engine</artifactId>
      <version>5.6.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>junit-platform-engine</artifactId>
          <groupId>org.junit.platform</groupId>
        </exclusion>
        <exclusion>
          <artifactId>apiguardian-api</artifactId>
          <groupId>org.apiguardian</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <properties>
    <maven-javadoc-plugin.version>3.0.1</maven-javadoc-plugin.version>
    <project.resources.sourceEncoding>${encoding}</project.resources.sourceEncoding>
    <encoding>UTF-8</encoding>
    <maven-shade-plugin.version>3.1.0</maven-shade-plugin.version>
    <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
    <maven-jar-plugin.version>2.6</maven-jar-plugin.version>
    <maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
    <project.reporting.outputEncoding>${encoding}</project.reporting.outputEncoding>
    <javac.target>1.8</javac.target>
    <project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
  </properties>
</project>

