我执行了从grails 2.x迁移到3.0.17的所有步骤,并尝试运行“ grails help”命令,该命令在显示帮助之前先构建。
在此构建期间,它下载了build.gradle中提到的所有依赖项。它只是无法获取“ testRuntime'org.seleniumhq.selenium:selenium-htmlunit-driver:2.44.0'”的所有依赖项。它会打印出以下错误并在那里停止:
错误无法解析配置':testRuntime'的所有依赖关系。键入“渐变依赖项”以获取更多信息。
我尝试了gradlew依赖项,该依赖项可以打印出依赖项树,但无济于事。
是否有一种方法可以全部清洁并重新开始?另外,有人知道如何处理未解决的依赖项错误吗?
这是我的build.gradle:
buildscript {
ext {
grailsVersion = project.grailsVersion
}
repositories {
maven { url "https://repo.grails.org/grails/core" }
maven { url "https://plugins.gradle.org/m2/" }
mavenLocal()
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath 'com.bertramlabs.plugins:asset-pipeline-gradle:2.5.0'
//classpath "org.grails.plugins:hibernate:4.3.10.5"
classpath "org.grails.plugins:hibernate5:${gormVersion-".RELEASE"}"
classpath "gradle.plugin.agorapulse.plugins:asset-pipeline-cdn:0.1.2"
}
}
plugins {
id "io.spring.dependency-management" version "0.5.4.RELEASE"
id "com.bertramlabs.plugins.asset-pipeline" version "2.4.2"
id "agorapulse.plugins.asset-pipeline-cdn" version "0.1.3"
}
version "0.1"
group "ite.baseline"
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "spring-boot"
apply plugin: "war"
apply plugin: "asset-pipeline"
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: "org.grails.grails-web"
apply plugin: "org.grails.grails-gsp"
apply plugin: "agorapulse.plugins.asset-pipeline-cdn"
ext {
grailsVersion = project.grailsVersion
gradleWrapperVersion = project.gradleWrapperVersion
}
assets {
minifyJs = true
minifyCss = true
}
assetsCdn {
provider = 's3' // Karman provider
accessKey = 'AKIAI32F6EOPEVYQNAMQ'
secretKey = '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'
directory = 'itexchangeweb-static-assets-new'
storagePath = "assets/itexchangeweb-0.1/"
expires = 3650 // Expires in 10 years (value in days)
gzip = true
//region = 'us-east-1'
}
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencyManagement {
imports {
mavenBom "org.grails:grails-bom:$grailsVersion"
}
applyMavenExclusions false
}
dependencies {
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-dependencies"
compile "org.grails:grails-web-boot"
testCompile "org.grails:grails-datastore-test-support"
// originally 4.0.6.RELEASE
runtime "org.springframework:spring-test:4.2.1.RELEASE"
compile "org.apache.httpcomponents:httpcore:4.3.2"
compile "org.apache.httpcomponents:httpclient:4.3.2"
compile "org.grails.plugins:scaffolding:2.1.2"
compile "org.grails.plugins:cache:1.1.7"
runtime('org.grails.plugins:rendering:1.0.0', {
//exclude group: '', module: ''
//excludes 'itext','itext-rtf'
})
compile "org.grails.plugins:joda-time:1.5"
compile "org.grails.plugins:quartz-monitor:1.3"
compile "org.grails.plugins:audit-logging:1.0.1"
compile "org.grails.plugins:remote-pagination:0.4.8"
compile "org.grails.plugins:ckeditor:4.4.1.0"
//compile "org.grails.plugins:pretty-time:2.1.3.Final-1.0.1" -- Replacement below
compile "org.grails.plugins:grails-pretty-time:4.0.0"
compile "org.grails.plugins:spring-security-core:3.1.2"
compile "org.grails.plugins:spring-security-ui:3.0.2"
compile 'com.bertramlabs.plugins:karman-grails:1.2.1'
compile "org.grails.plugins:asynchronous-mail:2.0.2-3.2.x"
compile "org.grails.plugins:asset-pipeline:2.1.5"
//compile "org.grails.plugins:mysql-connectorj:5.1.22.1" -- Replacement below
runtime "mysql:mysql-connector-java:5.1.24"
//compile "org.grails.plugins:hibernate4:4.3.5.5"
compile "org.grails.plugins:hibernate5:6.1.12"
compile "org.hibernate:hibernate-core:5.1.5.Final"
compile "org.hibernate:hibernate-ehcache"
// plugins needed at runtime
runtime "org.grails.plugins:database-migration:1.4.0"
runtime 'org.grails.plugins:aws-sdk:1.9.40'
// plugin needed to use TLD files for JSP taglibs
runtime "org.grails:grails-web-jsp:3.3.2"
testCompile "org.grails:grails-plugin-testing"
testCompile "org.grails.plugins:geb"
// Note: It is recommended to update to a more robust driver (Chrome, Firefox etc.)
testRuntime 'org.seleniumhq.selenium:selenium-htmlunit-driver:2.44.0'
console "org.grails:grails-console"
}
bootRun {
jvmArgs('-Dspring.output.ansi.enabled=always')
addResources = true
}
task wrapper(type: Wrapper) {
gradleVersion = gradleWrapperVersion
}