0

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?

IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756
  • 1
    There is a great post on configuring grails with maven and artifactory here http://wordpress.transentia.com.au/wordpress/2014/04/09/artifactory-and-grails/ . With artifactory you can just use mavenRepo for artifactory with other repos defined in artifactory – practical programmer Jul 25 '14 at 06:08

2 Answers2

1

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/"
}
Joe
  • 1,219
  • 8
  • 13
0

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

IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756