1

I am using Grails 2.1.1 for developing some of the applications.

This is an older version. Recently I have changed my machine and after setting up everything, while compiling the grails project, it gives the following error:

$ grails clean

| Configuring classpath

:: problems summary ::

:::: WARNINGS
    ::::::::::::::::::::::::::::::::::::::::::::::
    ::          UNRESOLVED DEPENDENCIES         ::
    ::::::::::::::::::::::::::::::::::::::::::::::
    :: org.springframework#spring-test;3.1.2.RELEASE: configuration not found in org.springframework#spring-test;3.1.2.RELEASE: 'master'. It was required from org.grails.internal#xxProject;0.1 test
    ::::::::::::::::::::::::::::::::::::::::::::::

| Error Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):

I have tried several ways described over the internet as refresh-dependencies or Setting Groovy 1,8 on my class path.

Also I have tried to fix the issue by manually adding the .jar of the Spring-test.3.1.2 on the class path but it does not work and keep asking for Spring-test.3.1.2.zip missing rather than Spring-test.3.1.2.jar.

I have checked the Grails docs and they told there that new versions of Grails uses .jar of plugins rather than .zip files.

Please any one if you can help me. It has already wasted almost 3 weeks of mine. I can not switch to new versions as it is a complex project with several dependencies that does not work on higher version of Grails or Groovy.

Thanks

Rupendra
  • 608
  • 2
  • 11
  • 42
  • your repos are correct? http://stackoverflow.com/a/28716326/3181392 – cfrick Jul 08 '15 at 07:38
  • had the same issue with 2.1.1 and had to delete the cache in ./grails/2.1.1/projects to get it to work. (yea commented on the anniversary! :)) – aldrin Jul 08 '16 at 06:16

1 Answers1

0

One potential issue is a version conflict due to a plugin or JAR dependency pulling in an older version of spring-test. Try running

grails dependency-report

to see whether any other versions of spring-test are being brought in. If they are, you should add an exclusion to the dependency that's pulling the other version in. For example:

compile (':mail:1.2') {
    excludes 'spring-test'
}

If this isn't the issue, I'll post an additional answer.

Peter Ledbrook
  • 4,302
  • 1
  • 21
  • 18