当使用带有Netbeans的Grails版本2.5.1构建项目时,我当前收到以下错误:
解决获取依赖项的错误:无法从/到mavenCentral(https://repo1.maven.org/maven2/)传输工件org.springframework:spring-orm:jar:4.1.6.RELEASE
我尝试使用不同版本的Grails,并将springframework:spring-aop版本从4.1.6更改为其他版本,但是没有运气。
这是BuildConfig.groovy文件:
grails.servlet.version = "3.0" // Change depending on target container
compliance (2.5 or 3.0)
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.target.level = 1.6
grails.project.source.level = 1.6
//grails.project.war.file = "target/${appName}-${appVersion}-${grails.util.Environment.current.name}.war"
grails.project.war.file = "target/Deployments/${appVersion}/${grails.util.Environment.current.name}/${appName}.war"
grails.project.dependency.resolver = "maven"
grails.project.dependency.resolution = {
inherits("global") { }
log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info',
'debug' or 'verbose'
checksums true // Whether to verify checksums on resolve
repositories {
inherits true // Whether to inherit repository definitions from plugins
grailsHome()
mavenLocal()
mavenCentral()
grailsPlugins()
grailsCentral()
}
dependencies {
compile "org.springframework:spring-aop:4.1.6.RELEASE"
compile 'org.springframework:spring-expression:4.1.6.RELEASE'
}
plugins {
/* App Dependencies */
compile ":jdbc-pool:7.0.37"
build ":tomcat:8.0.22" // or ":tomcat:8.0.22"
// plugins for the compile step
//compile ":scaffolding:2.1.2"
compile ':cache:1.1.8'
// asset-pipeline 2.0+ requires Java 7, use version 1.9.x with Java 6
compile ":asset-pipeline:2.2.3"
// plugins needed at runtime but not for compilation
runtime ":hibernate4:4.3.10" // or ":hibernate:3.6.10.18"
runtime ":database-migration:1.4.0"
runtime ":jquery:1.11.1"
compile ":twitter-bootstrap:3.3.4"
}
}
我对Grails或Netbeans都不是很有经验,所以将不胜感激。