SlideShare a Scribd company logo
1 of 18
Download to read offline
“G”                     Grape              G
“G” IS FOR GRAPE

JGGUG New Year LT Party / Jan 27th, 2010
“The Groovy Adaptable / Advanced Packaging Engine”
Grape?


✤   Maven/Ivy

    ✤         jar

    ✤




    ✤   Groovy 1.6   1.7
> groovy             .groovy




             Groovy 1.6 RC1   grape
           http://d.hatena.ne.jp/masanobuimai/20081224/1230123639
Grape                               Derby
                                                            SqlPortable
 http://d.hatena.ne.jp/kiy0taka/20090308/1236459204
                                                                              kiy0taka


                                        grape
                  groovy                     & grape
                http://genzou-postit.blogspot.com/2009/05/groovy-grape.html




             commons-net     jar
   Groovy   FTP by grape
 http://d.hatena.ne.jp/fumokmm/20090607/1244391071




                Grape              Twitter4j jar
                  Groovy   Twitter                 (@Grab      )
                http://d.hatena.ne.jp/nobusue/20090703/p1
nobusue
Java
                     Groovy




“G”   Gandalf   G?
In Groovy 1.6

✤




    ✤   @Grab(group=’gid’, module=’aid’, version=’ver’)

✤




    ✤   Grape.grab(group:’gid’, module:’aid’, version=’ver’)

✤




    ✤   grape <install|list|resolve>
In Groovy 1.7

✤




    ✤   import package

✤   @Grab

    ✤   @Grab(‘gid:aid:ver’)

✤




    ✤   @GrabResolver(name=’repository’, root=’url’)
✤   Grape

    ‣   http://groovy.codehaus.org/Japanese+Grape

✤   Groovy 1.7

    ‣   http://groovy.codehaus.org/Japanese+Groovy+1.7+release+notes
Groovy   Web
@Grab('org.eclipse.jetty:jetty-server:7.0.1.v20091125')
@Grab('org.eclipse.jetty:jetty-servlet:7.0.1.v20091125')
import org.eclipse.jetty.server.*
import org.eclipse.jetty.server.handler.*
import org.eclipse.jetty.servlet.*
import groovy.servlet.*

server = new Server(8080)
servletHandler = new ServletContextHandler(ServletContextHandler.SESSIONS)
servletHandler.with {
	   resourceBase = '.'
	   contextPath = '/'
	   addServlet(GroovyServlet,   '*.groovy')
	   addServlet(TemplateServlet, '*.gtpl')
}
resourceHandler = new ResourceHandler(
	   resourceBase:".", welcomeFiles:['index.html'], directoriesListed:true)
server.handler = new HandlerList(handlers:[servletHandler, resourceHandler])

server.start()
GitHub
@GrabResolver(name='HiveDB', root='http://www.hivedb.org/maven/')
@Grab('org.hivedb:github-api:1.0')
import org.hivedb.github.*

hub = new GitHub('glaforge', 'gaelyk')
println "Recent commits in ${hub.userName}/${hub.repository}:"
hub.commits.each { c -> println """
${c.authorDate} by ${c.author.name}
${c.message}
${c.url}"""
}
Smack Google Talk
@Grab('jivesoftware:smack:3.0.4')
@Grab('jivesoftware:smackx:3.0.4')
import org.jivesoftware.smack.*

(username, password) = ['            ', '       ']
to = '           @gmail.com'


con = new XMPPConnection(
	 new ConnectionConfiguration('talk.google.com', 5222, 'gmail.com'))
con.connect()
con.login(username, password)
chat = con.chatManager.createChat(to, { chat, msg ->
	 chat.sendMessage(msg.body)
} as MessageListener)
chat.sendMessage("Say something to me. I'll echo it.")

while(true) { sleep 1000 }
@Grab




Grape =
Let’s get Groovy!

More Related Content

Similar to "G"はGrapeのG

GroongaアプリケーションをDockerコンテナ化して配布する
GroongaアプリケーションをDockerコンテナ化して配布するGroongaアプリケーションをDockerコンテナ化して配布する
GroongaアプリケーションをDockerコンテナ化して配布するongaeshi
 
Develop Android/iOS app using golang
Develop Android/iOS app using golangDevelop Android/iOS app using golang
Develop Android/iOS app using golangSeongJae Park
 
Cyber Security Trend AI 6-25-2019
Cyber Security Trend AI 6-25-2019Cyber Security Trend AI 6-25-2019
Cyber Security Trend AI 6-25-2019Gohsuke Takama
 
Feelin' Groovy: A Groovy Developer in the Java World
Feelin' Groovy: A Groovy Developer in the Java WorldFeelin' Groovy: A Groovy Developer in the Java World
Feelin' Groovy: A Groovy Developer in the Java WorldKen Kousen
 
Develop Android app using Golang
Develop Android app using GolangDevelop Android app using Golang
Develop Android app using GolangSeongJae Park
 
Grails @ Java User Group Silicon Valley
Grails @ Java User Group Silicon ValleyGrails @ Java User Group Silicon Valley
Grails @ Java User Group Silicon ValleySven Haiges
 
Open Source Swift: Up and Running
Open Source Swift: Up and RunningOpen Source Swift: Up and Running
Open Source Swift: Up and RunningCarl Brown
 
Git branching model_for_tap_team
Git branching model_for_tap_teamGit branching model_for_tap_team
Git branching model_for_tap_teamGrzegorz Wilczynski
 
Scripting Support in GFv3 Prelude - Full Version
Scripting Support in GFv3 Prelude - Full VersionScripting Support in GFv3 Prelude - Full Version
Scripting Support in GFv3 Prelude - Full VersionEduardo Pelegri-Llopart
 
Go for Mobile Games
Go for Mobile GamesGo for Mobile Games
Go for Mobile GamesTakuya Ueda
 
Introduction to Groovy and what's New in Groovy 1.6 - SpringOne Europe 2009
Introduction to Groovy and what's New in Groovy 1.6 - SpringOne Europe 2009Introduction to Groovy and what's New in Groovy 1.6 - SpringOne Europe 2009
Introduction to Groovy and what's New in Groovy 1.6 - SpringOne Europe 2009Guillaume Laforge
 
Designing Imperfection in Tiqav
Designing Imperfection in TiqavDesigning Imperfection in Tiqav
Designing Imperfection in TiqavShimpei Makimoto
 
Coding with golang
Coding with golangCoding with golang
Coding with golangHannahMoss14
 

Similar to "G"はGrapeのG (16)

GroongaアプリケーションをDockerコンテナ化して配布する
GroongaアプリケーションをDockerコンテナ化して配布するGroongaアプリケーションをDockerコンテナ化して配布する
GroongaアプリケーションをDockerコンテナ化して配布する
 
Develop Android/iOS app using golang
Develop Android/iOS app using golangDevelop Android/iOS app using golang
Develop Android/iOS app using golang
 
Whats New In Groovy 1.6?
Whats New In Groovy 1.6?Whats New In Groovy 1.6?
Whats New In Groovy 1.6?
 
Graalvm with Groovy and Kotlin - Madrid GUG 2019
Graalvm with Groovy and Kotlin - Madrid GUG 2019Graalvm with Groovy and Kotlin - Madrid GUG 2019
Graalvm with Groovy and Kotlin - Madrid GUG 2019
 
Cyber Security Trend AI 6-25-2019
Cyber Security Trend AI 6-25-2019Cyber Security Trend AI 6-25-2019
Cyber Security Trend AI 6-25-2019
 
Feelin' Groovy: A Groovy Developer in the Java World
Feelin' Groovy: A Groovy Developer in the Java WorldFeelin' Groovy: A Groovy Developer in the Java World
Feelin' Groovy: A Groovy Developer in the Java World
 
Develop Android app using Golang
Develop Android app using GolangDevelop Android app using Golang
Develop Android app using Golang
 
Grails @ Java User Group Silicon Valley
Grails @ Java User Group Silicon ValleyGrails @ Java User Group Silicon Valley
Grails @ Java User Group Silicon Valley
 
Open Source Swift: Up and Running
Open Source Swift: Up and RunningOpen Source Swift: Up and Running
Open Source Swift: Up and Running
 
Git branching model_for_tap_team
Git branching model_for_tap_teamGit branching model_for_tap_team
Git branching model_for_tap_team
 
Scripting Support in GFv3 Prelude - Full Version
Scripting Support in GFv3 Prelude - Full VersionScripting Support in GFv3 Prelude - Full Version
Scripting Support in GFv3 Prelude - Full Version
 
Go for Mobile Games
Go for Mobile GamesGo for Mobile Games
Go for Mobile Games
 
Introduction to Groovy and what's New in Groovy 1.6 - SpringOne Europe 2009
Introduction to Groovy and what's New in Groovy 1.6 - SpringOne Europe 2009Introduction to Groovy and what's New in Groovy 1.6 - SpringOne Europe 2009
Introduction to Groovy and what's New in Groovy 1.6 - SpringOne Europe 2009
 
Graalvm with Groovy and Kotlin - Greach 2019
Graalvm with Groovy and Kotlin - Greach 2019Graalvm with Groovy and Kotlin - Greach 2019
Graalvm with Groovy and Kotlin - Greach 2019
 
Designing Imperfection in Tiqav
Designing Imperfection in TiqavDesigning Imperfection in Tiqav
Designing Imperfection in Tiqav
 
Coding with golang
Coding with golangCoding with golang
Coding with golang
 

More from Kazuchika Sekiya

10分でわかるOpenAPI V3
10分でわかるOpenAPI V310分でわかるOpenAPI V3
10分でわかるOpenAPI V3Kazuchika Sekiya
 
Apigee x Drupal: APIエコノミーを支える開発者ポータル
Apigee x Drupal: APIエコノミーを支える開発者ポータルApigee x Drupal: APIエコノミーを支える開発者ポータル
Apigee x Drupal: APIエコノミーを支える開発者ポータルKazuchika Sekiya
 
Routeサービスを使ったCloud FoundryアプリのAPI管理
Routeサービスを使ったCloud FoundryアプリのAPI管理Routeサービスを使ったCloud FoundryアプリのAPI管理
Routeサービスを使ったCloud FoundryアプリのAPI管理Kazuchika Sekiya
 
Apigee+OASでらくらくAPI開発(予定)
Apigee+OASでらくらくAPI開発(予定)Apigee+OASでらくらくAPI開発(予定)
Apigee+OASでらくらくAPI開発(予定)Kazuchika Sekiya
 
OpenAPI Specification概要
OpenAPI Specification概要OpenAPI Specification概要
OpenAPI Specification概要Kazuchika Sekiya
 
G* Workshop in Fukuoka - Introduction
G* Workshop in Fukuoka - IntroductionG* Workshop in Fukuoka - Introduction
G* Workshop in Fukuoka - IntroductionKazuchika Sekiya
 
[English version] JavaFX and Web Integration
[English version] JavaFX and Web Integration[English version] JavaFX and Web Integration
[English version] JavaFX and Web IntegrationKazuchika Sekiya
 
[JavaOne Tokyo 2012] JavaFX and Web Integration
[JavaOne Tokyo 2012] JavaFX and Web Integration[JavaOne Tokyo 2012] JavaFX and Web Integration
[JavaOne Tokyo 2012] JavaFX and Web IntegrationKazuchika Sekiya
 
「プログラミングGroovy」発売予告
「プログラミングGroovy」発売予告「プログラミングGroovy」発売予告
「プログラミングGroovy」発売予告Kazuchika Sekiya
 
「プログラミングGroovy」Groovyってなんだろ?編
「プログラミングGroovy」Groovyってなんだろ?編「プログラミングGroovy」Groovyってなんだろ?編
「プログラミングGroovy」Groovyってなんだろ?編Kazuchika Sekiya
 
GroovyなGAE/J Gaelykでかんたんbot工作
GroovyなGAE/J Gaelykでかんたんbot工作GroovyなGAE/J Gaelykでかんたんbot工作
GroovyなGAE/J Gaelykでかんたんbot工作Kazuchika Sekiya
 
お題でGroovyプログラミング: Part A
お題でGroovyプログラミング: Part Aお題でGroovyプログラミング: Part A
お題でGroovyプログラミング: Part AKazuchika Sekiya
 
Groovy/Grails on Google App Engine <シンプル導入編>
Groovy/Grails on Google App Engine <シンプル導入編>Groovy/Grails on Google App Engine <シンプル導入編>
Groovy/Grails on Google App Engine <シンプル導入編>Kazuchika Sekiya
 

More from Kazuchika Sekiya (17)

10分でわかるOpenAPI V3
10分でわかるOpenAPI V310分でわかるOpenAPI V3
10分でわかるOpenAPI V3
 
Apigee x Drupal: APIエコノミーを支える開発者ポータル
Apigee x Drupal: APIエコノミーを支える開発者ポータルApigee x Drupal: APIエコノミーを支える開発者ポータル
Apigee x Drupal: APIエコノミーを支える開発者ポータル
 
Routeサービスを使ったCloud FoundryアプリのAPI管理
Routeサービスを使ったCloud FoundryアプリのAPI管理Routeサービスを使ったCloud FoundryアプリのAPI管理
Routeサービスを使ったCloud FoundryアプリのAPI管理
 
Apigee+OASでらくらくAPI開発(予定)
Apigee+OASでらくらくAPI開発(予定)Apigee+OASでらくらくAPI開発(予定)
Apigee+OASでらくらくAPI開発(予定)
 
OpenAPI Specification概要
OpenAPI Specification概要OpenAPI Specification概要
OpenAPI Specification概要
 
G* Workshop in Fukuoka - Introduction
G* Workshop in Fukuoka - IntroductionG* Workshop in Fukuoka - Introduction
G* Workshop in Fukuoka - Introduction
 
[English version] JavaFX and Web Integration
[English version] JavaFX and Web Integration[English version] JavaFX and Web Integration
[English version] JavaFX and Web Integration
 
[JavaOne Tokyo 2012] JavaFX and Web Integration
[JavaOne Tokyo 2012] JavaFX and Web Integration[JavaOne Tokyo 2012] JavaFX and Web Integration
[JavaOne Tokyo 2012] JavaFX and Web Integration
 
JGGUG合宿2011報告
JGGUG合宿2011報告JGGUG合宿2011報告
JGGUG合宿2011報告
 
GroovyFX
GroovyFXGroovyFX
GroovyFX
 
GDK48
GDK48GDK48
GDK48
 
「プログラミングGroovy」発売予告
「プログラミングGroovy」発売予告「プログラミングGroovy」発売予告
「プログラミングGroovy」発売予告
 
「プログラミングGroovy」Groovyってなんだろ?編
「プログラミングGroovy」Groovyってなんだろ?編「プログラミングGroovy」Groovyってなんだろ?編
「プログラミングGroovy」Groovyってなんだろ?編
 
Gaelyk
GaelykGaelyk
Gaelyk
 
GroovyなGAE/J Gaelykでかんたんbot工作
GroovyなGAE/J Gaelykでかんたんbot工作GroovyなGAE/J Gaelykでかんたんbot工作
GroovyなGAE/J Gaelykでかんたんbot工作
 
お題でGroovyプログラミング: Part A
お題でGroovyプログラミング: Part Aお題でGroovyプログラミング: Part A
お題でGroovyプログラミング: Part A
 
Groovy/Grails on Google App Engine <シンプル導入編>
Groovy/Grails on Google App Engine <シンプル導入編>Groovy/Grails on Google App Engine <シンプル導入編>
Groovy/Grails on Google App Engine <シンプル導入編>
 

"G"はGrapeのG