homebrew-core/Formula/nexus.rb

36 lines
1 KiB
Ruby
Raw Normal View History

require 'formula'
class Nexus < Formula
homepage 'http://www.sonatype.org/'
url 'http://download.sonatype.com/nexus/oss/nexus-2.3.1-01-bundle.tar.gz'
version '2.3.1-01'
sha1 'f064052500223e7af3e3323b6bc9fb7c047ac0e1'
def install
rm_f Dir['bin/*.bat']
libexec.install Dir["nexus-#{version}/*"]
bin.install_symlink libexec/'bin/nexus'
end
plist_options :manual => "#{HOMEBREW_PREFIX}/opt/nexus/libexec/bin/nexus { console | start | stop | restart | status | dump }"
def plist; <<-EOS.undent
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.sonatype.nexus</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/nexus/bin/nexus</string>
<string>start</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
end
end