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

    <groupId>com.huaweicloud.dws</groupId>
    <artifactId>huaweicloud-dws-connectors-parent</artifactId>
    <url>https://www.huaweicloud.com/product/dws.html</url>
    <licenses>
        <license>
            <name>Huawei Cloud</name>
            <url>https://www.huaweicloud.com/</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>dws</name>
        </developer>
    </developers>
    <scm>
        <connection>
            https://www.huaweicloud.com/product/dws.html
        </connection>
        <developerConnection>
            https://www.huaweicloud.com/product/dws.html
        </developerConnection>
        <url>https://www.huaweicloud.com/product/dws.html</url>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>releases</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>releases</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <version>1.0</version>
    <modules>
        <module>dws-client</module>
        <module>dws-connector-flink</module>
    </modules>
    <packaging>pom</packaging>

    <properties>
        <easymock.version>4.2</easymock.version>
        <dws.jdbc.version>8.2.0-200</dws.jdbc.version>
        <lombok.version>1.18.22</lombok.version>
        <java.version>1.8</java.version>
        <testng.version>7.5</testng.version>
        <junit.version>4.13.1</junit.version>
        <slf4j-api.version>1.7.15</slf4j-api.version>
        <log4j.version>2.17.1</log4j.version>
        <caffeine.version>2.9.3</caffeine.version>
        <dws-connector.version>1.0</dws-connector.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <fastjson.version>2.0.20</fastjson.version>
    </properties>

    <name>dws-connectors</name>
    <description>connectors for dws</description>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.huaweicloud.dws</groupId>
                <artifactId>huaweicloud-dws-jdbc</artifactId>
                <version>${dws.jdbc.version}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>${testng.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <scope>compile</scope>
                <version>${lombok.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j-api.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>${log4j.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>${log4j.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-slf4j-impl</artifactId>
                <version>${log4j.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.github.ben-manes.caffeine</groupId>
                <artifactId>caffeine</artifactId>
                <version>${caffeine.version}</version>
            </dependency>
            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>fastjson</artifactId>
                <version>${fastjson.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <!-- The semantics of this option are reversed, see MCOMPILER-209. -->
                    <useIncrementalCompilation>false</useIncrementalCompilation>
                    <compilerArgs>
                        <!-- Prevents recompilation due to missing package-info.class, see MCOMPILER-205 -->
                        <arg>-Xpkginfo:always</arg>
                    </compilerArgs>
					<encoding>utf8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.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>2.9.1</version>
                <executions>
                    <execution>
                        <id>package</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
				<configuration>
					<charset>UTF-8</charset>
					<encoding>utf8</encoding>
					<docencoding>utf8</docencoding>
					<additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- GPG -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>