<?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>
    <parent>
        <groupId>org.oxerr</groupId>
        <artifactId>oxerr-parent</artifactId>
        <version>2.2.1</version>
    </parent>
    <groupId>us.codecraft</groupId>
    <version>1.0.2</version>
    <packaging>pom</packaging>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <assertj.version>3.23.1</assertj.version>
        <commons-cli.version>1.5.0</commons-cli.version>
        <commons-collections4.version>4.4</commons-collections4.version>
        <commons-io.version>2.14.0</commons-io.version>
        <commons-lang3.version>3.12.0</commons-lang3.version>
        <fastjson.version>2.0.19.graal</fastjson.version>
        <groovy-all.version>3.0.13</groovy-all.version>
        <guava.version>32.0.0-jre</guava.version>
        <htmlcleaner.version>2.29</htmlcleaner.version>
        <httpclient.version>4.5.13</httpclient.version>
        <httpcore.version>4.4.15</httpcore.version>
        <jedis.version>3.7.1</jedis.version>
        <jruby.version>9.3.9.0</jruby.version>
        <json-path.version>2.9.0</json-path.version>
        <junit.version>5.10.2</junit.version>
        <junit.platform.version>1.10.2</junit.platform.version>
        <jython.version>2.7.3</jython.version>
        <log4j2.version>2.23.1</log4j2.version>
        <mockito-all.version>2.0.2-beta</mockito-all.version>
        <moco.version>1.3.0</moco.version>
        <phantomjsdriver.version>1.2.0</phantomjsdriver.version>
        <saxon-he.version>12.4</saxon-he.version>
        <selenium-java.version>4.14.1</selenium-java.version>
        <slf4j.version>2.0.4</slf4j.version>
        <spring-version>4.0.0.RELEASE</spring-version>
        <xsoup.version>0.3.5</xsoup.version>
    </properties>
    <artifactId>webmagic</artifactId>
    <name>webmagic</name>
    <description>
        A crawler framework. It covers the whole lifecycle of crawler: downloading, url management, content
        extraction and persistent. It can simply the development of a specific crawler.
    </description>
    <url>https://github.com/code4craft/webmagic/</url>
    <developers>
        <developer>
            <id>code4craft</id>
            <name>Yihua huang</name>
            <email>code4crafer@gmail.com</email>
        </developer>
        <developer>
            <id>yuany</id>
            <name>Ligang Yao</name>
            <email>ligang.yao@answers.com</email>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git@github.com:code4craft/webmagic.git</connection>
        <developerConnection>scm:git:git@github.com:code4craft/webmagic.git</developerConnection>
        <url>git@github.com:code4craft/webmagic.git</url>
        <tag>WebMagic-${project.version}</tag>
    </scm>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <modules>
        <module>webmagic-core</module>
        <module>webmagic-extension/</module>
        <module>webmagic-scripts/</module>
        <module>webmagic-selenium</module>
        <module>webmagic-saxon</module>
        <module>webmagic-samples</module>
        <module>webmagic-coverage</module>
    </modules>

    <dependencies>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j2-impl</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-runner</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>${mockito-all.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>${httpclient.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpcore</artifactId>
                <version>${httpcore.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>${log4j2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-slf4j2-impl</artifactId>
                <version>${log4j2.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>
            <dependency>
                <groupId>com.jayway.jsonpath</groupId>
                <artifactId>json-path</artifactId>
                <version>${json-path.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.vintage</groupId>
                <artifactId>junit-vintage-engine</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.platform</groupId>
                <artifactId>junit-platform-launcher</artifactId>
                <version>${junit.platform.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.platform</groupId>
                <artifactId>junit-platform-runner</artifactId>
                <version>${junit.platform.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>us.codecraft</groupId>
                <artifactId>xsoup</artifactId>
                <version>0.3.7</version>
            </dependency>
            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>fastjson</artifactId>
                <version>${fastjson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.dreamhead</groupId>
                <artifactId>moco-core</artifactId>
                <version>${moco.version}</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-simple</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons-lang3.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-collections4</artifactId>
                <version>${commons-collections4.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.groovy</groupId>
                <artifactId>groovy-all</artifactId>
                <version>${groovy-all.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jruby</groupId>
                <artifactId>jruby</artifactId>
                <version>${jruby.version}</version>
            </dependency>
            <dependency>
                <groupId>org.python</groupId>
                <artifactId>jython</artifactId>
                <version>${jython.version}</version>
            </dependency>
            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-java</artifactId>
                <version>${selenium-java.version}</version>
            </dependency>
            <dependency>
                <groupId>net.sf.saxon</groupId>
                <artifactId>Saxon-HE</artifactId>
                <version>${saxon-he.version}</version>
            </dependency>
            <dependency>
                <groupId>net.sourceforge.htmlcleaner</groupId>
                <artifactId>htmlcleaner</artifactId>
                <version>${htmlcleaner.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.detro</groupId>
                <artifactId>phantomjsdriver</artifactId>
                <version>${phantomjsdriver.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-cli</groupId>
                <artifactId>commons-cli</artifactId>
                <version>${commons-cli.version}</version>
            </dependency>
            <dependency>
                <groupId>redis.clients</groupId>
                <artifactId>jedis</artifactId>
                <version>${jedis.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <doctitle>WebMagic ${project.version}</doctitle>
                    <locale>en_US</locale>

                    <!-- avoid the issue: https://bugs.openjdk.java.net/browse/JDK-8212233 -->
                    <detectJavaApiLink>false</detectJavaApiLink>

                </configuration>
                <executions>
                    <execution>
                        <id>aggregate</id>
                        <goals>
                            <goal>aggregate</goal>
                        </goals>
                        <phase>site</phase>
                    </execution>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.amashchenko.maven.plugin</groupId>
                <artifactId>gitflow-maven-plugin</artifactId>
                <configuration>
                    <gitFlowConfig>
                        <versionTagPrefix>WebMagic-</versionTagPrefix>
                    </gitFlowConfig>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
