我们使用groovy/grails几个月,发现它非常好的语言和框架,至少对于原型设计.
唯一让我们疯狂的是项目建设时间.编译由几个小域类组成的小应用程序花费了很多时间,好像我们正在编译好东西,更严重的事情)))所以,问题是 - 是否有任何技术和方法可用于减少grails项目构建时间?
UPD: 这个问题涵盖了一个方面,它们使得grail部署缓慢 - 依赖性解决.简而言之,摆脱快照依赖.子问题是如何快速检测到这种依赖?
对于快速计算的快速计算机和网络,我的"解决依赖关系"大约需要30秒.
我看过这个问题Grails:部署时间非常慢."解决依赖关系..."需要10秒以上,而且我似乎没有任何"快照"依赖关系.我已经清理了我的常春藤缓存并强制重新下载所有内容,没有任何帮助.启用日志记录后,这几行就是违规者.没有任何内容正在下载,但考虑到我的网络流量,似乎每次都尝试远程查找内容.请注意,这些是仅在它们之前具有[某个数字]版本的条目,然后是不同的版本 - 这不是巧合 - 这是什么意思?如何阻止Grails试图找到这些略有不同的版本?
.... these lines take 20+seconds, everything else is in the milliseconds ...
found commons-logging#commons-logging;1.1.1 in grailsPlugins
[1.1.1] commons-logging#commons-logging;[1.1, 2.0)
found org.apache.httpcomponents#httpclient;4.1.2 in default
[4.1.2] org.apache.httpcomponents#httpclient;[4.1, 5.0)
found org.apache.httpcomponents#httpcore;4.1.2 in default
found org.codehaus.jackson#jackson-core-asl;1.9.1 in default
[1.9.1] org.codehaus.jackson#jackson-core-asl;[1.4,)
found javax.mail#mail;1.4.4 in default
[1.4.4] javax.mail#mail;[1.4,)
Run Code Online (Sandbox Code Playgroud)
我正在使用两个必须是违法者的插件,并在下面列出了他们的dependencies.groovy.我已经尝试评论任何明确的远程URL.
SimpleDB的:
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.dependency.resolution = {
inherits "global"
log "warn"
String datastoreVersion = "1.0.0.M9"
repositories {
grailsPlugins()
grailsHome()
grailsCentral()
mavenRepo "http://repo.grails.org/grails/core" //tried …Run Code Online (Sandbox Code Playgroud)