Skip to content

Instantly share code, notes, and snippets.

@j5ik2o
Created June 26, 2011 12:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j5ik2o/1047586 to your computer and use it in GitHub Desktop.
Save j5ik2o/1047586 to your computer and use it in GitHub Desktop.
HomebrewでMaven2とMaven3を共存させるためのFormula(Maven2)
require 'formula'
class Maven2 < Formula
url 'http://www.apache.org/dist/maven/binaries/apache-maven-2.2.1-bin.tar.gz'
homepage 'http://maven.apache.org/'
md5 '3f829ed854cbacdaca8f809e4954c916'
def install
rm_f Dir["bin/*.bat"]
# Fix the permissions on the global settings file.
chmod 0644, Dir["conf/settings.xml"]
# Install jars in libexec to avoid conflicts
prefix.install %w{ NOTICE.txt LICENSE.txt README.txt }
libexec.install Dir['*']
bin.mkpath
ln_s "#{libexec}/bin/mvn", bin+"mvn2"
ln_s "#{libexec}/bin/mvnDebug", bin+"mvnDebug2"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment