<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>net.hasor</groupId>
        <artifactId>dbvisitor-parent</artifactId>
        <version>5.4.3</version>
    </parent>

    <artifactId>dbvisitor</artifactId>
    <packaging>jar</packaging>
    <name>dbVisitor</name>
    <description>
        dbVisitor is a full-featured access database tool,
        simplifies JDBC/ORM usage, and compatible with Spring JDBC, MyBatis style.
    </description>

    <developers>
        <developer>
            <name>赵永春(Mr.Zhao)</name>
            <email>zyc@hasor.net</email>
        </developer>
    </developers>

    <dependencies>
        <dependency>
            <groupId>net.hasor</groupId>
            <artifactId>cobble-all</artifactId>
        </dependency>
        <dependency>
            <groupId>ognl</groupId>
            <artifactId>ognl</artifactId>
            <version>3.3.4</version>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>
        <!-- typeHandler dependency -->
        <dependency>
            <groupId>org.locationtech.jts</groupId>
            <artifactId>jts-core</artifactId>
            <version>1.19.0</version>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>2.0.24</version>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.alibaba.fastjson2</groupId>
            <artifactId>fastjson2</artifactId>
            <version>2.0.24</version>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>

        <!-- test -->
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4</artifactId>
            <version>2.0.9</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito2</artifactId>
            <version>2.0.9</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.2.11</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>2.2.220</version>
            <scope>test</scope>
        </dependency>
        <!-- test drivers -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.33</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>42.5.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.oracle.database.jdbc</groupId>
            <artifactId>ojdbc8</artifactId>
            <version>21.5.0.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.oracle.database.xml</groupId>
            <artifactId>xdb</artifactId>
            <version>21.5.0.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.oracle.database.xml</groupId>
            <artifactId>xmlparserv2</artifactId>
            <version>21.5.0.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <version>11.2.0.jre8</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <createSourcesJar>true</createSourcesJar>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                            <minimizeJar>true</minimizeJar>
                            <artifactSet>
                                <includes>
                                    <include>ognl:ognl</include>
                                    <include>org.javassist:javassist</include>
                                </includes>
                            </artifactSet>
                            <relocations>
                                <relocation>
                                    <pattern>ognl</pattern>
                                    <shadedPattern>net.hasor.dbvisitor.jars.ognl</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>javassist</pattern>
                                    <shadedPattern>net.hasor.dbvisitor.jars.javassist</shadedPattern>
                                </relocation>
                            </relocations>
                            <filters>
                                <filter>
                                    <artifact>*:*</artifact>
                                    <excludes>
                                        <exclude>META-INF/maven/ognl/**</exclude>
                                        <exclude>META-INF/maven/org.javassist/**</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
