3

Upgrading a Grails 2.2.4 project to 2.4.4 I ran into GRAILS-11813. The fix offered by Graeme Rocher is to add to conf/BuildConfig.groovy:

management {
        dependency 'org.springframework:spring-beans:4.0.7.RELEASE'
}

With this fix everything (clean, test-app, run-app, war) works from the Grails command line. Great.

Problem: Maven stumbles on the fix. Just about any Maven command (for instance, mvn clean) terminates with:

There was an error loading the BuildConfig: No signature of method: groovy.util.ConfigSlurper$_parse_closure5.dependency() is applicable for argument types: (java.lang.String) values: [org.springframework:spring-beans:4.0.7.RELEASE] (Use --stacktrace to see the full trace)

Is there a way out? I don't have a lot of insight here, so I'm ready to be educated.

sodastream
  • 129
  • 10
  • This config would not be needed if working on a mavenized app. Instead you can use [Dependency Management](http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Management) in pom or parent pom. – dmahapatro Jan 30 '15 at 17:34

1 Answers1

0

An answer to my own question. The original problem GRAILS-11813 is now in state Fixed and will be resolved in the upcoming Grails 2.4.5.

So I'll circumvent the problem and just await the next Grails release.

sodastream
  • 129
  • 10