2013-02-06 00:01:16 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Nexus < Formula
|
|
|
|
homepage 'http://www.sonatype.org/'
|
2013-04-17 22:52:41 +00:00
|
|
|
url 'http://download.sonatype.com/nexus/oss/nexus-2.3.1-01-bundle.tar.gz'
|
|
|
|
version '2.3.1-01'
|
|
|
|
sha1 'f064052500223e7af3e3323b6bc9fb7c047ac0e1'
|
2013-02-06 00:01:16 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
rm_f Dir['bin/*.bat']
|
2013-04-17 22:52:41 +00:00
|
|
|
libexec.install Dir["nexus-#{version}/*"]
|
2013-02-06 00:01:16 +00:00
|
|
|
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
|