My 'resolving dependencies' is up around 30 seconds for a lightening fast computer and network.
I've looked at this question Grails: Very slow deploy time. 'Resolving Dependencies...' takes 10+ seconds, and I don't appear to have any 'snapshot' dependencies. I've cleared out my ivy cache and forced a redownload of everything, no help. Enabling logging, these few lines are the offenders. Nothing is being downloaded, but it appears that attempts are made to look for something remotely every time, given my network traffic. Note these are the ONLY entries that have the [some number] version before them, and then a different one after - that can't be coincidence - what does it mean? How can I stop grails from trying to find these slightly different versions?
.... 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,)
I am using two plugins that must be the offenders, and have listed their dependencies.groovy below. I've tried commenting out any explicit remote URLs.?
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 commenting this out, no help
mavenLocal()
mavenCentral()
mavenRepo 'http://repository.codehaus.org' //tried commenting this out, no help
}
dependencies {
def excludes = {
transitive = false
}
compile("org.grails:grails-datastore-gorm-simpledb:$datastoreVersion",
"org.grails:grails-datastore-gorm-plugin-support:$datastoreVersion",
"org.grails:grails-datastore-gorm:$datastoreVersion",
"org.grails:grails-datastore-core:$datastoreVersion",
"org.grails:grails-datastore-simpledb:$datastoreVersion",
"org.grails:grails-datastore-web:$datastoreVersion") {
transitive = false
}
runtime("stax:stax:1.2.0", excludes)
runtime('com.amazonaws:aws-java-sdk:1.2.0')
test("org.grails:grails-datastore-gorm-test:$datastoreVersion",
"org.grails:grails-datastore-simple:$datastoreVersion") {
transitive = false
}
}
plugins {
build ":release:1.0.0.RC3", {
exported = false
}
}
}
Ajax uploader:
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.release.scm.enabled=false
grails.project.dependency.resolution = {
// inherit Grails' default dependencies
inherits("global") {
// uncomment to disable ehcache
// excludes 'ehcache'
}
log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
repositories {
grailsPlugins()
grailsHome()
grailsCentral()
// uncomment the below to enable remote dependency resolution
// from public Maven repositories
mavenLocal()
mavenCentral()
//mavenRepo "http://snapshots.repository.codehaus.org"
//mavenRepo "http://repository.codehaus.org"
//mavenRepo "http://download.java.net/maven/2/"
//mavenRepo "http://repository.jboss.com/maven2/"
}
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
test 'org.gmock:gmock:0.8.1'
}
plugins {
//build ':release:1.0.0.RC3'
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…