<?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 https://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>3.5.4</version>
  </parent>

  <groupId>tech.jhipster.lite</groupId>
  <artifactId>jhlite</artifactId>
  <version>1.35.0</version>
  <name>jhlite</name>
  <description>JHipster Lite</description>
  <packaging>jar</packaging>
  <url>https://github.com/jhipster/jhipster-lite</url>
  <licenses>
    <license>
      <name>Apache License, version 2.0</name>
      <url>https://github.com/jhipster/jhipster-lite/blob/main/LICENSE.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <organization>
    <name>JHipster</name>
    <url>https://www.jhipster.tech</url>
  </organization>
  <developers>
    <developer>
      <id>pascalgrimaud</id>
      <name>Pascal Grimaud</name>
      <url>https://github.com/pascalgrimaud</url>
      <organization>JHipster</organization>
      <organizationUrl>https://www.jhipster.tech/</organizationUrl>
    </developer>
    <!-- The JHipster core team is listed at https://www.jhipster.tech/team/ -->
  </developers>
  <scm>
    <connection>scm:git:https://github.com/jhipster/jhipster-lite</connection>
    <url>https://github.com/jhipster/jhipster-lite</url>
  </scm>

  <properties>
    <java.version>21</java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <node.version>v22.17.1</node.version>
    <npm.version>11.5.1</npm.version>

    <maven.version>3.6.3</maven.version>
    <maven-enforcer-plugin.version>3.6.1</maven-enforcer-plugin.version>
    <maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
    <maven-javadoc-plugin.version>3.11.2</maven-javadoc-plugin.version>
    <maven-source-plugin.version>3.3.1</maven-source-plugin.version>
    <central-publishing-maven-plugin.version>0.8.0</central-publishing-maven-plugin.version>
    <start-class>tech.jhipster.lite.JHLiteApp</start-class>

    <byte-buddy.version>1.17.6</byte-buddy.version>
    <compiler-plugin.version>3.14.0</compiler-plugin.version>
    <surefire-plugin.version>3.5.3</surefire-plugin.version>
    <jacoco.version>0.8.13</jacoco.version>
    <jgit.version>7.3.0.202506031305-r</jgit.version>
    <junit-jupiter.version>5.13.4</junit-jupiter.version>
    <archunit-junit5.version>1.4.1</archunit-junit5.version>
    <springdoc-openapi.version>2.8.9</springdoc-openapi.version>
    <properties-maven-plugin.version>1.2.1</properties-maven-plugin.version>
    <sonar-maven-plugin.version>5.1.0.4751</sonar-maven-plugin.version>
    <apache-commons-io.version>2.20.0</apache-commons-io.version>
    <cucumber.version>7.27.0</cucumber.version>
    <maven-model-helper.version>37</maven-model-helper.version>
    <mustache.java.version>0.9.14</mustache.java.version>
    <night-config.version>3.8.2</night-config.version>
    <testcontainers.version>1.21.3</testcontainers.version>
    <mongock.version>5.5.1</mongock.version>
    <git-commit-id-plugin.version>9.0.2</git-commit-id-plugin.version>
    <checkstyle.version>10.26.1</checkstyle.version>
    <maven-checkstyle-plugin.version>3.6.0</maven-checkstyle-plugin.version>

    <frontend-maven-plugin.version>1.15.1</frontend-maven-plugin.version>
    <checksum-maven-plugin.version>1.11</checksum-maven-plugin.version>
    <maven-antrun-plugin.version>3.1.0</maven-antrun-plugin.version>
    <approvaltests.version>25.0.23</approvaltests.version>
    <error-prone.version>2.41.0</error-prone.version>
    <modernizer-maven-plugin.version>3.1.0</modernizer-maven-plugin.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.mongock</groupId>
        <artifactId>mongock-bom</artifactId>
        <version>${mongock.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>${junit-jupiter.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-bom</artifactId>
        <version>${cucumber.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>testcontainers-bom</artifactId>
        <version>${testcontainers.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${project.parent.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>

    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>${apache-commons-io.version}</version>
    </dependency>

    <dependency>
      <groupId>org.eclipse.jgit</groupId>
      <artifactId>org.eclipse.jgit</artifactId>
      <version>${jgit.version}</version>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springdoc</groupId>
      <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
      <version>${springdoc-openapi.version}</version>
    </dependency>

    <dependency>
      <groupId>org.springdoc</groupId>
      <artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
      <version>${springdoc-openapi.version}</version>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-validation</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>

    <dependency>
      <groupId>io.fabric8</groupId>
      <artifactId>maven-model-helper</artifactId>
      <version>${maven-model-helper.version}</version>
    </dependency>

    <dependency>
      <groupId>com.electronwill.night-config</groupId>
      <artifactId>toml</artifactId>
      <version>${night-config.version}</version>
    </dependency>

    <dependency>
      <groupId>org.yaml</groupId>
      <artifactId>snakeyaml</artifactId>
    </dependency>

    <dependency>
      <groupId>com.github.spullara.mustache.java</groupId>
      <artifactId>compiler</artifactId>
      <version>${mustache.java.version}</version>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-data-mongodb</artifactId>
    </dependency>

    <dependency>
      <groupId>io.mongock</groupId>
      <artifactId>mongock-springboot-v3</artifactId>
    </dependency>

    <dependency>
      <groupId>io.mongock</groupId>
      <artifactId>mongodb-springdata-v4-driver</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-devtools</artifactId>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>net.bytebuddy</groupId>
      <artifactId>byte-buddy</artifactId>
      <version>${byte-buddy.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.tngtech.archunit</groupId>
      <artifactId>archunit-junit5-api</artifactId>
      <version>${archunit-junit5.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>io.cucumber</groupId>
      <artifactId>cucumber-junit-platform-engine</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>io.cucumber</groupId>
      <artifactId>cucumber-java</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>io.cucumber</groupId>
      <artifactId>cucumber-spring</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-suite</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>mongodb</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.approvaltests</groupId>
      <artifactId>approvaltests</artifactId>
      <version>${approvaltests.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <defaultGoal>spring-boot:run</defaultGoal>

    <resources>
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>generator/dependencies/pom.xml</include>
        </includes>
      </resource>
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <excludes>
          <exclude>generator/dependencies/pom.xml</exclude>
        </excludes>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${compiler-plugin.version}</version>
        <configuration>
          <release>${java.version}</release>
          <parameters>true</parameters>
          <compilerArgs>
            <arg>-XDcompilePolicy=simple</arg>
            <arg>--should-stop=ifError=FLOW</arg>
            <arg>
              -Xplugin:ErrorProne
              -Xep:BadImport:OFF
              -Xep:UnnecessaryLambda:OFF
              -Xep:UnnecessaryStringBuilder:OFF
              -Xep:ImmutableEnumChecker:OFF
            </arg>
          </compilerArgs>
          <annotationProcessorPaths>
            <path>
              <groupId>org.springframework.boot</groupId>
              <artifactId>spring-boot-configuration-processor</artifactId>
            </path>
            <path>
              <groupId>com.google.errorprone</groupId>
              <artifactId>error_prone_core</artifactId>
              <version>${error-prone.version}</version>
            </path>
          </annotationProcessorPaths>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${surefire-plugin.version}</version>
        <configuration>
          <!-- Force alphabetical order to have a reproducible build -->
          <runOrder>alphabetical</runOrder>
          <excludes>
            <exclude>**/*IT*</exclude>
            <exclude>**/*CucumberTest*</exclude>
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>${surefire-plugin.version}</version>
        <configuration>
          <!-- Force alphabetical order to have a reproducible build -->
          <runOrder>alphabetical</runOrder>
          <includes>
            <include>**/*IT*</include>
            <include>**/*CucumberTest*</include>
          </includes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco.version}</version>
        <configuration>
          <excludes>
            <exclude>**/generator/buildtool/maven/.mvn/wrapper/*</exclude>
            <exclude>**/generator/buildtool/gradle/gradle/wrapper/*</exclude>
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>properties-maven-plugin</artifactId>
        <version>${properties-maven-plugin.version}</version>
        <executions>
          <execution>
            <phase>initialize</phase>
            <goals>
              <goal>read-project-properties</goal>
            </goals>
            <configuration>
              <files>
                <file>sonar-project.properties</file>
              </files>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.gaul</groupId>
        <artifactId>modernizer-maven-plugin</artifactId>
        <version>${modernizer-maven-plugin.version}</version>
        <configuration>
          <javaVersion>${java.version}</javaVersion>
          <failOnViolations>true</failOnViolations>
        </configuration>
        <executions>
          <execution>
            <id>modernizer</id>
            <phase>verify</phase>
            <goals>
              <goal>modernizer</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>net.nicoulaj.maven.plugins</groupId>
        <artifactId>checksum-maven-plugin</artifactId>
        <version>${checksum-maven-plugin.version}</version>
        <executions>
          <execution>
            <id>create-pre-compiled-webapp-checksum</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>files</goal>
            </goals>
          </execution>
          <execution>
            <id>create-compiled-webapp-checksum</id>
            <goals>
              <goal>files</goal>
            </goals>
            <phase>compile</phase>
            <configuration>
              <csvSummaryFile>checksums.csv.old</csvSummaryFile>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <fileSets>
            <fileSet>
              <directory>${project.basedir}</directory>
              <includes>
                <include>src/main/glyph/**/*.*</include>
                <include>src/main/style/**/*.*</include>
                <include>src/main/webapp/**/*.*</include>
                <include>target/classes/public/**/*.*</include>
                <include>target/classes/static/**/*.*</include>
                <include>package-lock.json</include>
                <include>package.json</include>
                <include>tikuiconfig.json</include>
                <include>tsconfig.json</include>
                <include>tsconfig.build.json</include>
                <include>vite.config.ts</include>
                <include>vitest.config.ts</include>
              </includes>
            </fileSet>
          </fileSets>
          <failOnError>false</failOnError>
          <failIfNoFiles>false</failIfNoFiles>
          <individualFiles>false</individualFiles>
          <algorithms>
            <algorithm>SHA-1</algorithm>
          </algorithms>
          <includeRelativePath>true</includeRelativePath>
          <quiet>true</quiet>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>${maven-antrun-plugin.version}</version>
        <executions>
          <execution>
            <id>eval-frontend-checksum</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <condition property="skip.npm" value="true" else="false">
                  <and>
                    <available file="checksums.csv" filepath="${project.build.directory}" />
                    <available file="checksums.csv.old" filepath="${project.build.directory}" />
                    <filesmatch file1="${project.build.directory}/checksums.csv" file2="${project.build.directory}/checksums.csv.old" />
                  </and>
                </condition>
              </target>
              <exportAntProperties>true</exportAntProperties>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>
        <version>${frontend-maven-plugin.version}</version>
        <configuration>
          <installDirectory>${project.build.directory}</installDirectory>
        </configuration>
        <executions>
          <execution>
            <id>install-node-and-npm</id>
            <goals>
              <goal>install-node-and-npm</goal>
            </goals>
            <configuration>
              <nodeVersion>${node.version}</nodeVersion>
              <npmVersion>${npm.version}</npmVersion>
            </configuration>
          </execution>
          <execution>
            <id>npm install</id>
            <goals>
              <goal>npm</goal>
            </goals>
          </execution>
          <execution>
            <id>build front</id>
            <goals>
              <goal>npm</goal>
            </goals>
            <phase>generate-resources</phase>
            <configuration>
              <arguments>run build</arguments>
              <environmentVariables>
                <APP_VERSION>${project.version}</APP_VERSION>
              </environmentVariables>
              <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
            </configuration>
          </execution>
          <execution>
            <id>front unit test</id>
            <goals>
              <goal>npm</goal>
            </goals>
            <phase>test</phase>
            <configuration>
              <skip>${skipTests}</skip>
              <arguments>run test:unit:coverage</arguments>
              <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
            </configuration>
          </execution>
          <execution>
            <id>front component test</id>
            <goals>
              <goal>npm</goal>
            </goals>
            <phase>verify</phase>
            <configuration>
              <skip>${skipTests}</skip>
              <arguments>run test:component:headless</arguments>
              <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
            </configuration>
          </execution>
          <execution>
            <id>front verify coverage</id>
            <goals>
              <goal>npm</goal>
            </goals>
            <phase>verify</phase>
            <configuration>
              <skip>${skipTests}</skip>
              <arguments>run test:coverage:check</arguments>
              <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven-javadoc-plugin.version}</version>
        <configuration>
          <release>${java.version}</release>
          <quiet>true</quiet>
          <failOnWarnings>false</failOnWarnings>
          <failOnError>false</failOnError>
          <doclint>all,-missing</doclint>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <sourceFileExcludes>package-info.java</sourceFileExcludes>
            </configuration>
          </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>io.github.git-commit-id</groupId>
        <artifactId>git-commit-id-maven-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${maven-checkstyle-plugin.version}</version>
        <configuration>
          <configLocation>checkstyle.xml</configLocation>
          <includeTestSourceDirectory>true</includeTestSourceDirectory>
          <consoleOutput>true</consoleOutput>
          <failsOnError>true</failsOnError>
        </configuration>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>${checkstyle.version}</version>
          </dependency>
        </dependencies>
      </plugin>

      <plugin>
        <groupId>org.graalvm.buildtools</groupId>
        <artifactId>native-maven-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>repackage</id>
            <configuration>
              <attach>false</attach>
              <classifier>exec</classifier>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>io.github.git-commit-id</groupId>
          <artifactId>git-commit-id-maven-plugin</artifactId>
          <version>${git-commit-id-plugin.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>revision</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <failOnNoGitDirectory>false</failOnNoGitDirectory>
            <failOnUnableToExtractRepoInfo>false</failOnUnableToExtractRepoInfo>
            <generateGitPropertiesFile>true</generateGitPropertiesFile>
            <includeOnlyProperties>
              <includeOnlyProperty>^git.commit.id.abbrev$</includeOnlyProperty>
              <includeOnlyProperty>^git.commit.id.describe$</includeOnlyProperty>
              <includeOnlyProperty>^git.branch$</includeOnlyProperty>
              <includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
            </includeOnlyProperties>
            <verbose>false</verbose>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco.version}</version>
          <executions>
            <execution>
              <id>pre-unit-tests</id>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
            </execution>
            <!-- Ensures that the code coverage report for unit tests is created after unit tests have been run -->
            <execution>
              <id>post-unit-test</id>
              <phase>test</phase>
              <goals>
                <goal>report</goal>
              </goals>
            </execution>
            <execution>
              <id>pre-integration-tests</id>
              <goals>
                <goal>prepare-agent-integration</goal>
              </goals>
            </execution>
            <!-- Ensures that the code coverage report for integration tests is created after integration tests have been run -->
            <execution>
              <id>post-integration-tests</id>
              <phase>post-integration-test</phase>
              <goals>
                <goal>report-integration</goal>
              </goals>
            </execution>
            <execution>
              <id>merge</id>
              <phase>verify</phase>
              <goals>
                <goal>merge</goal>
              </goals>
              <configuration>
                <fileSets>
                  <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
                    <directory>${project.basedir}</directory>
                    <includes>
                      <include>**/*.exec</include>
                    </includes>
                  </fileSet>
                </fileSets>
                <destFile>target/jacoco/allTest.exec</destFile>
              </configuration>
            </execution>
            <execution>
              <id>post-merge-report</id>
              <phase>verify</phase>
              <goals>
                <goal>report</goal>
              </goals>
              <configuration>
                <dataFile>target/jacoco/allTest.exec</dataFile>
                <outputDirectory>target/jacoco/</outputDirectory>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${maven-enforcer-plugin.version}</version>
          <executions>
            <execution>
              <id>enforce-versions</id>
              <goals>
                <goal>enforce</goal>
              </goals>
            </execution>
            <execution>
              <id>enforce-dependencyConvergence</id>
              <configuration>
                <rules>
                  <DependencyConvergence />
                </rules>
                <fail>false</fail>
              </configuration>
              <goals>
                <goal>enforce</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <rules>
              <requireMavenVersion>
                <message>You are running an older version of Maven. JHipster Lite requires at least Maven ${maven.version}</message>
                <version>${maven.version}</version>
              </requireMavenVersion>
              <requireJavaVersion>
                <message>
                  You are running an incompatible version of Java. JHipster Lite engine requires at least Java ${java.version}
                </message>
                <version>${java.version}</version>
              </requireJavaVersion>
            </rules>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.sonarsource.scanner.maven</groupId>
          <artifactId>sonar-maven-plugin</artifactId>
          <version>${sonar-maven-plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <executions>
            <execution>
              <goals>
                <goal>test-jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>jacoco-check</id>
      <activation>
        <os>
          <family>unix</family>
        </os>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>check</id>
                <goals>
                  <goal>check</goal>
                </goals>
                <configuration>
                  <dataFile>target/jacoco/allTest.exec</dataFile>
                  <rules>
                    <rule>
                      <element>CLASS</element>
                      <limits>
                        <limit>
                          <counter>BRANCH</counter>
                          <value>MISSEDCOUNT</value>
                          <maximum>0</maximum>
                        </limit>
                        <limit>
                          <counter>LINE</counter>
                          <value>MISSEDCOUNT</value>
                          <maximum>0</maximum>
                        </limit>
                      </limits>
                    </rule>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>deploy-central</id>
      <activation>
        <property>
          <name>release</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <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>
                <configuration>
                  <!-- Prevent `gpg` from using pinentry programs -->
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
            <version>${central-publishing-maven-plugin.version}</version>
            <extensions>true</extensions>
            <configuration>
              <publishingServerId>central</publishingServerId>
              <autoPublish>true</autoPublish>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
