## 3.7 Dependency Resolution

In order to control how JAR dependencies are resolved Grails features (since version 1.2) a dependency resolution DSL that allows you to control how dependencies for applications and plugins are resolved.

Inside the `grails-app/conf/BuildConfig.groovy` file you can specify a `grails.project.dependency.resolution` property that configures how dependencies are resolved:

    grails.project.dependency.resolution = {
       // config here
    }

The default configuration looks like the following:

    grails.project.dependency.resolution = {
        // inherit Grails' default dependencies
        inherits("global") {
            // uncomment to disable ehcache
            // excludes 'ehcache'
        }
        log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
        repositories {
            grailsPlugins()
            grailsHome()
            grailsCentral()        // uncomment the below to enable remote dependency resolution
            // from public Maven repositories
            //mavenLocal()
            //mavenCentral()
            //mavenRepo "http://snapshots.repository.codehaus.org"
            //mavenRepo "http://repository.codehaus.org"
            //mavenRepo "http://download.java.net/maven/2/"
            //mavenRepo "http://repository.jboss.com/maven2/"
        }
        dependencies {
            // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.        // runtime 'mysql:mysql-connector-java:5.1.5'
        }
    }

The details of the above will be explained in the next few sections.