aprok
aprok

Reputation: 1157

I can't install spring-security-core plugin in Grails

I have windows 7 and Grails-2.0.4. Trying to install plugin spring-security-core. I've tried from everywhere: cmd, Idea, SPS. Nothing works. Everywhere the same error:

!Error resolving  plugin [name: spring-security-core, group: org.grails.plugins, version: latest.integration(1.2.7.3 in SPS)]. Plugin not found.
!Error Plugin not found  for name [spring-security-core] and version[not specified(1.2.7.3 in SPS)]

I tried to put the zip-file of this plugin in different directories. Doesn't work. With connection everything is OK. Help me please.

Upvotes: 2

Views: 3424

Answers (2)

Ian Roberts
Ian Roberts

Reputation: 122364

Check the repositories section of your BuildConfig dependencies, and add the following if it is not already there:

grailsRepo "http://grails.org/plugins" 

The grails plugin repository moved earlier this year and the old repository does not contain any plugin versions released since April 2012. I don't remember exactly which versions of Grails will use the new repository by default, the change happened somewhere around 2.0.3/4.

Upvotes: 1

Burt Beckwith
Burt Beckwith

Reputation: 75671

The preferred way to install it is to add a dependency in BuildConfig.groovy. The syntax for this is listed for each plugin, in this case from http://grails.org/plugin/spring-security-core: compile":spring-security-core:1.2.7.3"(look for the 'Dependency' section at the top). So theplugins` section of your BuildConfig.groovy should look like this:

plugins {
   runtime ":hibernate:$grailsVersion"
   build ":tomcat:$grailsVersion"
   ...
   compile ":spring-security-core:1.2.7.3"
}

Alternatively you can install it with the install-plugin script:

$ grails install-plugin spring-security-core

but the dependency approach is the better way.

Upvotes: 1

Related Questions