Ошибка при загрузке зависимостей в build.gradle в grails 3 - PullRequest
0 голосов
/ 21 июня 2019

Я выполнил все шаги для перехода с Grails 2.x на 3.0.17 и попытался запустить команду «Справка grails», которая сначала собирается перед отображением справки.

Во время этой сборки она загрузила всезависимости, упомянутые в build.gradle.Просто не удается получить все зависимости для «testRuntime» org.seleniumhq.selenium: selenium-htmlunit-driver: 2.44.0 '».Он выводит следующую ошибку и останавливается на этом:

Ошибка Не удалось разрешить все зависимости для конфигурации ': testRuntime'.Для получения дополнительной информации введите «gradle dependencies».

Я пробовал 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
}
...