brewãããã§ããããªããgvmãæµè¡ãªã®ã§ä¹ãæããã§ãã
gvm?
ãthe Groovy enVironment Managerããããã§ããã¨ãããã rvm ã£ã½ããã®ã§ããrvm ããããªã«ç解ãã¦ãªããã§ããã
gvmã®ã¤ã³ã¹ãã¼ã«
æ¸ãã¦ãéãããã¾ãã
$ curl -s get.gvmtool.net | bash
JAVA_HOME è¨å®ãã¦ãªãã£ã¦æããã(´ã»Ïã»ï½)
ã¶ã£ã¡ããæªã ã« Mac ã® JAVA_HOME ã¨ãããããã£ã¦ãªãã§ããå¢ãä½ã£ã¦ JDK8 ã®æ¹ã§çªã£è¾¼ã¿ããã*1ãã©ããããªã®ã§è©°ã¾ã£ã¦ãå°ãã®ã§ããã¼ã«ã¦ãã¨ã¼ã«è¨å®ãã¦ããã£ããã³ãã³ãå®è¡ã
ãªããæ´¾æã ã
brewã®ãå¤ã
ãããªãªã£ã¦ã¾ããç§ã¯ Groovy2.1 ãæ°è»½ã«è§¦ãããã®ã§ãããbrew 㧠update ãã¦ãã¾ã ãªæãã
$ brew info groovy groovy: stable 2.0.5 http://groovy.codehaus.org/ /usr/local/Cellar/groovy/1.8.6 (39 files, 17M) /usr/local/Cellar/groovy/2.0.1 (59 files, 25M) /usr/local/Cellar/groovy/2.0.4 (58 files, 25M) /usr/local/Cellar/groovy/2.0.5 (58 files, 25M) * https://github.com/mxcl/homebrew/commits/master/Library/Formula/groovy.rb ==> Caveats You should set the environment variable GROOVY_HOME to /usr/local/Cellar/groovy/2.0.5/libexec $ groovy -version Groovy Version: 2.0.5 JVM: 1.7.0_11 Vendor: Oracle Corporation OS: Mac OS X
ä½ãèãã unlink ãã¨ãã
$ brew unlink groovy Unlinking /usr/local/Cellar/groovy/2.0.5... 8 links removed $ groovy -version -bash: /usr/local/bin/groovy: No such file or directory
ããã¼ã¯ãããã¼ã
gvmã§ã¤ã³ã¹ãã¼ã«
ã¨ããããã¤ã³ã¹ãã¼ã«â¦â¦ã®åã«ãã¼ã¸ã§ã³æå®åºæ¥ãã£ã½ããã©ãã©ããªã®ããã®ã確èªãã¨ãããã¶ãlistã§åºããã ããï¼èª¬æèªã¾ãªã人
$ gvm list groovy ============================================================ Available Groovy Versions ============================================================ 2.1.0 2.0.6 2.0.5 2.0.4 ï¼ä¸ç¥ï¼ 1.5.3 1.5.2 1.5.1 1.5.0 ============================================================ + - local version * - installed > - currently in use ============================================================
ããããâ¦â¦ã*2
è¦ãã ãè¦ã¦ãçµå±ã¯æå®ããããã ã¼ãã
$ gvm install groovy Downloading: groovy 2.1.0 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 27.0M 100 27.0M 0 0 477k 0 0:00:57 0:00:57 --:--:-- 562k Installing: groovy 2.1.0 Done installing! Do you want groovy 2.1.0 to be set as default? (Y/n): y Setting groovy 2.1.0 as default.
ã§ãããã¨æã£ã¦ãã¼ã¸ã§ã³ç¢ºèªã
$ groovy -version -bash: /usr/local/bin/groovy: No such file or directory
(´ã»Ïã»ï½)ï¼
æ°ããã¿ã¼ããã«ç«ã¡ä¸ããããããã
$ groovy -version Groovy Version: 2.1.0 JVM: 1.7.0_11 Vendor: Oracle Corporation OS: Mac OS X
ãã¶ã gvm ã¤ã³ã¹ãã¼ã«ããæã«åæã« .bashrc ã«è¿½è¨ããã gvm-init.sh ããªãããã¦ããã ãã*3ã
groovyconsoleãç«ã¡ä¸ãã£ãããã¨ããããããã§ããããgradleã¨ãã¯ã¾ã ã ãã©ãå¤ååãã ãããbrewã®ã´ãï¼ãããããªâ¦â¦ã*4
ãã¦ã使ãæ¹ã¯ã¾ãä»åº¦ãã®ãã¡èªããã
brewã®ãçã¥ã
cleanupãããå¤ãã®ã ãæ¶ããã*5
$ brew cleanup groovy Removing: /usr/local/Cellar/groovy/1.8.6... Removing: /usr/local/Cellar/groovy/2.0.1... Removing: /usr/local/Cellar/groovy/2.0.4â¦
ãã㧠info ããã groovy2.0.5ãæ®ã£ã¦ãããã㯠uninstall ã§æ¶ããã
$ brew uninstall groovy Uninstalling /usr/local/Cellar/groovy/2.0.5...
ã ããã¨ãã£ã¦ãããªãåç´ã« uninstall ãå©ãã¦ãææ°ããæ¶ããªããããããã®ã¯ force ã¤ããã°OKã
$ brew uninstall --force groovy
ã¾ã¨ã
ã ãã ãæ¸ãããã©ããããã¨ã¯åç´ã§ãã
- gvm ãã¤ã³ã¹ãã¼ã«ãã
- JAVA_HOMEãè¨å®ããªããæããã
- ã¤ã³ã¹ãã¼ã«å¾ã¯ã¿ã¼ããã«åèµ·åãã
- ï¼ã©ã£ã¡ãgvmãã¡ãã»ã¼ã¸åºãã¦ããããã©ï¼
- brew ã§å
¥ããã®ãæ¶ã
- `brew rm --force groovy` ã¨ãã§ããã
- gvm ã§ã¤ã³ã¹ãã¼ã«ãã
- `gvm install groovy` ï¼ãã¼ã¸ã§ã³æå®ããªãå ´åï¼