2
votes

I am using grails 2.2.1, in windows.

I want to develop a plugin which depends on spring-security-core plugin, so I add dependency into BuildConfig.groovy of my plugin:

plugins {
    compile ':spring-security-core:1.2.7.3'
}

Then in my grail application project, I specify the dependency in BuildConfig.groovy in:

grails.plugin.location."xxxxx" = "../grails-plugins/xxxx"

After that, when I try to refresh dependency of my grail application project, it always prompt

unable to resolve class org.springframework.security.authentication.UsernamePasswordAuthenticationToken 

this class is a class depends on by spring-security-core plugin and my plugin use this class too.

Is it a grails bug? or I miss something? Please help, thanks in advance!

1

1 Answers

1
votes

I tested here. In Grails 2.2.1 you need to set legacyResolve to true since

Grails 2.2 no longer uses the BuildConfig of the plugin for dependency resolution and only uses data provided by POMs

When you set this and refresh dependencies the install messages of Spring Security Core will appear.