I want to be able to run Sonatype Nexus as a service on the Mac. It comes with the Java Service Wrapper start scripts for the mac so I basically have a shell script that can start the server.
I believe I have to add some sort of setup to /etc/launchd.conf and maybe use launchctl. All documentation I found points to plist files though but I don't have such a file for Nexus.
The preferred way to start services on OS X is with launchd. Basically, you create a .plist file that describes what needs to be run, and when, and put the file in /Library/LaunchDaemons. The tricky thing is that launchd expects to be able to monitor the daemon, so it doesn't like things that drop into the background; if I understand nexus right, that means running it in console mode rather than "start"ing it as you would on most systems. I think this is about what you'll need to have in the file (you may need to adjust the path to the executable):
Save that as /Library/LaunchDaemons/com.sonatype.nexus.plist, set the ownership to root:wheel and permissions to 644. To activate it, either reboot or run the command
sudo launchctl load /Library/LaunchDaemons/com.sonatype.nexus.plist
.