<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <!-- ~ COORDINATES ~ -->
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <artifactId>ff4j-store-redis</artifactId>
  <packaging>jar</packaging>
  <name>ff4j-store-redis</name>
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <!-- ~ PARENT ~ -->
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <parent>
    <groupId>org.ff4j</groupId>
    <artifactId>ff4j-parent</artifactId>
    <version>2.1</version>
  </parent>
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <!-- ~ PROPERTIES ~ -->
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <properties>
    <license.licenseResolver>${project.baseUri}/../src/license</license.licenseResolver>
    <redis-forked>true</redis-forked>
    <jedis.version>5.1.2</jedis.version>
    <lettuce.version>6.3.2.RELEASE</lettuce.version>
    <testcontainers.version>1.14.3</testcontainers.version>
  </properties>
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <!-- ~ DEPENDENCIES ~ -->
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  <dependencies>
    <!-- logger -->
    <dependency>
      <groupId>org.ff4j</groupId>
      <artifactId>ff4j-core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <!-- json -->
    <dependency>
      <artifactId>ff4j-utils-json</artifactId>
      <groupId>org.ff4j</groupId>
      <version>${project.version}</version>
    </dependency>
    <!-- Connectivity to Redis with Jedis -->
    <dependency>
      <groupId>redis.clients</groupId>
      <artifactId>jedis</artifactId>
      <version>${jedis.version}</version>
    </dependency>
    <!-- Connectivity to Redis with Lettuce -->
    <dependency>
      <groupId>io.lettuce</groupId>
      <artifactId>lettuce-core</artifactId>
      <version>${lettuce.version}</version>
    </dependency>
    <dependency>
      <groupId>org.fusesource.jansi</groupId>
      <artifactId>jansi</artifactId>
    </dependency>
    <!-- tests -->
    <dependency>
      <artifactId>ff4j-test</artifactId>
      <groupId>org.ff4j</groupId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers</artifactId>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>ru.trylogic.maven.plugins</groupId>
        <artifactId>redis-maven-plugin</artifactId>
        <version>${version.maven.plugin.redis}</version>
        <configuration>
          <forked>${redis-forked}</forked>
        </configuration>
        <executions>
          <execution>
            <id>start-redis</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
          <execution>
            <id>stop-redis</id>
            <phase>post-integration-test</phase>
            <goals>
              <goal>shutdown</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>${version.maven.plugin.failsafe}</version>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.surefire</groupId>
            <artifactId>surefire-junit47</artifactId>
            <version>${version.maven.plugin.failsafe}</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
