0

我的 Grails (2.3.6) 应用程序BuildConfig.groovy

grails {
    project {
        dependency {
            resolution = {
                repositories {
                    inherits true

                    grailsHome()
                    mavenLocal()
                    mavenRepo "http://myartifactory01/myrepo"
                    grailsPlugins()
                    grailsCentral()
                    mavenCentral()
                }
                plugins {
                    compile ":myplugin:0.1"
                }
            }
        }
    }

    server {
        port {
            http = 4384
        }
    }
}

当我运行时,run-app我收到以下错误:

| Error Required Grails build dependencies were not found. This is normally
due to internet connectivity issues (such as a misconfigured proxy) or missing
repositories in grails-app/conf/BuildConfig.groovy. Please verify your
configuration to continue.

我已验证 URL 指向myplugin存储插件的有效(Artifactory)maven 存储库。我的有什么问题BuildConfig吗?它是否缺少任何属性,或者是否有任何配置错误?

4

2 回答 2

1

自从使用 Maven 依赖解析器后,我需要在 grailsPlugins 之前添加我的 mavenRepo:

repositories {
    inherits true // Whether to inherit repository definitions from plugins

    //mavenRepo "http://myrepo:8081/artifactory/plugins-snapshot-local"
    mavenRepo "http://myrepo:8081/artifactory/plugins-release-local"

    grailsPlugins()
    grailsHome()
    mavenLocal()
    grailsCentral()
    mavenCentral()

    // uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
    //mavenRepo "http://repository.codehaus.org"
    //mavenRepo "http://download.java.net/maven/2/"
    //mavenRepo "http://repository.jboss.com/maven2/"
}
于 2014-07-24T21:17:58.533 回答
0

由于某种原因需要添加build ":release:3.0.1"为插件,我不喜欢 Grails。

于 2014-07-24T16:32:43.367 回答