maven - Grails 2.3.6缺少 repo 问题

标签 maven grails artifactory buildconfiguration

我的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插件的有效(人工)Maven存储库。我的BuildConfig有问题吗?它缺少任何属性,还是配置错误?

最佳答案

我需要在grails插件之前添加我的mavenRepo,因为使用了Mavendependency.resolver:

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

关于maven - Grails 2.3.6缺少 repo 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24938184/

相关文章:

maven - Maven/Gradle方法来计算包括所有传递依赖项的依赖项总大小

maven-3 - 无法从神器中找到神器

maven - 知道为什么 maven-deploy-plugin 不提供登录/密码命令行选项吗? (还是我瞎了?)

java - Maven:如何设置 Maven 以分别运行单元测试和集成测试

maven - 在 Maven 中本地引用依赖 jar

java - Maven 无法转换为 javax.servlet.Filter

mongodb - 在 cloundfoundry 隧道 Mongo 数据库中抛出 502 Bad Gateway 错误

grails - 如何在Grails的编辑 View 中显示多选列表框中的所有选定选项?

grails - 实现独立 Grails 批处理的正确方法?

artifactory - 无法在 Jfrog Artifactory 中使用虚拟 helm 存储库安装远程图表