<?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>com.cosium.maven_oss</groupId>
    <artifactId>maven-oss</artifactId>
    <version>1.2</version>
  </parent>

  <name>HAL Mock MVC Parent</name>
  <description>MockMvc wrapper allowing to easily test Spring HATEOAS HAL/HAL-FORMS apis</description>
  <url>https://github.com/Cosium/hal-mock-mvc</url>

  <groupId>com.cosium.hal_mock_mvc</groupId>
  <artifactId>hal-mock-mvc-parent</artifactId>
  <version>2.0</version>
  <packaging>pom</packaging>

  <properties>
    <spring-boot.version>3.0.0</spring-boot.version>

    <jakarta.inject-api.version>2.0.1</jakarta.inject-api.version>

    <git-code-format-maven-plugin.version>4.2</git-code-format-maven-plugin.version>
  </properties>

  <modules>
    <module>core</module>
    <module>spring-boot-starter</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${spring-boot.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>jakarta.inject</groupId>
        <artifactId>jakarta.inject-api</artifactId>
        <version>${jakarta.inject-api.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>com.cosium.code</groupId>
        <artifactId>git-code-format-maven-plugin</artifactId>
        <version>${git-code-format-maven-plugin.version}</version>
        <executions>
          <!-- On commit, format the modified java files -->
          <execution>
            <id>install-formatter-hook</id>
            <goals>
              <goal>install-hooks</goal>
            </goals>
          </execution>
          <!-- On Maven verify phase, fail if any file
          (including unmodified) is badly formatted -->
          <execution>
            <id>validate-code-format</id>
            <goals>
              <goal>validate-code-format</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <!-- Enable https://github.com/google/google-java-format -->
          <dependency>
            <groupId>com.cosium.code</groupId>
            <artifactId>google-java-format</artifactId>
            <version>${git-code-format-maven-plugin.version}</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>

  <scm>
    <connection>scm:git:https://github.com/Cosium/hal-mock-mvc</connection>
    <developerConnection>scm:git:https://github.com/Cosium/hal-mock-mvc</developerConnection>
    <url>https://github.com/Cosium/hal-mock-mvc</url>
    <tag>2.0</tag>
  </scm>

  <organization>
    <name>Cosium</name>
    <url>https://www.cosium.com</url>
  </organization>

  <developers>
    <developer>
      <id>reda-alaoui</id>
      <name>Réda Housni Alaoui</name>
      <email>reda-alaoui@hey.com</email>
      <url>https://github.com/reda-alaoui</url>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>MIT License</name>
      <url>https://www.opensource.org/licenses/mit-license.php</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

</project>
