grails: Unknown tag (oauth:connect)

2019-09-10 02:13发布

问题:

my gsp page:

<!DOCTYPE html>
<html>
    <head>
    <meta name="layout" content="main"/>
</head>
<body>
    <oauth:connect provider="twitter">Connect to Twitter</oauth:connect>
</body>
</html>

when I run application
I jut get plain text : Connect to Twitter
Don't get any button or link and sts says:

Unknown tag (oauth:connect).

I have added following things in BuildConfig.groovy

  plugins {
    compile ':oauth:2.1.0'
    runtime ':oauth:2.1.0'
  }
  repositories {
    mavenRepo "http://repo.desirableobjects.co.uk/"
  }

And added following lines in Config.groovy

import org.scribe.builder.api.TwitterApi
oauth {
providers {
    twitter {
        api = TwitterApi
        key = 'my key is here'
        secret = 'my secret key is here'
        successUri = '/success.gsp'
        failureUri = '/fail.gsp'
    }
}
debug = true
}

My import is showing error though.
Am I missing anything?