<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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>
    <groupId>jp.try0.wicket</groupId>
    <artifactId>wicket-honeypot-parent</artifactId>
    <version>3.0.0</version>
    <packaging>pom</packaging>

    <modules>
        <module>wicket-honeypot-core</module>
        <module>wicket-honeypot-example</module>
    </modules>


    <name>wicket-honeypot-parent</name>
    <url>https://github.com/try0/wicket-honeypot</url>
    <description>wicket-honeypot-parent</description>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>try0</name>
            <email>try0.development@gmail.com</email>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/try0/wicket-honeypot</url>
        <connection>scm:git:git@github.com:try0/wicket-honeypot.git</connection>
        <developerConnection>scm:git:git@github.com:try0/wicket-honeypot.git</developerConnection>
    </scm>

    <properties>
		<maven.compiler.release>17</maven.compiler.release>
        <java.version>17</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <wicket.version>10.0.0</wicket.version>
        <guava.version>32.0.0-jre</guava.version>
        <collections4.version>4.2</collections4.version>

        <junit.version>5.6.2</junit.version>
        <junit-platform-launcher.version>1.6.2</junit-platform-launcher.version>

    	<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
		<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
		<maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
		<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
		<maven-gpg-plugin.version>3.2.2</maven-gpg-plugin.version>

		<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>

		<versions-maven-plugin.version>2.7</versions-maven-plugin.version>
    </properties>

    <dependencies>

        <!-- TEST DEPENDENCIES -->
		<dependency>
			<groupId>jakarta.servlet</groupId>
			<artifactId>jakarta.servlet-api</artifactId>
			<version>6.0.0</version>
			<scope>test</scope>
		</dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-migrationsupport</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <version>${junit-platform-launcher.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
			<groupId>org.apache.wicket</groupId>
			<artifactId>wicket-tester</artifactId>
			<scope>test</scope>
		</dependency>

    </dependencies>

    <dependencyManagement>
        <dependencies>

            <!-- WICKET DEPENDENCIES -->
            <dependency>
                <groupId>org.apache.wicket</groupId>
                <artifactId>wicket-core</artifactId>
                <version>${wicket.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.wicket</groupId>
                <artifactId>wicket-request</artifactId>
                <version>${wicket.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.wicket</groupId>
                <artifactId>wicket-util</artifactId>
                <version>${wicket.version}</version>
            </dependency>

			<dependency>
				<groupId>org.apache.wicket</groupId>
				<artifactId>wicket-tester</artifactId>
				<version>${wicket.version}</version>
			</dependency>

            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <build>

        <resources>
            <resource>
                <filtering>false</filtering>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <filtering>false</filtering>
                <directory>src/main/java</directory>
                <includes>
                    <include>**</include>
                </includes>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
        </resources>

        <testResources>
            <testResource>
                <filtering>false</filtering>
                <directory>src/test/resources</directory>
            </testResource>
            <testResource>
                <filtering>false</filtering>
                <directory>src/test/java</directory>
                <includes>
                    <include>**</include>
                </includes>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </testResource>
        </testResources>

        <plugins>

            <plugin>
                <inherited>true</inherited>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>UTF-8</encoding>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <excludes>
                        <exclude>some test to exclude here</exclude>
                    </excludes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <configuration>
                    <show>protected</show>
                    <failOnError>false</failOnError>
                </configuration>

                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-plugin.version}</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
            </plugin>

            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${nexus-staging-maven-plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>

            <!-- mvn versions:display-dependency-updates -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>${versions-maven-plugin.version}</version>
            </plugin>
        </plugins>
    </build>

    <profiles>

        <profile>
            <id>release-sign-artifacts</id>
            <!-- for release -->
            <!-- mvn -DperformRelease=true deploy -->
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <!-- generate PGP Signature -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>

        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
</project>