<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>
    <artifactId>lenskit</artifactId>
    <groupId>org.grouplens.lenskit</groupId>
    <version>2.0.5</version>
    <relativePath>..</relativePath>
  </parent>
  <artifactId>lenskit-svd</artifactId>
  <name>LensKit SVD-based Recommenders</name>
  <dependencies>
    <dependency>
      <groupId>org.grouplens.lenskit</groupId>
      <artifactId>lenskit-core</artifactId>
      <version>${project.version}</version>
      <type>jar</type>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.grouplens.lenskit</groupId>
      <artifactId>lenskit-test</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>visualize</id>
      <activation>
        <property>
          <name>lenskit.ci</name>
        </property>
      </activation>
      <build>
        <plugins>
          <!-- Dump recommender graphs to disk -->
          <plugin>
            <groupId>org.grouplens.lenskit</groupId>
            <artifactId>lenskit-eval-maven-plugin</artifactId>
            <version>${project.version}</version>
            <executions>
              <execution>
                <id>dump-configs</id>
                <phase>integration-test</phase>
                <goals><goal>run-eval</goal></goals>
                <configuration>
                  <analysisDir>${project.build.directory}</analysisDir>
                  <script>${basedir}/src/eval/diagram.groovy</script>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <!-- Render recommender graphs with GraphViz (if it's available). -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <id>render-configs</id>
                <phase>post-integration-test</phase>
                <goals><goal>run</goal></goals>
                <configuration>
                  <failOnError>false</failOnError>
                  <target>
                    <ant antfile="${basedir}/src/eval/render.xml" target="render" dir="${basedir}" />
                  </target>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
