You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Lakshman Srilakshmanan <la...@tradingpost.com.au> on 2006/09/05 10:03:28 UTC

central Repository and mirrorOf

Hi All,

Could someone please clarify the difference between declaring 


<mirrorOf>central</mirrorOf>

and

      <repository>
        <id>central</id>
        <name>Internal Mirror of Central Repository</name>
        <url>http://my.test/central</url>
      </repository>


It appears to me that maven will look at <mirrorOf> to find it's
download. 
So what would be the difference in declaring <id>central</id>.

To me it appears to be doing the same thing. I must be missing
something.

Could someone please help me to clarify this doubt

Thanks
Lakshman


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: central Repository and mirrorOf

Posted by Arnaud Bailly <ab...@oqube.com>.
"Lakshman Srilakshmanan" <la...@tradingpost.com.au> writes:

> Hi All,
>
> Could someone please clarify the difference between declaring 
>
>
> <mirrorOf>central</mirrorOf>

 - mirrorOf of defines a server as a mirror of another server. 

 - Repository (and pluginRepository) define a nem identified
   repository that will be queried for data. 

When maven is looking for an artifact, it tries all its repositories,
starting from local repo, then user defined repos, then default
ones. When a query is issued to a repository, the latter is referenced
by its id so there may abe additional indirection layers before the
query hit any actual server:
 - mirrors are used to change the url of a repo
 - proxies are used to access the external world
 - servers are used to resolve identification issues

Through this mechanism, users can define "abstract" repositories in
POMs that will be resolved to real servers according to local policy
(ie. settings.xml).
 
Not absolutely sure of all details but I think this correct on the
whole.

HTH

-- 
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org