<?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.eclipse.pass</groupId>
    <artifactId>pass-journal-loader</artifactId>
    <version>2.3.0</version>
  </parent>

  <artifactId>pass-journal-loader-nih</artifactId>

  <name>PASS support-journal-loader-nih</name>
  <description>PASS Journal Loader NIH</description>
  <url>https://github.com/eclipse-pass/pass-support</url>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Jim Martino</name>
      <email>jrm.jhu@jhu.edu</email>
      <organization>The Sheridan Libraries, Johns Hopkins University</organization>
      <organizationUrl>https://library.jhu.edu/</organizationUrl>
    </developer>
    <developer>
      <name>Mark Patton</name>
      <email>mpatton@jhu.edu</email>
      <organization>The Sheridan Libraries, Johns Hopkins University</organization>
      <organizationUrl>https://library.jhu.edu/</organizationUrl>
    </developer>
    <developer>
      <name>John Abrahams</name>
      <email>jabrah20@jhu.edu</email>
      <organization>The Sheridan Libraries, Johns Hopkins University</organization>
      <organizationUrl>https://library.jhu.edu/</organizationUrl>
    </developer>
    <developer>
      <name>Tim Sanders</name>
      <email>tsande16@jhu.edu</email>
      <organization>The Sheridan Libraries, Johns Hopkins University</organization>
      <organizationUrl>https://library.jhu.edu/</organizationUrl>
    </developer>
    <developer>
      <name>Russ Poetker</name>
      <email>rpoetke1@jhu.edu</email>
      <organization>The Sheridan Libraries, Johns Hopkins University</organization>
      <organizationUrl>https://library.jhu.edu/</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/eclipse-pass/pass-support.git</connection>
    <developerConnection>scm:git:https://github.com/eclipse-pass/pass-support.git</developerConnection>
    <url>https://github.com/eclipse-pass/pass-support</url>
    <tag>HEAD</tag>
  </scm>

  <properties>
    <!-- Properties for dependency versions -->
    <wiremock.version>3.9.2</wiremock.version>
    <testcontainers.version>1.19.8</testcontainers.version>
    <maven-model.version>3.9.9</maven-model.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.eclipse.pass</groupId>
      <artifactId>pass-data-client</artifactId>
    </dependency>

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

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

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
    </dependency>

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

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
    </dependency>

    <dependency>
      <groupId>org.wiremock</groupId>
      <artifactId>wiremock-standalone</artifactId>
      <version>${wiremock.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>${testcontainers.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <version>${maven-model.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.eclipse.pass</groupId>
      <artifactId>pass-core-test-config</artifactId>
      <version>${project.parent.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>

      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <version>${spring-boot-maven-plugin.version}</version>
        <executions>
          <execution>
            <id>repackage</id>
            <goals>
              <goal>repackage</goal>
            </goals>
            <configuration>
              <mainClass>org.eclipse.pass.loader.journal.nih.Main</mainClass>
              <classifier>exec</classifier>
              <attach>false</attach>
              <includeTools>false</includeTools>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>io.fabric8</groupId>
        <artifactId>docker-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>build-after-its</id>
            <phase>post-integration-test</phase>
            <configuration>
              <images>
                <image>
                  <name>ghcr.io/eclipse-pass/pass-journal-loader:%v</name>
                </image>
              </images>
            </configuration>
            <goals>
              <goal>build</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.cyclonedx</groupId>
        <artifactId>cyclonedx-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>
