Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] p2 mirrors

Hi all,

In our development environment we use an Eclipse target definition to define what 3rd party libraries we depend on. Using Tycho's target-platform-configuration we have successfully been able to get our Tycho builds use that target definition.

We run our Tycho builds on different sites and for some setups the dependency resolutions of builds are quite slow due to high network latency and / or low bandwidth. As a first measure we changed our target definition to use release specific p2 repositories instead of composites (so e.g. http://download.eclipse.org/releases/kepler/201402280900 instead of http://download.eclipse.org/releases/kepler). That also has its downsides but it works well for us.

As an additional measure we would like to set up mirrors for some of the p2 repositories referenced in our target definition. Based on the documentation I found (see https://wiki.eclipse.org/Tycho/Target_Platform/Authentication_and_Mirrors) I thought I should be able to define a mirror for a repository referenced in the target definition using the repository's URL as its ID. So e.g. add the following to ~/.m2/settings.xml:

    <mirror>
      <id>kepler</id>
      <url>file:///tmp/mirrors/kepler</url>
    </mirror>

Unfortunately that doesn't seem to work (the mirror is just ignored). I suppose this might work if I also define the repository in the pom.xml using some ID, but I would like to avoid this kind of redundancy if possible.

Does anyone have an idea why this isn't working? I am using Tycho 0.21 and Maven 3.2.3.

Also, maybe someone has other ways of setting up mirrors or other tricks to speed up Maven builds. What I like about the mirroring approach above is that it doesn't require any additional server or software to be installed and it doesn't require me to change the URLs of the p2 official repositories to some custom clone (e.g. Nexus proxy or whatever), which means that the target definition is always correct and resolvable.

Regards,

Knut Wannheden

Back to the top