Skip to content

How to use with Nexus Indexer

ikedam edited this page Aug 31, 2013 · 2 revisions

Create Repository Index

Create a repository index using Nexus Indexer.

Download nexus-indexer-XXX-cli.jar. It is difficult to find out. The easiest way to get it is to download from a maven repository. Go to http://search.maven.org/, search "nexus-indexer", and you can find nexus-indexer-XXX-cli.jar in some version nexus-indexer directory.

Then you run following command:

cd releases 
java -jar path/to/nexus-indexer-3.0.4-cli.jar -t full -n "your repository name" -r . -i . -d .

releases/nexus-maven-repository-index.gz will be generated. Commit it. Default paths for index file in Jenkins backend-update-center2 is releases/.index/nexus-maven-repository-index.gz, but .XXXX directories seem to be ignored in GitHub pages, so use releases/nexus-maven-repository-index.gz here.

Push files

Before generating update-center.json with Nexus Indexer, you need your files put in the server. Push it to GitHub.

  • index.html
  • deployed files(jar, hpi, xml, sha1, md5)
  • releases/nexus-maven-repository-index.gz

Create update-center.json from your maven repository

Run following command:

mvn exec:java -Dexec.args="-id your-update-center \
    -h /dev/null \
    -o update-center.json \
    -repository http://your-web-server/path-to-your-repository/ \
    -remoteIndex nexus-maven-repository-index.gz \
    -repositoryName "your repository name" \
    -directLink \
    -key your-update-center.key \
    -certificate your-update-center.crt \
    -root-certificate your-update-center.crt \
    -pretty
"