Search code examples
eclipsemavennexusp2sonatype

How to prevent Nexus P2 proxy repository from updating?


Short Question: Is there a way to configure Nexus to not update a proxy P2 repository from a remote repository?

The Longer Version: We have a Nexus server that is used to internally host maven artifacts. There is a p2 proxy repository for a remote Eclipse P2 repository (Subclipse). The url of the remote repository is http://subclipse.tigris.org/update_1.10.x. This proxy repository is part of a repository group. This setup works fine normally.

The issue is when Subclipse updates the remote site with newer artifacts (say, they move from 1.10.5 to 1.10.6). The proxy repository automatically gets the newer artifacts. We have a target platform file for Eclipse where the version numbers for features have to be fixed. When Subclipse gets updated, the fixed version number that the target platform looks for doesn't exist anymore.

So I would rather that the proxy repository does not automatically update itself. I would like to have a tighter control on when these updates are pulled in. Is there a way to configure Nexus to not get updates from the remote repository?


Solution

  • Setting the metadata max age of the proxy to -1 will disable metadata updates, but still allow new artifact downloads. This should solve it for you.