shinynewbike
shinynewbike

Reputation: 2352

Package org.springframework.aop.framework does not exist

I have installed grails and am trying to compile with the default version of cache:1.1.6 and I'm getting these errors within the plugin code.

Can any one help me with which dependency is broken in the repository - I havent even used the cache yet - just defined it in BuildConfig.groovy

I understand "By default, Grails will not only get the JARs and plugins that you declare, but it will also get their transitive dependencies" so why would I have to declare the dependencies?

Compilation error: startup failed:
Compile error during compilation with javac.
D:\Users\ve\.grails\2.4.0\projects\demo\plugins\cache-1.1.6\src\java\grails\plugin\cache\CustomCacheKeyGenerator.java:18: error: package org.springframework.aop.framework does not exist
import org.springframework.aop.framework.AopProxyUtils;
                                        ^
D:\Users\ve\.grails\2.4.0\projects\demo\plugins\cache-1.1.6\src\java\grails\plugin\cache\web\PageInfo.java:43: error: package org.springframework.aop does not exist
import org.springframework.aop.PointcutAdvisor;
                              ^
D:\Users\ve\.grails\2.4.0\projects\demo\plugins\cache-1.1.6\src\java\grails\plugin\cache\web\PageInfo.java:44: error: package org.springframework.aop does not exist
import org.springframework.aop.TargetSource;

Upvotes: 2

Views: 2839

Answers (1)

Graeme Rocher
Graeme Rocher

Reputation: 7985

Odd this is with a new Grails application? It sounds like it could be a corrupt Maven cache issue. Try doing:

 $ rm -rf ~/.m2/repository

Otherwise, to declare the dependency explicitly edit BuildConfig and add:

 compile 'org.springframework:spring-aop:4.0.5.RELEASE'

To your dependencies block.

Upvotes: 1

Related Questions