<?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.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.4</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>

    <groupId>au.net.causal.shoelaces</groupId>    
    <artifactId>shoelaces-parent</artifactId>
    <version>2.2</version>
    <packaging>pom</packaging>
    
    <name>Shoelaces</name>
    <description>Tools/Support for Spring Boot applications</description>
    <url>https://bitbucket.org/prunge/shoelaces</url>

    <inceptionYear>2018</inceptionYear>

    <properties>
        <java.version>11</java.version>

        <spring.boot.version>2.7.4</spring.boot.version>

        <fluentlenium.version>5.0.4</fluentlenium.version>
        <htmlunit.version>2.64.0</htmlunit.version>
        <jsoup.version>1.14.3</jsoup.version>
        <cargo-maven-plugin.version>1.10.2</cargo-maven-plugin.version>
        <frontend-maven-plugin.version>1.12.1</frontend-maven-plugin.version>
        <exec-maven-plugin.version>3.1.0</exec-maven-plugin.version>
        <node.version>v16.17.1</node.version>
        <npm.version>6.14.17</npm.version>
    </properties>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:ssh://git@bitbucket.org/prunge/shoelaces.git</connection>
        <developerConnection>scm:git:ssh://git@bitbucket.org/prunge/shoelaces.git</developerConnection>
        <url>https://bitbucket.org/prunge/shoelaces/src</url>
      <tag>shoelaces-parent-2.2</tag>
  </scm>

    <developers>
        <developer>
            <id>prunge</id>
            <name>Peter Runge</name>
            <email>prunge@causal.net.au</email>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>
    </developers>

    <modules>
        <module>checkstyle</module>
        <module>apphome</module>
        <module>assorted</module>
        <module>logconfig</module>
        <module>jdbc</module>
        <module>jersey-common</module>
        <module>jersey</module>
        <module>jersey-client</module>
        <module>liquibase</module>
        <module>testing</module>
        <module>selenium</module>
        <module>web</module>
        <module>integration-tests</module>
        <module>bom</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>javax.activation</groupId>
                <artifactId>javax.activation-api</artifactId>
                <version>${javax-activation.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-junit-jupiter</artifactId>
                <version>${mockito.version}</version>
            </dependency>

            <dependency>
                <groupId>org.fluentlenium</groupId>
                <artifactId>fluentlenium-core</artifactId>
                <version>${fluentlenium.version}</version>
            </dependency>
            <dependency>
                <groupId>org.fluentlenium</groupId>
                <artifactId>fluentlenium-junit-jupiter</artifactId>
                <version>${fluentlenium.version}</version>
            </dependency>
            <dependency>
                <groupId>org.fluentlenium</groupId>
                <artifactId>fluentlenium-assertj</artifactId>
                <version>${fluentlenium.version}</version>
            </dependency>
            <dependency>
                <groupId>net.sourceforge.htmlunit</groupId>
                <artifactId>htmlunit</artifactId>
                <version>${htmlunit.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jsoup</groupId>
                <artifactId>jsoup</artifactId>
                <version>${jsoup.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.cargo</groupId>
                    <artifactId>cargo-maven3-plugin</artifactId>
                    <version>${cargo-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>${exec-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>sql-maven-plugin</artifactId>
                    <version>1.5</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>properties-maven-plugin</artifactId>
                    <version>1.0.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.2.0</version>
                    <executions>
                        <execution>
                            <id>verify-style</id>
                            <phase>process-classes</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <configLocation>checkstyle/checkstyle.xml</configLocation>
                        <!--
                        <violationSeverity>warning</violationSeverity>
                        -->
                        <consoleOutput>true</consoleOutput>
                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
                        <suppressionsLocation>checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>shoelaces-checkstyle</artifactId>
                            <version>${project.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>com.github.eirslett</groupId>
                    <artifactId>frontend-maven-plugin</artifactId>
                    <version>${frontend-maven-plugin.version}</version>
                    <configuration>
                        <nodeVersion>${node.version}</nodeVersion>
                        <npmVersion>${npm.version}</npmVersion>
                        <installDirectory>${project.build.directory}/frontend</installDirectory>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.8</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>false</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <releaseProfiles>release</releaseProfiles>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <!-- Makes checkstyle warnings fail the build -->
        <profile>
            <id>checkstyle-errors</id>
            <properties>
                <checkstyle.failOnViolation>true</checkstyle.failOnViolation>
                <checkstyle.violationSeverity>warning</checkstyle.violationSeverity>
            </properties>
        </profile>

        <!-- Only make GPG signatures during release -->
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
