Showing posts with label Nexus. Show all posts
Showing posts with label Nexus. Show all posts

Wednesday, April 25, 2012

P2 support for Nexus OSS


 
Working with latest OSGi technology I use Tycho + Maven for my CI builds. This makes it necessary to deal with P2. To speed things up it is a good idea to proxy your P2 repositories. You can easily achieve this by "upgrading" Sonatype Nexus OSS edition to provide P2 capabilities.

Go to the Sonatype RSO repository and download the following bundles:
  • nexus-p2-repository-plugin
  • nexus-p2-bridge-plugin
If necessary also download a recent version of the nexus-capabilities-plugin.
Stop your Nexus instance and copy the downloaded bundles to NEXUS_HOME/nexus/WEB-INF/plugin-repository

Now you are done and can startup Nexus and will have P2 support.
As a first step I highly recommend to mirror/proxy the Eclipse P2 repository:
http://download.eclipse.org/releases/indigo/

Wednesday, December 14, 2011

Make Nexus startup script LSB compliant

I recently ran into the following error with  Nexus and Debian:

warning: script 'nexus' missing LSB tags and overrides insserv... 

which causes a loop within insserv. This is due to a non LSB compliant startup script of Nexus. To make your nexus startup script LSB compliant add the following stuff at the beginning:

#! /bin/sh

### BEGIN INIT INFO
# Provides:          nexus
# Required-Start:    $remote_fs $syslog $network
# Required-Stop:     $remote_fs $syslog $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Nexus Maven Proxy
# Description:       Nexus Maven Proxy
### END INIT INFO
Then run:
# insserv nexus 
and you are done.

Insserv is now aware of preconditions for properly starting and stopping Nexus.