Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

GRAILS-9674 - revert Spring 3.2 upgrade while troubleshooting build

problems
  • Loading branch information...
commit 634f35fb66a2c41ac58205452e0994f65347fbad 1 parent 3b648bb
@jeffbrown jeffbrown authored
Showing with 22 additions and 34 deletions.
  1. +1 −1  build.gradle
  2. +2 −1  grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/resolve/GrailsCoreDependencies.java
  3. +4 −1 grails-core/build.gradle
  4. +11 −5 grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/env/GrailsEnvironment.java
  5. +0 −4 grails-core/src/main/groovy/org/codehaus/groovy/grails/support/MockApplicationContext.java
  6. +0 −3  grails-test-suite-base/src/main/groovy/org/codehaus/groovy/grails/commons/test/AbstractGrailsMockTests.java
  7. +0 −2  grails-test-suite-base/src/main/groovy/org/codehaus/groovy/grails/plugins/web/AbstractGrailsPluginTests.groovy
  8. +0 −2  ...-suite-base/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/AbstractGrailsControllerTests.groovy
  9. +0 −2  grails-test-suite-base/src/main/groovy/org/codehaus/groovy/grails/web/taglib/AbstractGrailsTagTests.groovy
  10. +0 −2  ...te-persistence/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/AbstractGrailsHibernateTests.groovy
  11. +0 −2  grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/GormSpec.groovy
  12. +0 −3  ...st-suite-uber/src/test/groovy/org/codehaus/groovy/grails/commons/spring/GrailsRuntimeConfiguratorTests.java
  13. +1 −1  grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/plugins/i18n/I18nGrailsPluginTests.groovy
  14. +3 −3 grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/resolve/IvyDependencyManagerTests.groovy
  15. +0 −2  grails-test-suite-web/src/test/groovy/grails/test/GrailsUrlMappingsTestCaseTests.groovy
View
2  build.gradle
@@ -38,7 +38,7 @@ ext {
spockVersion = '0.7-groovy-2.0'
springLoadedVersion = "1.1.1"
- springVersion = "3.2.0.RELEASE"
+ springVersion = "3.1.2.RELEASE"
springWebflowVersion= "2.0.8.RELEASE"
hibernateVersion = "3.6.10.Final"
ehcacheVersion = "2.4.6"
View
3  ...-bootstrap/src/main/groovy/org/codehaus/groovy/grails/resolve/GrailsCoreDependencies.java
@@ -32,7 +32,7 @@
public final String servletVersion;
public boolean java5compatible;
- private final String springVersion = "3.2.0.RELEASE";
+ private final String springVersion = "3.1.2.RELEASE";
public GrailsCoreDependencies(String grailsVersion) {
this(grailsVersion, "2.5");
@@ -211,6 +211,7 @@ public Object doCall() {
ModuleRevisionId.newInstance("org.springframework", "spring-core", springVersion),
ModuleRevisionId.newInstance("org.springframework", "spring-aop", springVersion),
ModuleRevisionId.newInstance("org.springframework", "spring-aspects", springVersion),
+ ModuleRevisionId.newInstance("org.springframework", "spring-asm", springVersion),
ModuleRevisionId.newInstance("org.springframework", "spring-beans", springVersion),
ModuleRevisionId.newInstance("org.springframework", "spring-context", springVersion),
ModuleRevisionId.newInstance("org.springframework", "spring-context-support", springVersion),
View
5 grails-core/build.gradle
@@ -17,6 +17,9 @@ dependencies {
compile("org.springframework:spring-aspects:${springVersion}") {
exclude group: 'commons-logging', module:'commons-logging'
}
+ compile("org.springframework:spring-asm:${springVersion}") {
+ exclude group: 'commons-logging', module:'commons-logging'
+ }
compile("org.springframework:spring-core:${springVersion}") {
exclude group: 'commons-logging', module:'commons-logging'
}
@@ -69,4 +72,4 @@ compileGroovy.doFirst {
}
}
-jar.appendix = 'core'
+jar.appendix = 'core'
View
16 grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/env/GrailsEnvironment.java
@@ -17,13 +17,13 @@
package org.codehaus.groovy.grails.commons.env;
import grails.util.Environment;
-
-import java.util.Set;
-
import org.codehaus.groovy.grails.commons.GrailsApplication;
+import org.springframework.core.env.MutablePropertySources;
import org.springframework.core.env.PropertySource;
import org.springframework.web.context.support.StandardServletEnvironment;
+import java.util.Set;
+
/**
* Bridges Grails' existing environment API with the new Spring 3.1 environment profiles API.
*
@@ -36,7 +36,13 @@
public GrailsEnvironment(GrailsApplication grailsApplication) {
this.grailsApplication = grailsApplication;
- getPropertySources().addFirst(new GrailsConfigPropertySource());
+
+ }
+
+ @Override
+ protected void customizePropertySources(MutablePropertySources propertySources) {
+ super.customizePropertySources(propertySources);
+ getPropertySources().addFirst(new GrailsConfigPropertySource(grailsApplication));
}
@Override
@@ -49,7 +55,7 @@ public GrailsEnvironment(GrailsApplication grailsApplication) {
private class GrailsConfigPropertySource extends PropertySource<GrailsApplication> {
- public GrailsConfigPropertySource() {
+ public GrailsConfigPropertySource(GrailsApplication grailsApplication) {
super(grailsApplication.getMetadata().getApplicationName(), grailsApplication);
}
View
4 grails-core/src/main/groovy/org/codehaus/groovy/grails/support/MockApplicationContext.java
@@ -364,8 +364,4 @@ public InputStream getInputStream() throws IOException {
return new ByteArrayInputStream(contents.getBytes("UTF-8"));
}
}
-
- public String getApplicationName() {
- return "";
- }
}
View
3  ...base/src/main/groovy/org/codehaus/groovy/grails/commons/test/AbstractGrailsMockTests.java
@@ -15,7 +15,6 @@
*/
package org.codehaus.groovy.grails.commons.test;
-import grails.util.Metadata;
import groovy.lang.ExpandoMetaClass;
import groovy.lang.GroovyClassLoader;
import groovy.util.GroovyTestCase;
@@ -60,8 +59,6 @@ protected final void setUp() throws Exception {
ctx.registerMockBean(GrailsRuntimeConfigurator.CLASS_LOADER_BEAN, gcl);
onSetUp();
ga = new DefaultGrailsApplication(gcl.getLoadedClasses(),gcl);
- ga.getMetadata().put(Metadata.APPLICATION_NAME, getClass().getName());
-
ga.setApplicationContext(ctx);
ga.initialise();
View
2  ...e/src/main/groovy/org/codehaus/groovy/grails/plugins/web/AbstractGrailsPluginTests.groovy
@@ -1,6 +1,5 @@
package org.codehaus.groovy.grails.plugins.web
-import grails.util.Metadata
import grails.util.MockHttpServletResponse
import grails.web.CamelCaseUrlConverter
import grails.web.UrlConverter
@@ -49,7 +48,6 @@ abstract class AbstractGrailsPluginTests extends GroovyTestCase {
ctx = new MockApplicationContext()
onSetUp()
ga = new DefaultGrailsApplication(gcl.getLoadedClasses(),gcl)
- ga.metadata[Metadata.APPLICATION_NAME] = getClass().name
def mainContext = new MockApplicationContext()
mainContext.registerMockBean UrlConverter.BEAN_NAME, new CamelCaseUrlConverter()
ga.mainContext = mainContext
View
2  ...in/groovy/org/codehaus/groovy/grails/web/servlet/mvc/AbstractGrailsControllerTests.groovy
@@ -2,7 +2,6 @@ package org.codehaus.groovy.grails.web.servlet.mvc
import grails.util.GrailsNameUtils
import grails.util.GrailsWebUtil
-import grails.util.Metadata
import grails.web.CamelCaseUrlConverter
import grails.web.UrlConverter
@@ -75,7 +74,6 @@ abstract class AbstractGrailsControllerTests extends GroovyTestCase {
ctx = new MockApplicationContext()
onSetUp()
ga = new DefaultGrailsApplication(gcl.getLoadedClasses(), gcl)
- ga.metadata[Metadata.APPLICATION_NAME] = getClass().name
mockManager = new MockGrailsPluginManager(ga)
ctx.registerMockBean("manager", mockManager)
def dependantPluginClasses = []
View
2  ...-base/src/main/groovy/org/codehaus/groovy/grails/web/taglib/AbstractGrailsTagTests.groovy
@@ -1,7 +1,6 @@
package org.codehaus.groovy.grails.web.taglib
import grails.util.GrailsWebUtil
-import grails.util.Metadata
import grails.web.CamelCaseUrlConverter
import grails.web.UrlConverter
@@ -158,7 +157,6 @@ abstract class AbstractGrailsTagTests extends GroovyTestCase {
GroovySystem.metaClassRegistry.metaClassCreationHandle = new ExpandoMetaClassCreationHandle()
onSetUp()
grailsApplication = new DefaultGrailsApplication(gcl.loadedClasses, gcl)
- grailsApplication.metadata[Metadata.APPLICATION_NAME] = getClass().name
ga = grailsApplication
def mainContext = new MockApplicationContext()
mainContext.registerMockBean UrlConverter.BEAN_NAME, new CamelCaseUrlConverter()
View
2  .../test/groovy/org/codehaus/groovy/grails/orm/hibernate/AbstractGrailsHibernateTests.groovy
@@ -3,7 +3,6 @@ package org.codehaus.groovy.grails.orm.hibernate
import grails.util.GrailsNameUtils
import grails.util.GrailsUtil
import grails.util.GrailsWebUtil
-import grails.util.Metadata
import org.codehaus.groovy.grails.commons.AnnotationDomainClassArtefactHandler
import org.codehaus.groovy.grails.commons.DefaultGrailsApplication
@@ -71,7 +70,6 @@ abstract class AbstractGrailsHibernateTests extends GroovyTestCase {
onSetUp()
ga = new DefaultGrailsApplication(gcl.getLoadedClasses(), gcl)
- ga.metadata[Metadata.APPLICATION_NAME] = getClass().name
grailsApplication = ga
def dependentPlugins = configurePlugins()
View
2  ...uite-persistence/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/GormSpec.groovy
@@ -24,7 +24,6 @@ import org.springframework.orm.hibernate3.SessionFactoryUtils
import org.springframework.core.type.ClassMetadata
import org.hibernate.EntityMode
import org.springframework.orm.hibernate3.SessionHolder
-import grails.util.Metadata
abstract class GormSpec extends Specification {
@@ -54,7 +53,6 @@ abstract class GormSpec extends Specification {
parentCtx = new MockApplicationContext()
grailsApplication = new DefaultGrailsApplication(gcl.getLoadedClasses(), gcl)
- grailsApplication.metadata[Metadata.APPLICATION_NAME] = getClass().name
def dependentPlugins = configurePlugins()
View
3  ...test/groovy/org/codehaus/groovy/grails/commons/spring/GrailsRuntimeConfiguratorTests.java
@@ -1,6 +1,5 @@
package org.codehaus.groovy.grails.commons.spring;
-import grails.util.Metadata;
import groovy.lang.ExpandoMetaClass;
import groovy.lang.GroovyClassLoader;
import groovy.lang.GroovyObject;
@@ -114,7 +113,6 @@ public void testConfigureScaffolding() {
Class<?> c = gcl.parseClass("class TestController { def scaffold = Test }");
GrailsApplication app = new DefaultGrailsApplication(new Class[]{dc,c}, gcl);
- app.getMetadata().put(Metadata.APPLICATION_NAME, getClass().getName());
MockApplicationContext parent = new MockApplicationContext();
parent.registerMockBean(GrailsApplication.APPLICATION_ID, app);
@@ -179,7 +177,6 @@ public void testAliasRegistrationInResources() throws Exception {
"resources.groovy");
GrailsApplication app = new DefaultGrailsApplication(new Class[0], gcl);
- app.getMetadata().put(Metadata.APPLICATION_NAME, getClass().getName());
MockApplicationContext parent = new MockApplicationContext();
parent.registerMockBean(GrailsApplication.APPLICATION_ID, app);
View
2  ...uber/src/test/groovy/org/codehaus/groovy/grails/plugins/i18n/I18nGrailsPluginTests.groovy
@@ -11,7 +11,7 @@ class I18nGrailsPluginTests extends AbstractGrailsMockTests {
void testI18nPlugin() {
- ga.@applicationMeta = ['grails.war.deployed':'true', (Metadata.APPLICATION_NAME): getClass().name ] as Metadata
+ ga.@applicationMeta = ['grails.war.deployed':'true'] as Metadata
ctx.registerMockResource("WEB-INF/grails-app/i18n/messages.properties")
ctx.registerMockResource("WEB-INF/grails-app/i18n/messages-site_en.properties")
ctx.registerMockResource("WEB-INF/grails-app/i18n/foo-site_en.properties")
View
6 ...-uber/src/test/groovy/org/codehaus/groovy/grails/resolve/IvyDependencyManagerTests.groovy
@@ -642,7 +642,7 @@ class IvyDependencyManagerTests extends GroovyTestCase {
}
assertTrue("all default dependencies should be inherited", manager.dependencyDescriptors.every { it.inherited == true })
- assertEquals 53, manager.dependencyDescriptors.findAll { it.scope == 'compile'}.size()
+ assertEquals 54, manager.dependencyDescriptors.findAll { it.scope == 'compile'}.size()
assertEquals 15, manager.dependencyDescriptors.findAll { it.scope == 'runtime'}.size()
assertEquals 4, manager.dependencyDescriptors.findAll { it.scope == 'test'}.size()
assertEquals 19, manager.dependencyDescriptors.findAll { it.scope == 'build'}.size()
@@ -669,7 +669,7 @@ class IvyDependencyManagerTests extends GroovyTestCase {
assertEquals 0, manager.dependencyDescriptors.findAll { it.scope == 'runtime'}.size()
assertEquals 4, manager.dependencyDescriptors.findAll { it.scope == 'test'}.size()
assertEquals 19, manager.dependencyDescriptors.findAll { it.scope == 'build'}.size()
- assertEquals 71, manager.dependencyDescriptors.findAll { it.scope == 'provided'}.size()
+ assertEquals 72, manager.dependencyDescriptors.findAll { it.scope == 'provided'}.size()
assertEquals 4, manager.dependencyDescriptors.findAll { it.scope == 'docs'}.size()
manager = new IvyDependencyManager("project", "0.1",settings)
@@ -680,7 +680,7 @@ class IvyDependencyManagerTests extends GroovyTestCase {
defaultDependencyClosure()
}
- assertEquals 53, manager.dependencyDescriptors.findAll { it.scope == 'compile'}.size()
+ assertEquals 54, manager.dependencyDescriptors.findAll { it.scope == 'compile'}.size()
assertEquals 15, manager.dependencyDescriptors.findAll { it.scope == 'runtime'}.size()
assertEquals 4, manager.dependencyDescriptors.findAll { it.scope == 'test'}.size()
assertEquals 19, manager.dependencyDescriptors.findAll { it.scope == 'build'}.size()
View
2  grails-test-suite-web/src/test/groovy/grails/test/GrailsUrlMappingsTestCaseTests.groovy
@@ -1,7 +1,6 @@
package grails.test
import grails.util.GrailsWebUtil
-import grails.util.Metadata
import grails.web.CamelCaseUrlConverter
import grails.web.UrlConverter
import junit.framework.ComparisonFailure
@@ -38,7 +37,6 @@ class GrailsUrlMappingsTestCaseTests extends GrailsUnitTestCase {
GrailsUrlMappingTestCaseTestsBaseController, GrailsUrlMappingTestCaseTestsSubclassController
] as Class[],
new GroovyClassLoader(getClass().classLoader))
- mockApplication.metadata[Metadata.APPLICATION_NAME] = getClass().name
def mainContext = new MockApplicationContext()
mainContext.registerMockBean UrlConverter.BEAN_NAME, new CamelCaseUrlConverter()
Please sign in to comment.
Something went wrong with that request. Please try again.