<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ Copyright 2011 Stephen Connolly
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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.codehaus.mojo</groupId>
    <artifactId>mojo-parent</artifactId>
    <version>39</version>
  </parent>

  <groupId>org.codehaus.mojo</groupId>
  <artifactId>mrm</artifactId>
  <version>1.0.0</version>
  <packaging>pom</packaging>

  <name>Mock Repository Manager: Project</name>
  <description>
    Mock Repository Manager for Maven. The Mock Repository Manager provides a mock Maven
    repository manager.
  </description>
  <inceptionYear>2009</inceptionYear>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Stephen Connolly</name>
      <email>stephen.alan.connolly@gmail.com</email>
      <roles>
        <role>Lead Developer</role>
      </roles>
      <timezone>0</timezone>
    </developer>
    <developer>
      <id>rscholte</id>
      <name>Robert Scholte</name>
      <timezone>Europe/Amsterdam</timezone>
      <roles>
        <role>Java Developer</role>
      </roles>
    </developer>
  </developers>

  <prerequisites>
    <maven>${mavenVersion}</maven>
  </prerequisites>

  <modules>
    <module>mrm-api</module>
    <module>mrm-servlet</module>
    <module>mrm-webapp</module>
    <module>mrm-maven-plugin</module>
  </modules>

  <scm>
    <connection>scm:git:https://github.com/mojohaus/mrm.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/mojohaus/mrm.git</developerConnection>
    <url>https://github.com/mojohaus/mrm</url>
    <tag>mrm-1.0.0</tag>
  </scm>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/mojohaus/mrm/issues</url>
  </issueManagement>
  <ciManagement>
    <system>Travis</system>
    <url>https://travis-ci.org/mojohaus/mrm</url>
  </ciManagement>

  <properties>
    <scmpublish.content>target/staging/mrm</scmpublish.content>
    <mavenVersion>2.2.1</mavenVersion>
    <mojo.java.target>1.5</mojo.java.target>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>${mavenVersion}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-repository-metadata</artifactId>
        <version>3.0.3</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-artifact</artifactId>
        <version>${mavenVersion}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-artifact-manager</artifactId>
        <version>${mavenVersion}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-core</artifactId>
        <version>${mavenVersion}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-model</artifactId>
        <version>${mavenVersion}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.shared</groupId>
        <artifactId>maven-common-artifact-filters</artifactId>
        <version>1.4</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-utils</artifactId>
        <version>3.0.24</version>
      </dependency>
      <dependency>
        <groupId>backport-util-concurrent</groupId>
        <artifactId>backport-util-concurrent</artifactId>
        <version>3.1</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-project</artifactId>
        <version>${mavenVersion}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.archetype</groupId>
        <artifactId>archetype-common</artifactId>
        <version>2.2</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.0.1</version>
      </dependency>
      <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.6</version>
      </dependency>
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.4</version>
      </dependency>
      <!-- older versions of icu4j contain invalid class files -->
      <dependency>
        <groupId>com.ibm.icu</groupId>
        <artifactId>icu4j</artifactId>
        <version>3.4.4</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.10</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>1.9.0</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-publish-plugin</artifactId>
          <configuration>
            <content>${project.build.directory}/staging/mrm</content>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>jetty-maven-plugin</artifactId>
          <version>8.0.1.v20110908</version>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-java</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>${mojo.java.target}</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>animal-sniffer-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>check-java</id>
            <phase>test</phase>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <signature>
                <groupId>org.codehaus.mojo.signature</groupId>
                <artifactId>java15</artifactId>
                <version>1.0</version>
              </signature>
              <ignores>
                <ignore>net.sourceforge.cobertura.coveragedata.TouchCollector</ignore>
              </ignores>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-invoker-plugin</artifactId>
        <configuration>
          <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
          <showErrors>true</showErrors>
          <streamLogs>true</streamLogs>
          <settingsFile>src/it/settings.xml</settingsFile>
          <postBuildHookScript>verify</postBuildHookScript>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <executions>
          <execution>
            <inherited>false</inherited>
            <goals>
              <goal>attach-descriptor</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>disable-doclint-for-jdk8</id>
      <activation>
        <jdk>1.8</jdk>
      </activation>
      <properties>
        <additionalparam>-Xdoclint:none</additionalparam>
      </properties>
    </profile>
    <profile>
      <!-- run integration tests
          to use this profile:
          or run integration tests: mvn -Prun-its
          Always run on travis
      -->
      <id>run-its</id>
      <activation>
        <property>
          <name>env.CONTINUOUS_INTEGRATION</name>
        </property>
      </activation>
      <build>
        <defaultGoal>verify</defaultGoal>
        <plugins>
          <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
            <executions>
              <execution>
                <id>integration-test</id>
                <goals>
                  <goal>install</goal>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <streamLogs>true</streamLogs>
                  <debug>false</debug>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
