<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you 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>
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.apache.maven.its.mng4190</groupId>
  <artifactId>test</artifactId>
  <version>0.1</version>

  <name>Maven Integration Test :: MNG-4190</name>
  <description>Test that artifact repositories are merged if they are mirrored by the same repo. If n repos map to one
    mirror, there is no point in making n trips to the same mirror. However, the effective/merged repo needs
    to account for possibly different policies of the original repos.</description>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven.its.mng4190</groupId>
      <artifactId>a</artifactId>
      <version>0.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.its.mng4190</groupId>
      <artifactId>b</artifactId>
      <version>0.1-SNAPSHOT</version>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <releases>
        <enabled>true</enabled>
        <checksumPolicy>fail</checksumPolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
        <checksumPolicy>fail</checksumPolicy>
      </snapshots>
      <id>repo-4</id>
      <url>file:///mng-4190/4</url>
    </repository>
    <repository>
      <releases>
        <enabled>true</enabled>
        <checksumPolicy>ignore</checksumPolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
        <checksumPolicy>ignore</checksumPolicy>
      </snapshots>
      <id>repo-5</id>
      <url>file:///mng-4190/5</url>
    </repository>
    <repository>
      <releases>
        <enabled>false</enabled>
        <checksumPolicy>ignore</checksumPolicy>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>always</updatePolicy>
        <checksumPolicy>ignore</checksumPolicy>
      </snapshots>
      <id>repo-6</id>
      <url>file:///mng-4190/6</url>
    </repository>
  </repositories>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.its.plugins</groupId>
        <artifactId>maven-it-plugin-dependency-resolution</artifactId>
        <version>2.1-SNAPSHOT</version>
        <executions>
          <execution>
            <id>test</id>
            <goals>
              <goal>test</goal>
            </goals>
            <phase>validate</phase>
            <configuration>
              <projectArtifacts>target/artifacts.txt</projectArtifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.its.plugins</groupId>
        <artifactId>maven-it-plugin-expression</artifactId>
        <version>2.1-SNAPSHOT</version>
        <executions>
          <execution>
            <id>dump</id>
            <goals>
              <goal>eval</goal>
            </goals>
            <phase>validate</phase>
            <configuration>
              <outputFile>target/repo.properties</outputFile>
              <expressions>
                <expression>project/remoteArtifactRepositories</expression>
              </expressions>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
