Using configurations from inside a plugin using asPath - ant taskdef use case

Theres an ant plugin I would like to use to form a gradle plugin so that I can distribute at my company. It should be simple, and some examples I’ve seen would indicate it is, but I get the following error:

groovy.lang.MissingPropertyException: Could not find property 'antcp' on configuration container.


configurations {
  dependencies {
    antcp 'com.dbdeploy:dbdeploy-ant:3.0M3'


class DBDeployPlugin implements Plugin <Project> {
    void apply(Project project){
          project.ant.taskdef (name: "dbdeploy", classname: "com.dbdeploy.AntTarget", classpathref: project.configurations.antcp.asPath)
          // Create and install custom tasks
        project.task('generateChangeLog') {
            group = 'DBDeploy'
            description = 'Generate an SQL update script'
                // use dbdeploy to generate the change script
                project.ant.dbdeploy(driver: ${driver},
                        url: ${url},
                        userid: ${userid},
                        password: ${password},
                        dir: ${dir})

Projects can be found, here:

Any help would be gratefully received.