<?xml version="1.0"?>

<!--
Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
Licensed under the Apache License, Version 2.0 (see LICENSE).
-->

<!--
  This ivysettings wrapper is used during artifact publishing to make sure published artifacts are
  resolved only through a temporary cache leaving the user-configured ivy caches unpolluted.
-->

<!-- generated by pants! -->
<ivysettings>
  <include file="{{ivysettings}}"/>

  <caches>
    <cache name="__pants_publish_cache__" basedir="{{cachedir}}" useOrigin="true"/>
  </caches>

  <resolvers>
    <filesystem name="__pants_publish_repo__" local="true" cache="__pants_publish_cache__">
      <ivy pattern="{{dir}}/[organisation]/[module]/ivy-[revision].xml" />
      <artifact pattern="{{dir}}/[organisation]/[module]/[artifact]-[revision](-[classifier]).[ext]"/>
    </filesystem>
    {{#publish_local}}
    <filesystem name="publish_local" transactional="false" local="true" m2compatible="true">
      <ivy pattern="{{publish_local}}/[organisation]/[module]/[revision]/ivy-[revision].xml" />
      <artifact pattern="{{publish_local}}/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
    </filesystem>
    {{/publish_local}}
  </resolvers>

  <modules>
    {{#published}}
    <module organisation="{{org}}" name="{{name}}"
            resolver="__pants_publish_repo__"/>
    {{/published}}
  </modules>
</ivysettings>
