Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Grails Goodness: Using Bintray JCenter as Repository

DZone's Guide to

Grails Goodness: Using Bintray JCenter as Repository

· Performance Zone ·
Free Resource

Sensu is an open source monitoring event pipeline. Try it today.

Bintray JCenter is the next generation (Maven) repository. The repository is already a superset of Maven Central, so it can be used as a drop-in replacement for Maven Central. To use Bintray JCenter we only use jcenter() in our repositories configuration block in BuildConfig.groovy. This is the same as we would use in a Gradle build.

// File: grails-app/conf/BuildConfig.groovy
...
repositories {
    ...
    // Configure Bintray JCenter as repo.
    jcenter()
    ...
}
...

We can also set the update and checksum policies by applying a configuration closure to the jcenter method:

// File: grails-app/conf/BuildConfig.groovy
...
repositories {
    ...
    // Configure Bintray JCenter as repo.
    jcenter {
        // Allowed values: never, always, daily (default), interval:seconds.
        updatePolicy 'always' 
        // Allowed values: fail, warn, ignore
        checksumPolicy 'fail'
    }
    ...
}
...

Code written with Grails 2.4.2.

Sensu: workflow automation for monitoring. Learn more—download the whitepaper.

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}