<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>de.hs-heilbronn.mi</groupId>
    <artifactId>crawler4j-parent</artifactId>
    <packaging>pom</packaging>
    <version>4.7.2</version>
    <name>${project.groupId}:${project.artifactId}</name>

    <description>Open Source Web Crawler for Java</description>
    <url>https://github.com/rzo1/crawler4j</url>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <url>https://github.com/rzo1/crawler4j</url>
        <connection>scm:git:git@github.com:rzo1/crawler4j.git</connection>
        <developerConnection>scm:git:git@github.com:rzo1/crawler4j.git</developerConnection>
        <tag>HEAD</tag>
    </scm>
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <name>Sonatype Nexus snapshot repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <name>Sonatype Nexus release repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
    <developers>
        <developer>
            <id>yasserg</id>
            <name>Yasser Ganjisaffar</name>
            <roles>
                <role>Original Founder</role>
            </roles>
            <email/>
            <timezone>America/Los_Angeles</timezone>
        </developer>
        <developer>
            <id>s17t</id>
            <name>Federico Tolomei</name>
            <roles>
                <role>Maintainer (till 2018)</role>
            </roles>
            <email>fede@s17t.net</email>
            <url>https://s17t.net</url>
            <timezone>Europe/Rome</timezone>
        </developer>
        <developer>
            <id>rzo1</id>
            <name>Richard Zowalla</name>
            <roles>
                <role>Fork Maintainer</role>
            </roles>
            <email/>
            <url>https://github.com/rzo1/crawler4j</url>
            <timezone>Europe/Berlin</timezone>
        </developer>
    </developers>

    <organization>
        <name>crawler4j-fork (pre-fork: Yasser Ganjisaffar)</name>
    </organization>

    <modules>
        <module>crawler4j-core</module>
        <module>crawler4j-examples</module>
        <module>crawler4j-frontier</module>
        <module>crawler4j-commons</module>
        <module>crawler4j-boms</module>
    </modules>

    <properties>
        <!-- Application settings -->
        <copyright.year>2021</copyright.year>
        <license.inceptionYear>2010</license.inceptionYear>
        <license.licenseName>apache_v2</license.licenseName>

        <!-- Maven specific settings -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
        <java.source>11</java.source>
        <java.target>11</java.target>
        <maven.compile.encoding>UTF-8</maven.compile.encoding>
        <maven.compiler.target>${java.target}</maven.compiler.target>

        <crawler4j.version>${project.parent.version}</crawler4j.version>

        <slf4j.version>1.7.32</slf4j.version>
        <log4j.version>2.14.1</log4j.version>

        <apache.http.client.version>5.1</apache.http.client.version>
        <apache.http.core.version>5.1.1</apache.http.core.version>
        <apache.http.core.h2.version>5.1.1</apache.http.core.h2.version>

        <apache.tika.version>2.1.0</apache.tika.version>
        <!-- XXX replace with crawler commons -->
        <url-detector.version>0.1.23</url-detector.version>
        <crawler-commons.version>1.2</crawler-commons.version>

        <!-- 3rd party test dependencies -->
        <junit.version>4.13.2</junit.version>
        <wiremock.version>2.27.2</wiremock.version>
        <spock.version>2.0-groovy-3.0</spock.version>
        <groovy.version>3.0.9</groovy.version>

        <!-- Maven plugin version -->
        <maven.source.version>3.2.0</maven.source.version>
        <maven.javadoc.version>3.2.0</maven.javadoc.version>
        <maven.gpg.version>1.6</maven.gpg.version>
        <maven.license.version>2.0.0</maven.license.version>
        <maven.build.helper.version>3.0.0</maven.build.helper.version>
        <maven.release.version>2.5.3</maven.release.version>
        <maven.assembly.version>2.5.3</maven.assembly.version>
        <maven.nexus.staging.version>1.6.7</maven.nexus.staging.version>
        <maven.jar.version>3.2.0</maven.jar.version>
        <maven.compiler.version>3.8.1</maven.compiler.version>
        <maven.jacoco.version>0.8.6</maven.jacoco.version>
        <maven.gmaven.plus.version>1.12.0</maven.gmaven.plus.version>
        <maven.versions.version>2.5</maven.versions.version>
        <maven.forbiddenapis.version>3.1</maven.forbiddenapis.version>
        <maven.enforcer.version>3.0.0-M2</maven.enforcer.version>
        <maven.surefire.version>2.22.1</maven.surefire.version>
    </properties>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>version-check</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>versions-maven-plugin</artifactId>
                        <version>${maven.versions.version}</version>
                        <executions>
                            <execution>
                                <id>show-updates</id>
                                <phase>compile</phase>
                                <goals>
                                    <goal>display-plugin-updates</goal>
                                    <goal>display-dependency-updates</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>forbiddenapis</id>
            <build>
                <plugins>
                    <!-- A maven plugin to check for certain code quality rules -->
                    <plugin>
                        <groupId>de.thetaphi</groupId>
                        <artifactId>forbiddenapis</artifactId>
                        <version>${maven.forbiddenapis.version}</version>
                        <configuration>
                            <failOnViolation>false</failOnViolation>
                            <failOnUnsupportedJava>false</failOnUnsupportedJava>
                            <bundledSignatures>
                                <bundledSignature>jdk-deprecated</bundledSignature>
                                <bundledSignature>jdk-internal</bundledSignature>
                                <!-- disallow undocumented classes like sun.misc.Unsafe: -->
                                <bundledSignature>jdk-non-portable</bundledSignature>
                                <!-- interesting, yet inactive for the moment:
                                <bundledSignature>jdk-unsafe</bundledSignature>
                                <bundledSignature>jdk-reflection</bundledSignature>
                                -->
                            </bundledSignatures>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                    <goal>testCheck</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>${maven.license.version}</version>
                    <configuration>
                        <verbose>false</verbose>
                        <includes>
                            <includes>**/*.java</includes>
                        </includes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>generate-license-headers</id>
                            <goals>
                                <goal>update-file-header</goal>
                            </goals>
                            <phase>process-sources</phase>
                            <configuration>
                                <roots>
                                    <root>src/main/java</root>
                                    <root>src/test/java</root>
                                </roots>
                                <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compiler.version}</version>
                    <configuration>
                        <source>${java.source}</source>
                        <target>${java.target}</target>
                        <encoding>${encoding}</encoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven.source.version}</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven.javadoc.version}</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
                        <!-- workaround for https://bugs.openjdk.java.net/browse/JDK-8212233 -->
                        <javaApiLinks>
                            <property>
                                <name>foo</name>
                                <value>bar</value>
                            </property>
                        </javaApiLinks>
                        <encoding>utf-8</encoding>
                        <show>public</show>
                        <detectOfflineLinks>false</detectOfflineLinks>
                        <detectJavaApiLink>false</detectJavaApiLink>
                        <!-- Speeds up the build of the javadocs -->
                        <quiet>true</quiet>
                        <use>false</use>
                        <doclint>none</doclint>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven.enforcer.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven.surefire.version}</version>
                    <configuration>
                        <argLine>-Xmx512m -Dfile.encoding=UTF-8</argLine>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven.gpg.version}</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>de.thetaphi</groupId>
                <artifactId>forbiddenapis</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
