<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Artifactory is a binaries repository manager.
  ~ Copyright (C) 2012 JFrog Ltd.
  ~
  ~ Artifactory is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU Lesser General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ Artifactory is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public License
  ~ along with Artifactory.  If not, see <http://www.gnu.org/licenses/>.
  -->

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://artifactory.jfrog.org/xsd/1.4.11"
        xsi:schemaLocation="http://artifactory.jfrog.org/xsd/1.4.11
        http://www.jfrog.org/xsd/artifactory-v1_4_11.xsd">
    <!--
    enable/disable anonymous downloads
    -->
    <security>
        <anonAccessEnabled>true</anonAccessEnabled>
        <!--<ldapSettings>
            <ldapSetting>
                <key>ldap1</key>
                <enabled>true</enabled>
                <ldapUrl>ldap://mydomain:389/dc=mycompany,dc=com</ldapUrl>
                <userDnPattern>uid={0}, ou=People</userDnPattern>
            </ldapSetting>
        </ldapSettings>-->
    </security>
    <backups>
        <backup>
            <key>backup-daily</key>
            <!--
            backup Monday to Friday at 2:00 AM
            -->
            <cronExp>0 0 2 ? * MON-FRI</cronExp>
            <!--
            Always backup to a "current" dir (incremental backups)
            -->
            <retentionPeriodHours>0</retentionPeriodHours>
            <!--
            exclude certain repositories from being backed up
            -->
            <excludedRepositories>
                <repositoryRef>repo1</repositoryRef>
            </excludedRepositories>
        </backup>
        <backup>
            <key>backup-weekly</key>
            <!--
            backup on Saturday at 2:00 AM
            -->
            <cronExp>0 0 2 ? * SAT</cronExp>
            <!--
            keep backups for 2 weeks.
            -->
            <retentionPeriodHours>336</retentionPeriodHours>
            <!--
            exclude certain repositories from being backed up
            -->
            <excludedRepositories>
                <repositoryRef>repo1</repositoryRef>
            </excludedRepositories>
        </backup>
    </backups>

    <!-- The interval at which to activate the maven indexer. -->
    <indexer>
        <!-- By Default index every 24 hours -->
        <indexingIntervalHours>24</indexingIntervalHours>
    </indexer>

    <localRepositories>
        <localRepository>
            <key>libs-release-local</key>
            <description>Local repository for in-house libraries</description>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <handleReleases>true</handleReleases>
            <handleSnapshots>false</handleSnapshots>
        </localRepository>
        <localRepository>
            <key>libs-snapshot-local</key>
            <description>Local repository for in-house snapshots</description>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <handleReleases>false</handleReleases>
            <handleSnapshots>true</handleSnapshots>
        </localRepository>
        <localRepository>
            <key>plugins-release-local</key>
            <description>Local repository for plugins</description>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <handleReleases>true</handleReleases>
            <handleSnapshots>false</handleSnapshots>
        </localRepository>
        <localRepository>
            <key>plugins-snapshot-local</key>
            <description>Local repository for plugins snapshots</description>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <handleReleases>false</handleReleases>
            <handleSnapshots>true</handleSnapshots>
        </localRepository>
        <localRepository>
            <key>ext-release-local</key>
            <description>Local repository for third party libraries</description>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <handleReleases>true</handleReleases>
            <handleSnapshots>false</handleSnapshots>
        </localRepository>
        <localRepository>
            <key>ext-snapshot-local</key>
            <description>Local repository for third party snapshots</description>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <handleReleases>false</handleReleases>
            <handleSnapshots>true</handleSnapshots>
        </localRepository>

        <!--
        A sample local repository with all possible settings
        -->
        <!--
        <localRepository>
            <key>local-sample</key>
            <description>Sample local repository</description>
            <blackedOut>false</blackedOut>
            <handleReleases>true</handleReleases>
            <handleSnapshots>true</handleSnapshots>
            -->
        <!--
        maximum number of unique stnapshot to keep
        -->
        <!--
        <maxUniqueSnapshots>3</maxUniqueSnapshots>
        <includesPattern>*/**</includesPattern>
        <excludesPattern>com/mycompany/**</excludesPattern>
        -->
        <!--
        centrally control unique snapshots behavior (non-unique|unique|deployer)
        -->
        <!--
            <snapshotVersionBehavior>non-unique</snapshotVersionBehavior>
        </localRepository>
        -->
    </localRepositories>

    <remoteRepositories>
        <remoteRepository>
            <key>repo1</key>
            <description>Central Maven 2 repository</description>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <handleReleases>true</handleReleases>
            <handleSnapshots>false</handleSnapshots>
            <url>http://repo1.maven.org/maven2</url>
        </remoteRepository>
        <remoteRepository>
            <key>java.net.m2</key>
            <description>java.net Maven2 Format</description>
            <excludesPattern>commons-*,org/apache/**</excludesPattern>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <handleReleases>true</handleReleases>
            <handleSnapshots>true</handleSnapshots>
            <url>http://download.java.net/maven/2</url>
        </remoteRepository>
        <remoteRepository>
            <key>java.net.m1</key>
            <description>java.net Maven1 Format</description>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <handleReleases>true</handleReleases>
            <handleSnapshots>true</handleSnapshots>
            <url>http://download.java.net/maven/1</url>
            <remoteRepoLayoutRef>maven-1-default</remoteRepoLayoutRef>
        </remoteRepository>
        <remoteRepository>
            <key>jfrog-libs</key>
            <description>JFrog libraries releases</description>
            <excludesPattern>org/apache/maven/**</excludesPattern>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <handleReleases>true</handleReleases>
            <handleSnapshots>false</handleSnapshots>
            <url>http://repo.jfrog.org/artifactory/libs-releases-local</url>
        </remoteRepository>
        <remoteRepository>
            <key>jfrog-plugins</key>
            <description>JFrog plugins releases</description>
            <includesPattern>org/jfrog/**</includesPattern>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <handleReleases>true</handleReleases>
            <handleSnapshots>false</handleSnapshots>
            <url>http://repo.jfrog.org/artifactory/plugins-releases-local</url>
        </remoteRepository>
        <remoteRepository>
            <key>jboss</key>
            <description>JBoss Maven2 releases</description>
            <includesPattern>org/jboss/**,org/hibernate/**,org/richfaces/**,org/drools/**</includesPattern>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <handleReleases>true</handleReleases>
            <handleSnapshots>false</handleSnapshots>
            <url>http://repository.jboss.org/nexus/content/groups/public-jboss</url>
        </remoteRepository>
        <remoteRepository>
            <key>codehaus</key>
            <description>Codehaus Maven2 releases</description>
            <includesPattern>org/**,com/**,net/**</includesPattern>
            <excludesPattern>org/apache/**,commons-*,org/artifactory/**,org/jfrog/**</excludesPattern>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <handleReleases>true</handleReleases>
            <handleSnapshots>false</handleSnapshots>
            <url>http://repository.codehaus.org</url>
        </remoteRepository>
        <remoteRepository>
            <key>spring-milestone</key>
            <description>SpringSource in milestone version</description>
            <includesPattern>org/springframework/**</includesPattern>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <handleReleases>true</handleReleases>
            <handleSnapshots>false</handleSnapshots>
            <url>http://maven.springframework.org/milestone</url>
        </remoteRepository>
        <remoteRepository>
            <key>spring-release</key>
            <description>SpringSource releases</description>
            <includesPattern>org/springframework/**</includesPattern>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <handleReleases>true</handleReleases>
            <handleSnapshots>false</handleSnapshots>
            <url>http://maven.springframework.org/release</url>
        </remoteRepository>
        <remoteRepository>
            <key>google-code</key>
            <description>Google's open source releases</description>
            <includesPattern>com/google/**</includesPattern>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <handleReleases>true</handleReleases>
            <handleSnapshots>false</handleSnapshots>
            <url>http://google-maven-repository.googlecode.com/svn/repository</url>
        </remoteRepository>
        <remoteRepository>
            <key>gradle-libs</key>
            <description>Gradle libraries</description>
            <includesPattern>**/*</includesPattern>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <handleReleases>true</handleReleases>
            <handleSnapshots>false</handleSnapshots>
            <url>http://gradle.artifactoryonline.com/gradle/libs</url>
        </remoteRepository>
        <remoteRepository>
            <key>gradle-plugins</key>
            <description>Gradle plugins</description>
            <includesPattern>**/*</includesPattern>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <handleReleases>true</handleReleases>
            <handleSnapshots>false</handleSnapshots>
            <url>http://gradle.artifactoryonline.com/gradle/plugins</url>
        </remoteRepository>

        <!-- A sample remote repository with all possible tunings -->
        <!--
        <remoteRepository>
        <key>remote-sample</key>
        <description>Sample remote repository</description>
        -->
        <!--
        blok the usage of this repository
        -->
        <!--<blackedOut>false</blackedOut>-->
        <!--
        maximum number of unique stnapshot to keep
        -->
        <!--<maxUniqueSnapshots>3</maxUniqueSnapshots>-->
        <!--<includesPattern>*/**</includesPattern>-->
        <!--<excludesPattern>com/mycompany/**</excludesPattern>-->
        <!--<url>http://maven.repo/repository</url>-->
        <!--
        put offline to use only the cache and not send remote requests
        -->
        <!--<offline>false</offline>-->
        <!--<hardFail>true</hardFail>-->
        <!--
        cache remotely retrieved artifacts (you'd want 'true')
        -->
        <!--<storeArtifactsLocally>true</storeArtifactsLocally>-->
        <!--
        number of seconds to cache artifact lookup results
        -->
        <!--<retrievalCachePeriodSecs>43200</retrievalCachePeriodSecs>-->
        <!--
        number of seconds to cache artifact retrieval failures (normally communication errors)
        -->
        <!--<failedRetrievalCachePeriodSecs>30</failedRetrievalCachePeriodSecs>-->
        <!--
        number of seconds to remember artifact retrieval misses (artifact not found)
        -->
        <!--<missedRetrievalCachePeriodSecs>43200</missedRetrievalCachePeriodSecs>-->
        <!--
        ttp authentication details
        -->
        <!--<username>un</username>-->
        <!--<password>pw</password>-->
        <!--
        network timeout for both connection establishment failures and unanswered requests
        -->
        <!--<socketTimeoutMillis>2000</socketTimeoutMillis>-->
        <!--
        proxy reference
        -->
        <!--<proxyRef>unused-proxy</proxyRef>-->
        <!--</remoteRepository>-->
    </remoteRepositories>

    <virtualRepositories>
        <!-- This repository will be available at the url:
        http://<host>:<port>/artifactory/snapshots-only/
        (note the trailing slash!)
        -->
        <virtualRepository>
            <key>remote-repos</key>
            <artifactoryRequestsCanRetrieveRemoteArtifacts>true</artifactoryRequestsCanRetrieveRemoteArtifacts>
            <repositories>
                <repositoryRef>codehaus</repositoryRef>
                <repositoryRef>jboss</repositoryRef>
                <repositoryRef>java.net.m2</repositoryRef>
                <repositoryRef>java.net.m1</repositoryRef>
                <repositoryRef>repo1</repositoryRef>
                <repositoryRef>jfrog-libs</repositoryRef>
                <repositoryRef>jfrog-plugins</repositoryRef>
                <repositoryRef>spring-milestone</repositoryRef>
                <repositoryRef>spring-release</repositoryRef>
                <repositoryRef>google-code</repositoryRef>
                <repositoryRef>gradle-libs</repositoryRef>
                <repositoryRef>gradle-plugins</repositoryRef>
            </repositories>
            <pomRepositoryReferencesCleanupPolicy>discard_active_reference</pomRepositoryReferencesCleanupPolicy>
        </virtualRepository>
        <virtualRepository>
            <key>libs-release</key>
            <repositories>
                <repositoryRef>libs-release-local</repositoryRef>
                <repositoryRef>ext-release-local</repositoryRef>
                <repositoryRef>remote-repos</repositoryRef>
            </repositories>
        </virtualRepository>
        <virtualRepository>
            <key>plugins-release</key>
            <repositories>
                <repositoryRef>plugins-release-local</repositoryRef>
                <repositoryRef>ext-release-local</repositoryRef>
                <repositoryRef>remote-repos</repositoryRef>
            </repositories>
            <pomRepositoryReferencesCleanupPolicy>discard_active_reference</pomRepositoryReferencesCleanupPolicy>
        </virtualRepository>
        <virtualRepository>
            <key>libs-snapshot</key>
            <repositories>
                <repositoryRef>libs-snapshot-local</repositoryRef>
                <repositoryRef>ext-snapshot-local</repositoryRef>
                <repositoryRef>remote-repos</repositoryRef>
            </repositories>
            <pomRepositoryReferencesCleanupPolicy>discard_active_reference</pomRepositoryReferencesCleanupPolicy>
        </virtualRepository>
        <virtualRepository>
            <key>plugins-snapshot</key>
            <repositories>
                <repositoryRef>plugins-snapshot-local</repositoryRef>
                <repositoryRef>ext-snapshot-local</repositoryRef>
                <repositoryRef>remote-repos</repositoryRef>
            </repositories>
            <pomRepositoryReferencesCleanupPolicy>discard_active_reference</pomRepositoryReferencesCleanupPolicy>
        </virtualRepository>
    </virtualRepositories>

    <!--
        <proxies>
            <proxy>
                <key>unused-proxy</key>
                <host>host</host>
                <port>8080</port>
                <username>un</username>
                <password>pw</password>
                <domain>mydomain</domain>
            </proxy>
        </proxies>
    -->

    <repoLayouts>
        <repoLayout>
            <name>maven-2-default</name>
            <artifactPathPattern>[orgPath]/[module]/[baseRev](-[folderItegRev])/[module]-[baseRev](-[fileItegRev])(-[classifier]).[ext]</artifactPathPattern>
            <distinctiveDescriptorPathPattern>true</distinctiveDescriptorPathPattern>
            <descriptorPathPattern>[orgPath]/[module]/[baseRev](-[folderItegRev])/[module]-[baseRev](-[fileItegRev])(-[classifier]).pom</descriptorPathPattern>
            <folderIntegrationRevisionRegExp>SNAPSHOT</folderIntegrationRevisionRegExp>
            <fileIntegrationRevisionRegExp>SNAPSHOT|(?:(?:[0-9]{8}.[0-9]{6})-(?:[0-9]+))</fileIntegrationRevisionRegExp>
        </repoLayout>
        <repoLayout>
            <name>ivy-default</name>
            <artifactPathPattern>[org]/[module]/[baseRev](-[folderItegRev])/[type]s/[module](-[classifier])-[baseRev](-[fileItegRev]).[ext]</artifactPathPattern>
            <distinctiveDescriptorPathPattern>true</distinctiveDescriptorPathPattern>
            <descriptorPathPattern>[org]/[module]/[baseRev](-[folderItegRev])/[type]s/ivy-[baseRev](-[fileItegRev]).xml</descriptorPathPattern>
            <folderIntegrationRevisionRegExp>\d{14}</folderIntegrationRevisionRegExp>
            <fileIntegrationRevisionRegExp>\d{14}</fileIntegrationRevisionRegExp>
        </repoLayout>
        <repoLayout>
            <name>gradle-default</name>
            <artifactPathPattern>[org]/[module]/[baseRev](-[folderItegRev])/[module]-[baseRev](-[fileItegRev])(-[classifier]).[ext]</artifactPathPattern>
            <distinctiveDescriptorPathPattern>true</distinctiveDescriptorPathPattern>
            <descriptorPathPattern>[org]/[module]/ivy-[baseRev](-[fileItegRev]).xml</descriptorPathPattern>
            <folderIntegrationRevisionRegExp>\d{14}</folderIntegrationRevisionRegExp>
            <fileIntegrationRevisionRegExp>\d{14}</fileIntegrationRevisionRegExp>
        </repoLayout>
        <repoLayout>
            <name>maven-1-default</name>
            <artifactPathPattern>[org]/[type]s/[module]-[baseRev](-[fileItegRev])(-[classifier]).[ext]</artifactPathPattern>
            <distinctiveDescriptorPathPattern>true</distinctiveDescriptorPathPattern>
            <descriptorPathPattern>[org]/[type]s/[module]-[baseRev](-[fileItegRev]).pom</descriptorPathPattern>
            <folderIntegrationRevisionRegExp>.+</folderIntegrationRevisionRegExp>
            <fileIntegrationRevisionRegExp>.+</fileIntegrationRevisionRegExp>
        </repoLayout>
    </repoLayouts>
    <gcConfig>
        <cronExp>0 0 /4 * * ?</cronExp>
    </gcConfig>
</config>
