Using Nexus Repository manager as binary cache server¶
It is possible to use Nexus Repository Manager
as a binary cache server
instead of GitHub.
Nexus installation¶
In order to install and configure Nexus Repository Manager, please follow
official documentation.
There is also possibility do download docker images
where
Nexus Repository Manager
is already installed:
Nexus adding, configuring and managing repositories¶
To create new or manage existing repository follow this links:
Uploading cache binaries to Nexus¶
The simplest way to upload local cache binaries to Nexus server is by using
cURL
:
$ cd hunter/_Base/Cache/meta
$ CACHE_REPOSITORY_URL="http://my.nexus.server.com/content/repositories/hunter/cache"
$ find ./ -type f -exec curl -u nexuser:nexpwd --upload-file "{}" "$CACHE_REPOSITORY_URL/meta/{}"
$ cd ../raw
$ find ./ -type f -exec curl -u nexuser:nexpwd --upload-file "{}" "$CACHE_REPOSITORY_URL/raw/{}"
Configuring Hunter to use Nexus¶
Set HUNTER_CACHE_SERVERS
variable before HunterGate
to configure Hunter
to use Nexus
server:
set(
HUNTER_CACHE_SERVERS
"http://my.nexus.server.com/content/repositories/hunter/cache"
CACHE
STRING
"Hunter cache servers"
)
HunterGate(URL "..." SHA1 "...")