<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.nablarch.framework</groupId>
  <artifactId>nablarch-fw-web</artifactId>
  <version>1.14.0</version>

  <scm>
    <connection>scm:git:git://github.com/nablarch/${project.artifactId}.git</connection>
    <developerConnection>scm:git:git://github.com/nablarch/${project.artifactId}.git</developerConnection>
    <url>https://github.com/nablarch/${project.artifactId}/tree/master</url>
  </scm>

  <parent>
    <groupId>com.nablarch</groupId>
    <artifactId>nablarch-parent</artifactId>
    <version>5u25</version>
  </parent>

  <properties>
    <ecj.version>3.5.1</ecj.version>
    <nablarch-testing-jetty.artifact>nablarch-testing-jetty6</nablarch-testing-jetty.artifact>
    <javax-servlet.artifact>servlet-api</javax-servlet.artifact>
    <javax-servlet.version>2.5</javax-servlet.version>
    <env.resources>${project.basedir}/src/test/env/jetty6/resources</env.resources>
    <env.additional-test-source>${project.basedir}/src/test/env/jetty6/java</env.additional-test-source>
  </properties>

  <profiles>
    <profile>
      <id>java8</id>
      <properties>
        <ecj.version>4.6.1</ecj.version>
      </properties>
    </profile>
    <profile>
      <id>java9</id>
      <properties>
        <ecj.version>4.6.1</ecj.version>
        <junit.additionalArgLine>--add-modules java.activation,java.xml.bind</junit.additionalArgLine>
      </properties>
    </profile>
    <profile>
      <id>java11</id>
      <properties>
        <ecj.version>4.6.1</ecj.version>
        <nablarch-testing-jetty.artifact>nablarch-testing-jetty9</nablarch-testing-jetty.artifact>
        <javax-servlet.artifact>javax.servlet-api</javax-servlet.artifact>
        <javax-servlet.version>3.1.0</javax-servlet.version>
        <env.resources>${project.basedir}/src/test/env/jetty9/resources</env.resources>
        <env.additional-test-source>${project.basedir}/src/test/env/jetty9/java</env.additional-test-source>
      </properties>
      <dependencies>
        <dependency>
          <groupId>com.nablarch.dev</groupId>
          <artifactId>nablarch-test-support</artifactId>
          <scope>test</scope>
          <exclusions>
            <exclusion>
              <groupId>org.mortbay.jetty</groupId>
              <artifactId>jsp-api-2.1-glassfish</artifactId>
            </exclusion>
          </exclusions>
        </dependency>

        <dependency>
          <groupId>com.sun.activation</groupId>
          <artifactId>javax.activation</artifactId>
          <version>1.2.0</version>
          <scope>compile</scope>
        </dependency>

        <dependency>
          <groupId>javax.xml.bind</groupId>
          <artifactId>jaxb-api</artifactId>
          <version>2.3.1</version>
          <scope>compile</scope>
        </dependency>

        <dependency>
          <groupId>com.sun.xml.bind</groupId>
          <artifactId>jaxb-impl</artifactId>
          <version>2.3.1</version>
          <scope>compile</scope>
        </dependency>

        <dependency>
          <groupId>com.sun.xml.bind</groupId>
          <artifactId>jaxb-core</artifactId>
          <version>2.3.0.1</version>
          <scope>compile</scope>
        </dependency>
      </dependencies>
    </profile>
  </profiles>

  <dependencies>

    <dependency>
      <groupId>com.nablarch.framework</groupId>
      <artifactId>nablarch-fw</artifactId>
    </dependency>

    <dependency>
      <groupId>com.nablarch.framework</groupId>
      <artifactId>nablarch-core-beans</artifactId>
    </dependency>

    <dependency>
      <groupId>com.nablarch.framework</groupId>
      <artifactId>nablarch-core-validation</artifactId>
    </dependency>

    <dependency>
      <groupId>com.nablarch.framework</groupId>
      <artifactId>nablarch-common-encryption</artifactId>
    </dependency>

    <dependency>
      <groupId>com.nablarch.framework</groupId>
      <artifactId>nablarch-core-repository</artifactId>
    </dependency>

    <dependency>
      <groupId>com.nablarch.framework</groupId>
      <artifactId>nablarch-core-jdbc</artifactId>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>com.nablarch.framework</groupId>
      <artifactId>nablarch-core-validation-ee</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>${javax-servlet.artifact}</artifactId>
      <version>${javax-servlet.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.nablarch.framework</groupId>
      <artifactId>nablarch-common-jdbc</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.nablarch.framework</groupId>
      <artifactId>nablarch-testing</artifactId>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.eclipse.jdt.core.compiler</groupId>
          <artifactId>ecj</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.eclipse.jdt.core.compiler</groupId>
      <artifactId>ecj</artifactId>
      <version>${ecj.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-validator</artifactId>
      <version>5.3.6.Final</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.jmockit</groupId>
      <artifactId>jmockit</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.nablarch.dev</groupId>
      <artifactId>nablarch-test-support</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.nablarch.framework</groupId>
      <artifactId>${nablarch-testing-jetty.artifact}</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.jayway.jsonpath</groupId>
      <artifactId>json-path-assert</artifactId>
      <version>2.4.0</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
      </testResource>
      <testResource>
        <!-- here-is -->
        <directory>src/test/java</directory>
      </testResource>
      <testResource>
        <directory>${env.resources}</directory>
      </testResource>
    </testResources>

    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.12</version>
        <executions>
          <execution>
            <id>add-test-source</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>add-test-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${env.additional-test-source}</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
