IAmYourFaja
IAmYourFaja

Reputation: 56912

Grails 2.3.6 Missing Repo Issue

My Grails (2.3.6) app's 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
        }
    }
}

When I run run-app I get the following error:

| 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.

I have verified that the URL points to a valid (Artifactory) maven repo where the myplugin plugin is stored. Is there something wrong with my BuildConfig? Is it missing any properties, or is anything misconfigured?

Upvotes: 0

Views: 280

Answers (2)

Joe
Joe

Reputation: 1219

I needed to add my mavenRepo before the grailsPlugins since using the Maven dependcy.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/"
}

Upvotes: 1

IAmYourFaja
IAmYourFaja

Reputation: 56912

Needed to add build ":release:3.0.1" as a plugin for some reason, me no likes Grails.

Upvotes: 0

Related Questions