blob: 33cdf06aa35d5a913d73e67bb633b562d5640084 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Archiva Documentation - Virtual Repositories</title>
<style type="text/css" media="all">
@import url("../css/maven-base.css");
@import url("../css/maven-theme.css");
@import url("../css/site.css");
</style>
<link rel="stylesheet" href="../css/print.css" type="text/css" media="print" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<?xml version="1.0" encoding="UTF-8"?>
<script type="text/javascript">var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script>
<?xml version="1.0" encoding="UTF-8"?>
<script type="text/javascript">var pageTracker = _gat._getTracker("UA-140879-5");
pageTracker._initData();
pageTracker._trackPageview();</script>
</head>
<body class="composite">
<div id="banner">
<a href="../../" id="bannerLeft">
<img src="http://archiva.apache.org/images/archiva.png" alt="" />
</a>
<a href="http://www.apache.org/" id="bannerRight">
<img src="http://www.apache.org/images/asf_logo_wide.png" alt="" />
</a>
<div class="clear">
<hr/>
</div>
</div>
<div id="breadcrumbs">
<div class="xleft">
<a href="http://www.apache.org/">Apache</a>
&gt;
<a href="../../../">Archiva</a>
&gt;
<a href="../index.html">1.3.9</a>
</div>
<div class="xright">
&nbsp;| Last Published: 01 Jul 2014
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="leftColumn">
<div id="navcolumn">
<h5>Introduction</h5>
<ul>
<li class="none">
<a href="../quick-start.html">Quick Start</a>
</li>
<li class="none">
<a href="../tour/index.html">Feature Tour</a>
</li>
<li class="none">
<a href="../release-notes.html">Release Notes</a>
</li>
<li class="none">
<a href="http://archiva.apache.org/download.html">Downloads</a>
</li>
</ul>
<h5>Users Guide</h5>
<ul>
<li class="none">
<a href="../userguide/browsing.html">Browsing</a>
</li>
<li class="none">
<a href="../userguide/searching.html">Searching</a>
</li>
<li class="none">
<a href="../userguide/find-artifact.html">Identifying an Artifact</a>
</li>
<li class="none">
<a href="../userguide/delete-artifact.html">Deleting an Artifact</a>
</li>
<li class="none">
<a href="../userguide/using-repository.html">Using as a repository</a>
</li>
<li class="none">
<a href="../userguide/deploy.html">Deploying to repository</a>
</li>
<li class="none">
<strong>Configuring Virtual Repositories</strong>
</li>
<li class="none">
<a href="../userguide/rss.html">Rss Feeds in Archiva</a>
</li>
<li class="none">
<a href="../userguide/auditlog-report.html">Audit Log Report</a>
</li>
</ul>
<h5>Administrators Guide</h5>
<ul>
<li class="collapsed">
<a href="../adminguide/installing.html">Installing Archiva</a>
</li>
<li class="none">
<a href="../adminguide/databases.html">Databases</a>
</li>
<li class="collapsed">
<a href="../adminguide/security.html">Security</a>
</li>
<li class="collapsed">
<a href="../adminguide/configuration.html">Runtime Configuration</a>
</li>
<li class="none">
<a href="../adminguide/configuration-files.html">Configuration Files</a>
</li>
<li class="collapsed">
<a href="../adminguide/logging.html">Log Files</a>
</li>
<li class="none">
<a href="../adminguide/reports.html">Reports</a>
</li>
<li class="none">
<a href="../adminguide/web-services.html">Web Services</a>
</li>
</ul>
<h5>Customising Archiva</h5>
<ul>
<li class="none">
<a href="../customising/writing-consumer.html">Writing a Consumer Plugin</a>
</li>
</ul>
<h5>More Information</h5>
<ul>
<li class="none">
<a href="http://cwiki.apache.org/confluence/display/ARCHIVA/Index">Archiva Wiki</a>
</li>
</ul>
<a href="http://maven.apache.org/" title="Built by Maven" id="poweredBy">
<img alt="Built by Maven" src="../images/logos/maven-feather.png"></img>
</a>
</div>
</div>
<div id="bodyColumn">
<div id="contentBox">
<div class="section"><h2>Virtual Repositories</h2><p>This is a new feature for Archiva 1.1. The main advantage of virtual repositories (or repository groups) is that you only need to specify one URL instead of multiple repository URLs if you are using more than 1 proxy repository.</p><p>For example, you have the following configuration in your <tt>settings.xml</tt>:</p><div class="source"><pre>&lt;settings&gt;
...
&lt;profiles&gt;
&lt;profile&gt;
&lt;id&gt;Repository Proxy&lt;/id&gt;
&lt;activation&gt;
&lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
&lt;/activation&gt;
&lt;repositories&gt;
&lt;repository&gt;
&lt;id&gt;internal.releases&lt;/id&gt;
&lt;url&gt;http://localhost:8080/archiva/repository/internal.releases/&lt;/url&gt;
&lt;releases&gt;
&lt;enabled&gt;true&lt;/enabled&gt;
&lt;/releases&gt;
&lt;snapshots&gt;
&lt;enabled&gt;false&lt;/enabled&gt;
&lt;/snapshots&gt;
&lt;/repository&gt;
&lt;repository&gt;
&lt;id&gt;third.party.repo&lt;/id&gt;
&lt;url&gt;http://localhost:8080/archiva/repository/third.party.repo/&lt;/url&gt;
&lt;releases&gt;
&lt;enabled&gt;true&lt;/enabled&gt;
&lt;/releases&gt;
&lt;snapshots&gt;
&lt;enabled&gt;false&lt;/enabled&gt;
&lt;/snapshots&gt;
&lt;/repository&gt;
&lt;repository&gt;
&lt;id&gt;snapshots&lt;/id&gt;
&lt;url&gt;http://localhost:8080/archiva/repository/snapshots/&lt;/url&gt;
&lt;releases&gt;
&lt;enabled&gt;false&lt;/enabled&gt;
&lt;/releases&gt;
&lt;snapshots&gt;
&lt;enabled&gt;true&lt;/enabled&gt;
&lt;/snapshots&gt;
&lt;/repository&gt;
&lt;/repositories&gt;
&lt;/profile&gt;
...
&lt;/profiles&gt;
...
&lt;/settings&gt;</pre></div><p>If you have a virtual repository configured in Archiva, you only need to configure this in your <tt>settings.xml</tt>:</p><div class="source"><pre>&lt;settings&gt;
...
&lt;profiles&gt;
&lt;profile&gt;
&lt;id&gt;Repository Proxy&lt;/id&gt;
&lt;activation&gt;
&lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
&lt;/activation&gt;
&lt;repositories&gt;
&lt;repository&gt;
&lt;id&gt;internal.releases&lt;/id&gt;
&lt;url&gt;http://localhost:8080/archiva/repository/[repository_group_id]/&lt;/url&gt;
&lt;/repository&gt;
&lt;/repositories&gt;
&lt;/profile&gt;
...
&lt;/profiles&gt;
...
&lt;/settings&gt;</pre></div><p>And you'll still be able to get all the artifacts that you need. See Configuring Virtual Repositories section for the steps on how to setup a virtual repo in Archiva.</p><div class="section"><h3>How It Works</h3><p>When Archiva receives a request with a virtual repo (or repo group) URL, Archiva would look for the requested artifact from the repositories under that group. It would only check the repositories the user has permission to access (meaning only those repositories which the user has an Obeserver role for). The first resource found for the requested artifact would be returned. </p></div><div class="section"><h3>Configuring Virtual Repositories</h3><p>Below are the steps for setting up the virtual repositories:</p><ol type="1"><li>In the webapp, go to the <tt>Repository Groups</tt> page. To create a virtual repository or repository group, fill in the <tt>Identifier</tt> field and click Add Group.</li><li>To add a repository under this group, choose from the drop-down menu on the lower right hand side of the repository group box and click Add Repository.</li><li>Now add the virtual repository URL <tt>http://[host]:[port]/archiva/repository/[repository_group_id]/</tt> into your settings.xml the same way you configure regular repositories -- as a <i>mirror</i> or as an additional <i>repository</i>.</li><li>If the repositories under the group are secured, you must set your Archiva login credentials in your settings.xml as well. Please take note that the <i>server</i> id should match the repository group identifier.</li></ol></div><div class="section"><h3>Webdav Browse</h3><p>Webdav Browse for a virtual repository is a read-only view. It displays the merged contents of all the repositories under that repository group. Just type the url of the virtual repository in your browser in order to view its contents. User will be asked to authenticate if the 'guest' account is not enabled for the repositories. Only those repositories which the user has permission to access will be shown.</p></div></div>
</div>
</div>
<div class="clear">
<hr/>
</div>
<div id="footer">
<div class="xright">&#169;
2006-2014
The Apache Software Foundation
</div>
<div class="clear">
<hr/>
</div>
</div>
</body>
</html>