1. JGGUG
japan grails/groovy user group
def speaker = new Cast(name:”T.Yamamoto”,version:”G*-2010-03-30”)
2.
3.
4.
5.
6.
7.
8. class A {
static class B {}
}
new A.B()
boolean called = false
Timer timer = new Timer()
timer.schedule(new TimerTask() {
void run() {
called = true
}
}, 0)
sleep 100
assert called
22. groupId group
String group = 'jp.xmldo.grails'
"org.grails.plugins"
def version = '0.1'
23. % grails maven-deploy --repository=myRepo
grails.project.dependency.distribution = {
remoteRepository(id:"myRepo",
u r l : " f i l e : / / 1 2 7 . 0 . 0 . 1 / U s e r s / t y a m a / m y r e p o s / m a v e n 2 / ")
}
grails.project.dependency.distribution = {
remoteRepository(id:"myRepoScp",
u r l : " s c p : / / 1 0 . 2 1 1 . 5 5 . 6 / v a r / w w w / h t m l / m y r e p o ") {
authentication username:"tyama",
privateKey:"${userHome}/.ssh/id_dsa"
}
}
25. weceem
def dependsOn = [
searchable:'0.5.4 > *',
quartz:'0.4.1 > *',
]
excludes
plugins {
! ru n t i m e ( ' : w e c e e m : 0 . 8 ' ) {
! ! ex c l u d e s " s e a r c h a b l e "
! }
! ru n t i m e ' : s e a r c h a b l e : 0 . 5 . 4 '
}
32. Grails-1.2 :
static namedQueries = {
shippedInThree {
def now = new Date()
lt 'shipped', now + 3
}
}
def list = Item.shippedInThree.list(max: 10, offset: 5)
def list = Item.shippedInThree.count()
d e f l i s t = I t e m . s h i p p e d I n T h r e e . f i n d A l l B y N a m e L i k e (’ % ‘)
33. def list = Item.shippedInThree {
and {
lt 'price',20000F
}
}
36. |-- application.properties
|-- grails-app
|-- plugins
| |-- exampleHongo ←
| | |--plugin.xml ← 1.2.x
| |-- exampleShibuya ←
% grails run-app
Welcome to Grails 1.2.1 - http://grails.org/
.. ..
The inplace plugin at [/works/experiment/20100330/tokyo/plugins/exampleHongo]
does not have a plugin.xml. Please run the package-plugin command inside the
plugin directory.