定制maven repo grails 3

时间:2015-10-19 15:13:00

标签: grails-plugin grails-3.0

是否有人在Grails 3应用程序中安装Cloudinary插件并成功。

插件说明在这里,我已经做了我认为适用于Grails 3的修改:https://bitbucket.org/sbuettner/grails-cloudinary

以下是build.grade文件

但是,grails命令行util报告:

|错误无法解析配置':testRuntime'的所有依赖项。输入'gradle dependencies'以获取更多信息

有人能看出我做错了吗?

buildscript {
    ext {
        grailsVersion = project.grailsVersion
    }
    repositories {
        mavenLocal()
        maven { url "https://repo.grails.org/grails/core" }

        // Custom maven repo for the cloudinary plugin
        maven { url "http://dl.bintray.com/infinit/infinit-opensource"     }
    }
    dependencies {
        classpath "org.grails:grails-gradle-plugin:$grailsVersion"
        classpath 'com.bertramlabs.plugins:asset-pipeline-gradle:2.5.0'
    }
}

plugins {
    id "io.spring.dependency-management" version "0.5.2.RELEASE"
}

version "0.1"
group "mchq.admin"

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"

ext {
    grailsVersion = project.grailsVersion
    gradleWrapperVersion = project.gradleWrapperVersion
}

assets {
    minifyJs = true
    minifyCss = true
}

repositories {
    mavenLocal()
    maven { url "https://repo.grails.org/grails/core" }

    // Custom maven repo for the cloudinary plugin
    maven { url "http://dl.bintray.com/infinit/infinit-opensource" }
}

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"

    compile "org.grails.plugins:hibernate"
    compile "org.grails.plugins:cache"
    compile "org.hibernate:hibernate-ehcache"
    compile "org.grails.plugins:scaffolding"

    // https://grails-plugins.github.io/grails-spring-security-core/guide/single.html#tutorials
    // "Install" the plugin by adding it to build.gradle
    compile 'org.grails.plugins:spring-security-core:3.0.0.M1'

    // https://grails.org/plugin/mail
    // http://stackoverflow.com/questions/32602032/grails-3-mail-plugin-not-working
    compile "org.grails.plugins:mail:2.0.0.RC2"

    // https://bitbucket.org/sbuettner/grails-cloudinary
    compile "grails-cloudinary:0.3"

    runtime 'mysql:mysql-connector-java:5.1.36'

    runtime "org.grails.plugins:asset-pipeline"

    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"
}

task wrapper(type: Wrapper) {
    gradleVersion = gradleWrapperVersion
}

3 个答案:

答案 0 :(得分:3)

有同样的问题。通过添加我的回购来修复它:

repositories {
   mavenLocal()
   maven { url "https://repo.grails.org/grails/core" } //default
   maven { url "http://myCompanyDev1/nexus/content/groups/public/" } // my companies repo / nexus
}

包括它:

dependencies { 
    compile 'de.myCompany.projects.intern:ld-grails-modules:0.1.1-SNAPSHOT@zip'
}

注意" @ zip"到底。默认似乎是" jar"但我们的关系中没有jar,只有zip文件。

答案 1 :(得分:1)

感谢您的帮助,但需要解决以下问题:

compile "org.grails.plugins:grails-cloudinary:0.3"

答案 2 :(得分:0)

尝试将maven { url "http://mvnrepository.com/artifact" }添加到repositories列表。