Skip to main content
Jump to: navigation, search

Difference between revisions of "Tycho/Target Platform/Authentication and Mirrors"

(Note that <mirrorOf> supports multiple elements)
m (minor correction of html that was showing through: <tt> --> </tt> and removed </div>)
Line 36: Line 36:
 
</pre>
 
</pre>
  
Like for credentials, the repository ID is either the configured ID or the URL of the repository (without trailing slash). Note that <tt>mirrorOf<tt> supports multiple elements separated by commas.
+
Like for credentials, the repository ID is either the configured ID or the URL of the repository (without trailing slash). Note that <tt>mirrorOf</tt> supports multiple elements separated by commas.
  
 
Note: Mirrors for repositories specified in target files are only supported since Tycho 0.16.0 (see [https://bugs.eclipse.org/bugs/show_bug.cgi?id=356016 bug 356016]).
 
Note: Mirrors for repositories specified in target files are only supported since Tycho 0.16.0 (see [https://bugs.eclipse.org/bugs/show_bug.cgi?id=356016 bug 356016]).
</div>
+
 
  
 
[[Category:Tycho|Target Platform/Authentication and Mirrors]]
 
[[Category:Tycho|Target Platform/Authentication and Mirrors]]

Revision as of 16:11, 26 March 2016

Similar to what is possible Maven, you can influence how Tycho accesses remote p2 repositories through configuration parameters in the Maven settings.xml.

Credentials for p2 Repositories

In order to specify user name and password for a p2 repository requiring basic authentication, add a <server> entry in the settings.xml.

<servers>
   <server>
      <id>repository-id</id>
      <username></username>
      <password></password>
   </server>
</servers>

When accessing a p2 repository, Tycho will check if there is a <server> entry with matching ID and use these credentials. The ID of a p2 repository can be specified explicitly, e.g. when the repository is added in the POM. If no ID is specified, e.g. in a target file, the repository URL (without trailing slash) is used as ID (since Tycho 0.16.0).

Loading p2 Repositories from Alternative Locations

In order to load a p2 repository from an alternative location, e.g. a local mirror of the repository, add a <mirror> configuration entry in the settings.xml. Example:

<mirrors>
   <mirror>
      <id>mirror-id</id>
      <mirrorOf>repository-id</mirrorOf>
      <url>http://mirror_url</url>
      <layout>p2</layout>
      <mirrorOfLayouts>p2</mirrorOfLayouts>
   </mirror>
</mirrors>

Like for credentials, the repository ID is either the configured ID or the URL of the repository (without trailing slash). Note that mirrorOf supports multiple elements separated by commas.

Note: Mirrors for repositories specified in target files are only supported since Tycho 0.16.0 (see bug 356016).

Back to the top