<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>
  <parent>
    <groupId>org.grouplens.lenskit</groupId>
    <artifactId>lenskit</artifactId>
    <version>2.0</version>
    <relativePath>..</relativePath>
  </parent>
  <artifactId>lenskit-eval</artifactId>
  <name>LensKit Evaluation Framework</name>

  <properties>
    <!-- Setting the compiler to groovy-eclipse-compiler tells Eclipse this is a Groovy project.
         Later in this file, a profile overrides this when run from the command line. -->
    <maven.compiler.compilerId>groovy-eclipse-compiler</maven.compiler.compilerId>
  </properties>

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

    <dependency>
      <groupId>org.grouplens.lenskit</groupId>
      <artifactId>lenskit-groovy</artifactId>
      <version>${project.version}</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.groovy</groupId>
          <artifactId>groovy</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy-all</artifactId>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>runtime</scope>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jul-to-slf4j</artifactId>
      <scope>runtime</scope>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
      <version>1.2</version>
    </dependency>

    <dependency>
      <groupId>org.apache.ant</groupId>
      <artifactId>ant</artifactId>
    </dependency>

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

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <executions>
          <execution>
            <id>default-testCompile</id>
            <configuration>
              <compilerId>groovy-eclipse-compiler</compilerId>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-eclipse-compiler</artifactId>
            <version>${groovy.eclipse.version}</version>
          </dependency>
          <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-eclipse-batch</artifactId>
            <version>${groovy.eclipse.batch}</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
    <pluginManagement>
    	<plugins>
    		<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
    		<plugin>
    			<groupId>org.eclipse.m2e</groupId>
    			<artifactId>lifecycle-mapping</artifactId>
    			<version>1.0.0</version>
    			<configuration>
    				<lifecycleMappingMetadata>
    					<pluginExecutions>
    						<pluginExecution>
    							<pluginExecutionFilter>
    								<groupId>org.codehaus.mojo</groupId>
    								<artifactId>
    									build-helper-maven-plugin
    								</artifactId>
    								<versionRange>[1.5,)</versionRange>
    								<goals>
    									<goal>add-source</goal>
    									<goal>add-test-source</goal>
    								</goals>
    							</pluginExecutionFilter>
    							<action>
    								<ignore />
    							</action>
    						</pluginExecution>
    					</pluginExecutions>
    				</lifecycleMappingMetadata>
    			</configuration>
    		</plugin>
    	</plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <!-- This profile will activate whenever maven.home is set, which should be any time Maven
           is run from the command line. It reverts the compiler back to javac, so that we can
           compile correctly. -->
      <id>non-eclipse</id>
      <activation>
        <property>
          <name>maven.home</name>
        </property>
      </activation>
      <properties>
        <maven.compiler.compilerId>javac</maven.compiler.compilerId>
      </properties>
    </profile>
  </profiles>
</project>
