<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>edu.byu.hbll.maven</groupId>
    <artifactId>parent</artifactId>
    <version>4.0.0</version>
  </parent>
  
  <artifactId>executable-parent</artifactId>
  <name>Executable Parent POM</name>
  <description>Parent POM for CLI, cron, and daemon applications.</description>
  <packaging>pom</packaging>
  
  <properties>
    <spring-boot.version>2.6.3</spring-boot.version>
  </properties>
  
  <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>edu.byu.hbll</groupId>
        <artifactId>json</artifactId>
        <version>1.4.1</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  
  <dependencies>
    
    <!-- spring-boot -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter</artifactId>
    </dependency>
    
    <!-- json -->
    <dependency>
      <groupId>edu.byu.hbll</groupId>
      <artifactId>json</artifactId>
    </dependency>
    
    <!-- test -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
    
  </dependencies>
  
  <build>
    <finalName>${project.artifactId}</finalName>
    <plugins>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <version>${spring-boot.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>repackage</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <configuration>
          <!-- https://github.com/spring-projects/spring-boot/issues/6254#issuecomment-343470070 -->
          <classesDirectory>${project.build.directory}/${project.artifactId}.jar.original</classesDirectory>
        </configuration>
      </plugin>
    </plugins>
  </build>
  
</project>
