<!--
  ~ 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.
  -->

<component-set>
  <components>
    <component>
      <role>org.apache.maven.wagon.Wagon</role>
      <role-hint>test</role-hint>
      <implementation>org.apache.maven.archiva.proxy.WagonDelegate</implementation>
    </component>
    <component>
      <role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role>
      <role-hint>mock</role-hint>
      <implementation>org.apache.maven.archiva.proxy.MockConfiguration</implementation>
    </component>
    <component>
      <role>org.apache.maven.archiva.repository.RepositoryContentFactory</role>
      <role-hint>mocked</role-hint>
      <implementation>org.apache.maven.archiva.repository.RepositoryContentFactory</implementation>
      <description>RepositoryContentRequest</description>
      <requirements>
        <requirement>
          <role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role>
          <role-hint>mock</role-hint>
          <field-name>archivaConfiguration</field-name>
        </requirement>
      </requirements>
    </component>


    <component>
      <role>org.apache.maven.archiva.repository.metadata.MetadataTools</role>
      <implementation>org.apache.maven.archiva.repository.metadata.MetadataTools</implementation>
      <description>MetadataTools</description>
      <requirements>
        <requirement>
          <role>org.apache.maven.archiva.configuration.FileTypes</role>
          <field-name>filetypes</field-name>
        </requirement>
        <requirement>
          <role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role>
          <role-hint>mock</role-hint>
          <field-name>configuration</field-name>
        </requirement>
      </requirements>
    </component>

    <component>
      <role>org.apache.maven.archiva.proxy.RepositoryProxyConnectors</role>
      <role-hint>default</role-hint>
      <implementation>org.apache.maven.archiva.proxy.DefaultRepositoryProxyConnectors</implementation>
      <description>DefaultRepositoryProxyConnectors</description>
      <requirements>
        <requirement>
          <role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role>
          <role-hint>mock</role-hint>
          <field-name>archivaConfiguration</field-name>
        </requirement>
        <requirement>
          <role>org.apache.maven.archiva.proxy.WagonFactory</role>
        </requirement>
        <requirement>
          <role>org.apache.maven.archiva.repository.RepositoryContentFactory</role>
          <role-hint>mocked</role-hint>
        </requirement>
        <requirement>
          <role>org.apache.maven.archiva.repository.metadata.MetadataTools</role>
        </requirement>
        <requirement>
          <role>org.apache.maven.archiva.policies.PreDownloadPolicy</role>
          <field-name>preDownloadPolicies</field-name>
        </requirement>
        <requirement>
          <role>org.apache.maven.archiva.policies.PostDownloadPolicy</role>
          <field-name>postDownloadPolicies</field-name>
        </requirement>
        <requirement>
          <role>org.apache.maven.archiva.repository.scanner.RepositoryContentConsumers</role>
          <field-name>consumers</field-name>
        </requirement>
        <requirement>
          <role>org.apache.maven.archiva.policies.urlcache.UrlFailureCache</role>
          <field-name>urlFailureCache</field-name>
        </requirement>
      </requirements>
    </component>

    <component>
      <role>org.codehaus.plexus.cache.Cache</role>
      <role-hint>url-failures-cache</role-hint>
      <implementation>org.codehaus.plexus.cache.ehcache.EhcacheCache</implementation>
      <description>URL Failure Cache</description>
      <configuration>
        <disk-expiry-thread-interval-seconds>600</disk-expiry-thread-interval-seconds>
        <disk-persistent>false</disk-persistent> <!--disabling disk persistence for unit testing. -->
        <disk-store-path>${java.io.tmpdir}/archiva/urlcache</disk-store-path>
        <eternal>false</eternal>
        <max-elements-in-memory>1000</max-elements-in-memory>
        <memory-eviction-policy>LRU</memory-eviction-policy>
        <name>url-failures-cache</name>
        <overflow-to-disk>false</overflow-to-disk>
        <!-- 45 minutes = 2700 seconds -->
        <time-to-idle-seconds>2700</time-to-idle-seconds>
        <!-- 30 minutes = 1800 seconds  -->
        <time-to-live-seconds>1800</time-to-live-seconds>
      </configuration>
    </component>
  </components>
</component-set>
