Permalink
Browse files

whitespace, STS warnings, cleanup

  • Loading branch information...
1 parent d6edd7c commit f46eddbf29ebfb4bdf4bcaa5b904bc8e214d12b8 @burtbeckwith burtbeckwith committed Feb 23, 2011
Showing with 4,412 additions and 4,560 deletions.
  1. +6 −6 grails-bootstrap/build.gradle
  2. +6 −6 grails-bootstrap/src/main/groovy/grails/util/AbstractBuildSettings.java
  3. +158 −165 grails-bootstrap/src/main/groovy/grails/util/BuildSettings.groovy
  4. +12 −14 grails-bootstrap/src/main/groovy/grails/util/Environment.java
  5. +3 −5 grails-bootstrap/src/main/groovy/grails/util/Metadata.java
  6. +18 −19 grails-bootstrap/src/main/groovy/grails/util/PluginBuildSettings.groovy
  7. +2 −2 grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/cli/CommandLineHelper.java
  8. +12 −5 grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/cli/GrailsScriptRunner.java
  9. +5 −5 grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/cli/ScriptNameResolver.groovy
  10. +2 −2 grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/cli/api/BaseSettingsApi.java
  11. +7 −3 ...ls-bootstrap/src/main/groovy/org/codehaus/groovy/grails/cli/support/GrailsBuildEventListener.java
  12. +11 −11 grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/plugins/GrailsPluginUtils.groovy
  13. +41 −42 ...ls-bootstrap/src/main/groovy/org/codehaus/groovy/grails/resolve/AbstractIvyDependencyManager.java
  14. +1 −0 grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/resolve/DependencyDefinitionParser.java
  15. +1 −1 ...rap/src/main/groovy/org/codehaus/groovy/grails/resolve/EnhancedDefaultDependencyDescriptor.groovy
  16. +268 −278 grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/resolve/IvyDependencyManager.groovy
  17. +38 −37 grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/resolve/PluginInstallEngine.groovy
  18. +4 −4 grails-core/build.gradle
  19. +1 −2 grails-core/src/main/groovy/grails/spring/WebBeanBuilder.java
  20. +2 −1 grails-core/src/main/groovy/grails/ui/Console.java
  21. +1 −1 grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/ClassPropertyFetcher.java
  22. +8 −7 grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsBootstrapClass.java
  23. +6 −6 grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsCodecClass.java
  24. +17 −8 grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsDomainClass.java
  25. +2 −2 grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsUrlMappingsClass.java
  26. +2 −2 grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/DomainClassArtefactHandler.java
  27. +2 −0 grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsBootstrapClass.java
  28. +2 −0 grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsCodecClass.java
  29. +2 −0 grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsControllerClass.java
  30. +13 −16 grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsDomainConfigurationUtil.java
  31. +1 −1 grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsResourceLoaderFactoryBean.java
  32. +1 −0 grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsUrlMappingsClass.java
  33. +0 −1 grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/TagLibArtefactHandler.java
  34. +6 −6 grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/cfg/ConfigurationHelper.groovy
  35. +2 −2 ...main/groovy/org/codehaus/groovy/grails/commons/cfg/MapBasedSmartPropertyOverrideConfigurer.groovy
  36. +5 −5 ...re/src/main/groovy/org/codehaus/groovy/grails/commons/metaclass/ClosureInvokingDynamicMethod.java
  37. +5 −5 .../src/main/groovy/org/codehaus/groovy/grails/commons/metaclass/DynamicMethodsExpandoMetaClass.java
  38. +25 −28 grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/metaclass/MetaClassEnhancer.groovy
  39. +3 −3 grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/metaclass/ProxyMetaClass.java
  40. +2 −12 ...s-core/src/main/groovy/org/codehaus/groovy/grails/commons/spring/GrailsWebApplicationContext.java
  41. +17 −18 grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/Grailsc.java
  42. +3 −9 ...roovy/org/codehaus/groovy/grails/compiler/injection/GlobalPluginAwareEntityASTTransformation.java
  43. +1 −1 .../src/main/groovy/org/codehaus/groovy/grails/documentation/MetadataGeneratingExpandoMetaClass.java
  44. +1 −3 grails-core/src/main/groovy/org/codehaus/groovy/grails/exceptions/SourceCodeAware.java
  45. +2 −2 ...ain/groovy/org/codehaus/groovy/grails/orm/support/GroovyAwareNamedTransactionAttributeSource.java
  46. +4 −4 ...-core/src/main/groovy/org/codehaus/groovy/grails/orm/support/TransactionManagerPostProcessor.java
  47. +61 −63 grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/DefaultGrailsPlugin.java
  48. +21 −22 grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/DefaultGrailsPluginManager.java
  49. +13 −13 grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/DomainClassGrailsPlugin.groovy
  50. +8 −8 grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/GrailsPluginManager.java
  51. +6 −6 grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/MockGrailsPluginManager.java
  52. +12 −14 ...-core/src/main/groovy/org/codehaus/groovy/grails/plugins/publishing/DefaultPluginPublisher.groovy
  53. +32 −34 grails-core/src/main/groovy/org/codehaus/groovy/grails/support/DevelopmentResourceLoader.java
  54. +2 −4 grails-core/src/main/groovy/org/codehaus/groovy/grails/support/NullPersistentContextInterceptor.java
  55. +16 −16 grails-core/src/main/groovy/org/codehaus/groovy/grails/support/proxy/EntityProxyHandler.java
  56. +3 −3 grails-core/src/main/groovy/org/codehaus/groovy/grails/validation/ConstrainedPropertyBuilder.java
  57. +24 −26 grails-core/src/main/groovy/org/codehaus/groovy/grails/validation/ConstraintsEvaluator.java
  58. +45 −47 grails-core/src/main/groovy/org/codehaus/groovy/grails/validation/DefaultConstraintEvaluator.java
  59. +4 −4 grails-core/src/main/groovy/org/codehaus/groovy/grails/validation/SizeConstraint.java
  60. +2 −2 grails-core/src/main/groovy/org/codehaus/groovy/grails/validation/ValidatorConstraint.java
  61. +3 −3 grails-crud/build.gradle
  62. +3 −4 ...crud/src/main/groovy/org/codehaus/groovy/grails/scaffolding/DefaultGrailsTemplateGenerator.groovy
  63. +2 −2 grails-docs/build.gradle
  64. +30 −30 grails-hibernate/build.gradle
  65. +4 −4 grails-hibernate/src/main/groovy/grails/orm/HibernateCriteriaBuilder.java
  66. +61 −61 ...src/main/groovy/org/codehaus/groovy/grails/orm/hibernate/ConfigurableLocalSessionFactoryBean.java
  67. +1 −3 .../src/main/groovy/org/codehaus/groovy/grails/orm/hibernate/GrailsHibernateDomainClassProperty.java
  68. +1 −1 ...rc/main/groovy/org/codehaus/groovy/grails/orm/hibernate/cfg/DefaultGrailsDomainConfiguration.java
  69. +1 −3 ...-hibernate/src/main/groovy/org/codehaus/groovy/grails/orm/hibernate/cfg/GORMNamespaceHandler.java
  70. +5 −5 .../main/groovy/org/codehaus/groovy/grails/orm/hibernate/cfg/GORMSessionFactoryDefinitionParser.java
  71. +20 −20 ...ls-hibernate/src/main/groovy/org/codehaus/groovy/grails/orm/hibernate/cfg/GrailsDomainBinder.java
  72. +10 −10 ...rnate/src/main/groovy/org/codehaus/groovy/grails/orm/hibernate/cfg/HibernateMappingBuilder.groovy
  73. +44 −44 .../src/main/groovy/org/codehaus/groovy/grails/orm/hibernate/cfg/HibernateNamedQueriesBuilder.groovy
  74. +0 −2 grails-hibernate/src/main/groovy/org/codehaus/groovy/grails/orm/hibernate/cfg/JoinTable.groovy
  75. +5 −5 grails-hibernate/src/main/groovy/org/codehaus/groovy/grails/orm/hibernate/cfg/Mapping.groovy
  76. +2 −5 grails-hibernate/src/main/groovy/org/codehaus/groovy/grails/orm/hibernate/cfg/PropertyConfig.groovy
  77. +10 −10 ...bernate/src/main/groovy/org/codehaus/groovy/grails/orm/hibernate/proxy/HibernateProxyHandler.java
  78. +5 −5 ...in/groovy/org/codehaus/groovy/grails/orm/hibernate/support/ClosureEventTriggeringInterceptor.java
  79. +4 −4 ...oovy/org/codehaus/groovy/grails/orm/hibernate/support/HibernatePersistenceContextInterceptor.java
  80. +38 −38 grails-hibernate/src/main/groovy/org/codehaus/groovy/grails/orm/hibernate/support/SoftKey.java
  81. +30 −33 ...nate/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/AbstractGrailsHibernateTests.groovy
  82. +3 −10 ...est/groovy/org/codehaus/groovy/grails/orm/hibernate/BidirectionalOneToManyAndOneToOneTests.groovy
  83. +97 −99 ...nate/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/DomainEventsWithMethodsTests.groovy
  84. +1 −5 ...nate/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/ExtendAbstractJavaClassTests.groovy
  85. +13 −15 grails-hibernate/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/FindAllMethodTests.groovy
  86. +0 −2 grails-hibernate/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/FindByInListTests.groovy
  87. +11 −11 grails-hibernate/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/FindMethodTests.groovy
  88. +13 −13 ...ate/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/HibernateCriteriaBuilderTests.groovy
  89. +1 −5 ...-hibernate/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/ManyToOneWithUUIDTests.groovy
  90. +17 −17 grails-hibernate/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/MappingDslTests.groovy
  91. +82 −82 grails-hibernate/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/NamedCriteriaTests.groovy
  92. +1 −1 ...bernate/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/SavePersistentMethodTests.groovy
  93. +8 −8 ...ate/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/SortWithNestedPropertiesTests.groovy
  94. +75 −75 ...bernate/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/cfg/GrailsDomainBinderTests.java
  95. +62 −63 ...c/test/groovy/org/codehaus/groovy/grails/orm/hibernate/metaclass/BeforeValidateHelperTests.groovy
  96. +7 −7 ...g/codehaus/groovy/grails/orm/hibernate/support/HibernatePersistenceContextInterceptorTests.groovy
  97. +1 −1 ...src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/validation/ValidateTransientTests.groovy
  98. +4 −6 ...rc/test/groovy/org/codehaus/groovy/grails/orm/support/TransactionManagerPostProcessorTests.groovy
  99. +7 −7 ...nate/src/test/groovy/org/codehaus/groovy/grails/plugins/RelationshipManagementMethodsTests.groovy
  100. +50 −50 ...ate/src/test/groovy/org/codehaus/groovy/grails/web/binding/DataBindingWithAssociationTests.groovy
  101. +38 −42 ...roovy/org/codehaus/groovy/grails/web/binding/DataBindingWithUnidirectionalAssociationTests.groovy
  102. +12 −12 grails-plugin-codecs/build.gradle
  103. +57 −58 grails-plugin-codecs/src/main/groovy/org/codehaus/groovy/grails/plugins/CodecsGrailsPlugin.groovy
  104. +1 −1 grails-plugin-controllers/build.gradle
  105. +6 −8 ...controllers/src/main/groovy/org/codehaus/groovy/grails/plugins/web/ControllersGrailsPlugin.groovy
  106. +5 −8 ...ontrollers/src/main/groovy/org/codehaus/groovy/grails/web/metaclass/ControllerDynamicMethods.java
  107. +4 −5 ...ntrollers/src/main/groovy/org/codehaus/groovy/grails/web/metaclass/GetSessionDynamicProperty.java
  108. +0 −10 ...gin-controllers/src/main/groovy/org/codehaus/groovy/grails/web/metaclass/RenderDynamicMethod.java
  109. +2 −3 ...in-controllers/src/main/groovy/org/codehaus/groovy/grails/web/plugins/support/WebMetaUtils.groovy
  110. +2 −2 ...rc/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/CommandObjectEnablingPostProcessor.java
  111. +12 −12 grails-plugin-converters/build.gradle
  112. +7 −7 grails-plugin-converters/src/main/groovy/grails/converters/JSON.java
  113. +12 −14 grails-plugin-converters/src/main/groovy/grails/converters/XML.java
  114. +1 −1 grails-plugin-converters/src/main/groovy/org/codehaus/groovy/grails/web/converters/Converter.java
  115. +2 −2 ...ls-plugin-converters/src/main/groovy/org/codehaus/groovy/grails/web/converters/ConverterUtil.java
  116. +13 −14 .../main/groovy/org/codehaus/groovy/grails/web/converters/marshaller/json/DomainClassMarshaller.java
  117. +11 −11 ...c/main/groovy/org/codehaus/groovy/grails/web/converters/marshaller/xml/DomainClassMarshaller.java
  118. +26 −28 ...gin-converters/src/test/groovy/org/codehaus/groovy/grails/web/converters/XMLConverterTests.groovy
  119. +1 −1 grails-plugin-datasource/build.gradle
  120. +11 −11 grails-plugin-filters/build.gradle
  121. +2 −2 ...s/src/main/groovy/org/codehaus/groovy/grails/plugins/web/filters/DefaultGrailsFiltersClass.groovy
  122. +6 −6 ...ters/src/main/groovy/org/codehaus/groovy/grails/plugins/web/filters/FilterToHandlerAdapter.groovy
  123. +3 −3 ...filters/src/main/groovy/org/codehaus/groovy/grails/plugins/web/filters/FiltersGrailsPlugin.groovy
  124. +2 −2 ...n-filters/src/test/groovy/org/codehaus/groovy/grails/plugins/web/filters/FilterConfigTests.groovy
  125. +15 −15 grails-plugin-gsp/build.gradle
  126. +18 −19 ...-plugin-gsp/src/main/groovy/org/codehaus/groovy/grails/plugins/web/GroovyPagesGrailsPlugin.groovy
  127. +1 −1 grails-plugin-gsp/src/main/groovy/org/codehaus/groovy/grails/plugins/web/taglib/CountryTagLib.groovy
  128. +8 −8 grails-plugin-gsp/src/main/groovy/org/codehaus/groovy/grails/plugins/web/taglib/FormTagLib.groovy
  129. +16 −16 ...-plugin-gsp/src/main/groovy/org/codehaus/groovy/grails/plugins/web/taglib/ValidationTagLib.groovy
  130. +17 −17 ...in-gsp/src/test/groovy/org/codehaus/groovy/grails/web/pages/GroovyPagesTemplateEngineTests.groovy
  131. +0 −4 ...-plugin-gsp/src/test/groovy/org/codehaus/groovy/grails/web/pages/ReservedWordOverrideTests.groovy
  132. +1 −4 .../test/groovy/org/codehaus/groovy/grails/web/pages/ext/jsp/MockRootLoaderTagLibraryResolver.groovy
  133. +1 −1 ...-plugin-gsp/src/test/groovy/org/codehaus/groovy/grails/web/pages/ext/jsp/SimpleJspTagTests.groovy
  134. +32 −32 ...ls-plugin-gsp/src/test/groovy/org/codehaus/groovy/grails/web/taglib/ApplicationTagLibTests.groovy
  135. +44 −44 grails-plugin-gsp/src/test/groovy/org/codehaus/groovy/grails/web/taglib/FormTagLib3Tests.groovy
  136. +6 −7 ...plugin-gsp/src/test/groovy/org/codehaus/groovy/grails/web/taglib/GroovyPageAttributesTests.groovy
  137. +1 −2 ...plugin-gsp/src/test/groovy/org/codehaus/groovy/grails/web/taglib/InvokeTagLibAsMethodTests.groovy
  138. +36 −36 ...-plugin-gsp/src/test/groovy/org/codehaus/groovy/grails/web/taglib/LinkRenderingTagLibTests.groovy
  139. +1 −1 ...n-gsp/src/test/groovy/org/codehaus/groovy/grails/web/taglib/NamespacedNamedUrlMappingTests.groovy
  140. +1 −1 grails-plugin-gsp/src/test/groovy/org/codehaus/groovy/grails/web/taglib/RenderTagLibTests.groovy
  141. +21 −21 grails-plugin-gsp/src/test/groovy/org/codehaus/groovy/grails/web/taglib/ValidationTagLibTests.groovy
  142. +1 −1 grails-plugin-i18n/build.gradle
  143. +12 −12 grails-plugin-i18n/src/main/groovy/org/codehaus/groovy/grails/plugins/i18n/I18nGrailsPlugin.groovy
  144. +2 −2 grails-plugin-logging/build.gradle
  145. +12 −13 grails-plugin-mimetypes/build.gradle
  146. +18 −19 grails-plugin-scaffolding/build.gradle
  147. +6 −6 ...ing/src/main/groovy/org/codehaus/groovy/grails/plugins/scaffolding/ScaffoldingGrailsPlugin.groovy
  148. +11 −12 ...rc/test/groovy/org/codehaus/groovy/grails/plugins/scaffolding/ScaffoldingGrailsPluginTests.groovy
  149. +1 −1 ...src/test/groovy/org/codehaus/groovy/grails/scaffolding/DefaultGrailsTemplateGeneratorTests.groovy
  150. +6 −6 ...folding/src/test/groovy/org/codehaus/groovy/grails/scaffolding/GrailsTemplateGeneratorsTests.java
  151. +1 −1 grails-plugin-services/build.gradle
  152. +1 −1 grails-plugin-servlets/build.gradle
  153. +55 −55 ...lugin-servlets/src/main/groovy/org/codehaus/groovy/grails/plugins/web/ServletsGrailsPlugin.groovy
  154. +113 −116 ...ugin-servlets/src/main/groovy/org/codehaus/groovy/grails/plugins/web/api/ServletRequestApi.groovy
  155. +7 −7 grails-plugin-testing/build.gradle
  156. +3 −3 grails-plugin-testing/src/main/groovy/grails/test/AbstractCliTestCase.groovy
  157. +2 −2 grails-plugin-testing/src/main/groovy/grails/test/ControllerUnitTestCase.groovy
  158. +5 −5 grails-plugin-testing/src/main/groovy/grails/test/GrailsUnitTestCase.groovy
  159. +22 −22 grails-plugin-testing/src/main/groovy/grails/test/MockUtils.groovy
  160. +1 −1 grails-plugin-testing/src/main/groovy/grails/test/TagLibUnitTestCase.groovy
  161. +12 −12 grails-plugin-url-mappings/build.gradle
  162. +5 −4 ...l-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/DefaultUrlMappingEvaluator.java
  163. +8 −8 ...url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/DefaultUrlMappingsHolder.java
  164. +1 −1 ...s-plugin-url-mappings/src/main/groovy/org/codehaus/groovy/grails/web/mapping/RegexUrlMapping.java
  165. +1 −5 ...ppings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/AdditionalParamsMappingTests.groovy
  166. +2 −4 ...url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/DefaultUrlCreatorTests.groovy
  167. +18 −18 ...pings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/DefaultUrlMappingEvaluatorTests.java
  168. +14 −14 ...n-url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/RegexUrlMappingTests.groovy
  169. +3 −3 ...appings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/ResponseCodeUrlMappingTests.groovy
  170. +3 −3 ...l-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingEvaluatorTests.groovy
  171. +5 −5 ...l-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingParameterTests.groovy
  172. +10 −10 ...url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingsHolderTests.groovy
  173. +1 −1 grails-plugin-validation/build.gradle
  174. +7 −7 grails-resources/build.gradle
  175. +3 −4 grails-resources/src/grails/templates/artifacts/Filters.groovy
  176. +1 −1 grails-resources/src/grails/templates/scaffolding/renderEditor.template
  177. +1 −1 grails-spring/build.gradle
  178. +491 −463 grails-spring/src/main/groovy/grails/spring/BeanBuilder.java
  179. +2 −2 grails-spring/src/main/groovy/grails/spring/DynamicElementReader.groovy
  180. +5 −5 .../src/main/groovy/org/codehaus/groovy/grails/commons/spring/DefaultRuntimeSpringConfiguration.java
  181. +6 −8 grails-test-suite-base/build.gradle
  182. +7 −7 ...st-suite-base/src/main/groovy/org/codehaus/groovy/grails/web/taglib/AbstractGrailsTagTests.groovy
  183. +1 −1 grails-test/build.gradle
  184. +7 −7 grails-test/src/main/groovy/grails/test/AbstractClosureProxy.java
  185. +2 −2 grails-test/src/main/groovy/grails/test/MockClosureProxy.java
  186. +14 −14 grails-test/src/main/groovy/org/codehaus/groovy/grails/test/GrailsTestTargetPattern.groovy
  187. +15 −15 grails-test/src/main/groovy/org/codehaus/groovy/grails/test/GrailsTestType.groovy
  188. +6 −7 grails-test/src/main/groovy/org/codehaus/groovy/grails/test/GrailsTestTypeResult.groovy
  189. +4 −4 ...-test/src/main/groovy/org/codehaus/groovy/grails/test/event/GrailsTestEventConsoleReporter.groovy
  190. +20 −21 grails-test/src/main/groovy/org/codehaus/groovy/grails/test/event/GrailsTestEventPublisher.groovy
  191. +2 −2 grails-test/src/main/groovy/org/codehaus/groovy/grails/test/io/MultiplexingOutputStream.groovy
  192. +14 −14 grails-test/src/main/groovy/org/codehaus/groovy/grails/test/io/SystemOutAndErrSwapper.groovy
  193. +1 −2 grails-test/src/main/groovy/org/codehaus/groovy/grails/test/junit4/listener/SuiteRunListener.groovy
  194. +5 −5 ...ls-test/src/main/groovy/org/codehaus/groovy/grails/test/junit4/runner/GrailsTestCaseRunner.groovy
  195. +5 −5 grails-test/src/main/groovy/org/codehaus/groovy/grails/test/support/GrailsTestAutowirer.groovy
  196. +9 −10 ...ain/groovy/org/codehaus/groovy/grails/test/support/GrailsTestRequestEnvironmentInterceptor.groovy
  197. +38 −39 grails-test/src/main/groovy/org/codehaus/groovy/grails/test/support/GrailsTestTypeSupport.groovy
  198. +4 −5 grails-uber-test-suite/build.gradle
  199. +37 −37 grails-uber-test-suite/src/test/groovy/grails/spring/BeanBuilderTests.groovy
  200. +4 −4 grails-uber-test-suite/src/test/groovy/grails/test/GrailsUnitTestCaseTests.groovy
  201. +2 −3 grails-uber-test-suite/src/test/groovy/grails/test/MetaTestHelper.groovy
  202. +1 −1 grails-uber-test-suite/src/test/groovy/grails/test/MockUtilsAndHasManyTests.groovy
  203. +1 −2 grails-uber-test-suite/src/test/groovy/grails/test/MockUtilsDeleteDomainTests.groovy
  204. +2 −2 grails-uber-test-suite/src/test/groovy/grails/test/MockUtilsSaveDomainTests.groovy
  205. +1 −1 grails-uber-test-suite/src/test/groovy/grails/test/MockUtilsTests.groovy
  206. +8 −8 grails-uber-test-suite/src/test/groovy/grails/test/TagLibUnitTestCaseTests.groovy
  207. +36 −36 grails-uber-test-suite/src/test/groovy/grails/util/BuildSettingsTests.groovy
  208. +3 −3 grails-uber-test-suite/src/test/groovy/grails/util/GrailsNameUtilsTests.java
  209. +1 −1 grails-uber-test-suite/src/test/groovy/grails/util/JSonBuilderTests.java
  210. +34 −35 grails-uber-test-suite/src/test/groovy/grails/util/PluginBuildSettingsTests.groovy
  211. +55 −59 ...test-suite/src/test/groovy/org/codehaus/groovy/grails/commons/cfg/ConfigurationHelperTests.groovy
  212. +1 −2 grails-uber-test-suite/src/test/groovy/org/codehaus/groovy/grails/commons/classes.groovy
  213. +30 −32 ...-suite/src/test/groovy/org/codehaus/groovy/grails/commons/metaclass/MetaClassEnhancerTests.groovy
  214. +5 −5 ...ite/src/test/groovy/org/codehaus/groovy/grails/commons/spring/GrailsRuntimeConfiguratorTests.java
  215. +2 −2 ...st-suite/src/test/groovy/org/codehaus/groovy/grails/compiler/injection/GrailsASTUtilsTests.groovy
  216. +2 −2 ...s-uber-test-suite/src/test/groovy/org/codehaus/groovy/grails/plugins/CoreGrailsPluginTests.groovy
  217. +7 −7 grails-uber-test-suite/src/test/groovy/org/codehaus/groovy/grails/plugins/PluginTests.java
  218. +1 −1 .../src/test/groovy/org/codehaus/groovy/grails/plugins/datasource/DataSourceGrailsPluginTests.groovy
  219. +5 −5 ...est-suite/src/test/groovy/org/codehaus/groovy/grails/plugins/web/ServletsGrailsPluginTests.groovy
  220. +43 −45 ...er-test-suite/src/test/groovy/org/codehaus/groovy/grails/resolve/IvyDependencyManagerTests.groovy
  221. +1 −5 ...st-suite/src/test/groovy/org/codehaus/groovy/grails/test/support/MockHibernatePluginHelper.groovy
  222. +7 −7 ...ber-test-suite/src/test/groovy/org/codehaus/groovy/grails/validation/AbstractConstraintTests.java
  223. +4 −4 ...est/groovy/org/codehaus/groovy/grails/validation/ConstrainedPropertyBuiderForCommandsTests.groovy
  224. +1 −1 ...r-test-suite/src/test/groovy/org/codehaus/groovy/grails/validation/ConstraintsBuilderTests.groovy
  225. +1 −1 ...ite/src/test/groovy/org/codehaus/groovy/grails/validation/ConstraintsEvaluatingPropertyTests.java
  226. +12 −12 ...uite/src/test/groovy/org/codehaus/groovy/grails/validation/GrailsDomainClassValidatorTests.groovy
  227. +1 −1 ...-uber-test-suite/src/test/groovy/org/codehaus/groovy/grails/validation/InListConstraintTests.java
  228. +1 −2 ...uber-test-suite/src/test/groovy/org/codehaus/groovy/grails/validation/MatchesConstraintTests.java
  229. +1 −1 grails-uber-test-suite/src/test/groovy/org/codehaus/groovy/grails/validation/MaxConstraintTests.java
  230. +1 −1 grails-uber-test-suite/src/test/groovy/org/codehaus/groovy/grails/validation/TestConstraints.groovy
  231. +1 −1 ...est-suite/src/test/groovy/org/codehaus/groovy/grails/web/servlet/FlashScopeWithErrorsTests.groovy
  232. +3 −6 ...st-suite/src/test/groovy/org/codehaus/groovy/grails/web/servlet/GrailsDispatcherServletTests.java
  233. +14 −14 ...s-uber-test-suite/src/test/groovy/org/codehaus/groovy/grails/web/servlet/RenderMethodTests.groovy
  234. +4 −4 ...t-suite/src/test/groovy/org/codehaus/groovy/grails/web/servlet/mvc/GrailsParameterMapTests.groovy
  235. +12 −12 grails-uber-test-suite/src/test/groovy/org/codehaus/groovy/grails/web/servlet/mvc/controller4.groovy
  236. +200 −201 grails-uber-test-suite/src/test/groovy/org/codehaus/groovy/grails/web/util/CodecPrintWriterTest.java
  237. +3 −4 ...-test-suite/src/test/groovy/org/codehaus/groovy/grails/web/util/CodecWithClosureProperties.groovy
  238. +2 −3 ...ls-uber-test-suite/src/test/groovy/org/codehaus/groovy/grails/web/util/StreamCharBufferTests.java
  239. +6 −6 ...uber-test-suite/src/test/groovy/org/codehaus/groovy/grails/web/util/TypeConvertingMapTests.groovy
  240. +1 −1 grails-web/build.gradle
  241. +19 −18 ...c/jsp21/groovy/org/codehaus/groovy/grails/web/pages/ext/jsp/GroovyPagesJspApplicationContext.java
  242. +5 −8 ...-web/src/jsp21/groovy/org/codehaus/groovy/grails/web/pages/ext/jsp/GroovyPagesJspFactory21.groovy
  243. +7 −11 ...web/src/jsp21/groovy/org/codehaus/groovy/grails/web/pages/ext/jsp/GroovyPagesPageContext21.groovy
  244. +3 −3 grails-web/src/main/groovy/org/codehaus/groovy/grails/support/ResourceAwareTemplateEngine.java
  245. +3 −4 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/context/GrailsConfigUtils.java
  246. +2 −2 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/context/GrailsContextLoader.java
  247. +4 −2 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/errors/GrailsExceptionResolver.java
  248. +1 −3 ...web/src/main/groovy/org/codehaus/groovy/grails/web/i18n/ParamsAwareLocaleChangeInterceptor.groovy
  249. +249 −249 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/mapping/UrlCreatorCache.java
  250. +13 −19 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/mapping/UrlMappingData.java
  251. +2 −4 ...n/groovy/org/codehaus/groovy/grails/web/multipart/ContentLengthAwareCommonsMultipartResolver.java
  252. +2 −2 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/pages/GSPWriter.java
  253. +17 −15 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/pages/GroovyPage.java
  254. +21 −25 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/pages/GroovyPageParser.java
  255. +29 −29 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/pages/GroovyPageWritable.java
  256. +13 −14 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/pages/GroovyPagesTemplateEngine.java
  257. +0 −2 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/pages/ext/jsp/GroovyPagesJspFactory.groovy
  258. +7 −7 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/servlet/GrailsDispatcherServlet.java
  259. +2 −2 ...-web/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/AbstractTokenResponseHandler.java
  260. +2 −1 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/GrailsControllerHelper.java
  261. +4 −4 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/GrailsParameterMap.groovy
  262. +22 −22 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/GrailsWebRequestFilter.java
  263. +5 −5 ...-web/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/SimpleGrailsControllerHelper.java
  264. +1 −1 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/servlet/mvc/TokenResponseHandler.java
  265. +12 −13 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/servlet/view/GrailsViewResolver.java
  266. +3 −3 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/servlet/view/GroovyPageView.java
  267. +8 −8 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/sitemesh/Grails5535Factory.java
  268. +1 −3 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/sitemesh/GrailsLayoutDecoratorMapper.java
  269. +27 −27 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/sitemesh/GrailsRoutablePrintWriter.java
  270. +1 −1 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/taglib/GroovyPageAttributes.groovy
  271. +9 −8 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/taglib/GroovyPageTagBody.java
  272. +2 −2 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/taglib/jsp/JspActionSubmitTag.java
  273. +2 −2 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/taglib/jsp/JspCheckboxTag.java
  274. +2 −2 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/taglib/jsp/JspCurrencySelectTag.java
  275. +2 −2 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/taglib/jsp/JspDatePickerTag.java
  276. +2 −2 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/taglib/jsp/JspEachErrorTag.java
  277. +2 −2 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/taglib/jsp/JspHasErrorsTag.java
  278. +2 −2 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/taglib/jsp/JspInvokeGrailsTagLibTag.java
  279. +2 −2 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/taglib/jsp/JspLocaleSelectTag.java
  280. +2 −3 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/taglib/jsp/JspMessageTag.java
  281. +2 −2 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/taglib/jsp/JspRenderErrorsTag.java
  282. +2 −2 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/taglib/jsp/JspSelectTag.java
  283. +2 −2 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/taglib/jsp/JspSubmitToRemoteTag.java
  284. +2 −2 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/taglib/jsp/JspTimeZoneSelectTag.java
  285. +41 −41 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/util/CodecPrintWriter.java
  286. +7 −7 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/util/GrailsPrintWriter.java
  287. +4 −4 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/util/TypeConvertingMap.groovy
  288. +11 −12 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/util/WebUtils.java
  289. +5 −5 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/xml/PrettyPrintXMLStreamWriter.java
  290. +10 −9 grails-web/src/main/groovy/org/codehaus/groovy/grails/web/xml/XMLStreamWriter.java
  291. +18 −19 grails-webflow/build.gradle
  292. +10 −10 grails-webflow/src/main/groovy/org/codehaus/groovy/grails/webflow/engine/builder/FlowBuilder.groovy
  293. +1 −5 ...ow/src/main/groovy/org/codehaus/groovy/grails/webflow/engine/builder/FlowDefinitionException.java
  294. +1 −1 ...ow/src/main/groovy/org/codehaus/groovy/grails/webflow/engine/builder/RuntimeRedirectAction.groovy
  295. +2 −2 ...-webflow/src/main/groovy/org/codehaus/groovy/grails/webflow/execution/GrailsFlowExecutorImpl.java
  296. +23 −23 grails-webflow/src/test/groovy/org/codehaus/groovy/grails/webflow/FlowRedirectTests.groovy
  297. +3 −3 ...webflow/src/test/groovy/org/codehaus/groovy/grails/webflow/engine/builder/FlowBuilderTests.groovy
View
12 grails-bootstrap/build.gradle
@@ -1,14 +1,14 @@
repositories {
- mavenCentral()
+ mavenCentral()
}
dependencies {
- groovy group: 'org.codehaus.groovy', name: 'groovy-all', version: '1.8.0-beta-4'
+ groovy group: 'org.codehaus.groovy', name: 'groovy-all', version: '1.8.0-beta-4'
}
compileGroovy.doFirst {
- ant.mkdir(dir:sourceSets.main.classesDir)
- ant.propertyfile(file:"${sourceSets.main.classesDir}/grails.build.properties") {
- entry key:"grails.version", value:version
- }
+ ant.mkdir(dir:sourceSets.main.classesDir)
+ ant.propertyfile(file:"${sourceSets.main.classesDir}/grails.build.properties") {
+ entry key:"grails.version", value:version
+ }
}
jar.appendix = 'bootstrap'
View
12 grails-bootstrap/src/main/groovy/grails/util/AbstractBuildSettings.java
@@ -47,7 +47,7 @@
protected Map flatConfig = Collections.emptyMap();
abstract File getBaseDir();
-
+
/**
* Clears any locally cached values
*/
@@ -119,17 +119,17 @@ public void addPluginDirectory(File location, boolean isInline) {
/**
* Extracts the inline plugin dirs relative to the base dir of this project.
- *
+ *
* @see getInlinePluginsFromConfiguration(Map, File)
*/
@SuppressWarnings({ "rawtypes" })
protected Collection<File> getInlinePluginsFromConfiguration(@SuppressWarnings("hiding") Map config) {
return getInlinePluginsFromConfiguration(config, getBaseDir());
}
-
+
/**
* Extracts the inline plugin dirs from the given config, relative to the given baseDir.
- *
+ *
* @todo consider trowing an error here if an plugin does not exists at the location.
*/
@SuppressWarnings({ "rawtypes", "hiding" })
@@ -188,7 +188,7 @@ private Map getIfMap(Map config, String name) {
ConcurrentLinkedQueue<File> dirList = new ConcurrentLinkedQueue<File>();
for (String pluginBase : getPluginBaseDirectories()) {
- File[] pluginDirs = new File(pluginBase).listFiles(new FileFilter(){
+ File[] pluginDirs = new File(pluginBase).listFiles(new FileFilter() {
public boolean accept(File pathname) {
final String fileName = pathname.getName();
return pathname.isDirectory() && (!fileName.startsWith(".") && fileName.indexOf('-') >- 1);
@@ -247,7 +247,7 @@ public boolean isInlinePluginLocation(File pluginLocation) {
public Collection<File> getInlinePluginDirectories() {
getPluginDirectories(); // initailize the cache
Collection<File> locations = (ConcurrentLinkedQueue<File>) cache.get(KEY_INLINE_PLUGIN_LOCATIONS);
- if (locations == null){
+ if (locations == null) {
locations = new ConcurrentLinkedQueue<File>();
cache.put(KEY_INLINE_PLUGIN_LOCATIONS, locations);
}
View
323 grails-bootstrap/src/main/groovy/grails/util/BuildSettings.groovy
@@ -148,11 +148,11 @@ class BuildSettings extends AbstractBuildSettings {
* with the base URL that tests should be run against.
*/
public static final String FUNCTIONAL_BASE_URL_PROPERTY = 'grails.testing.functional.baseUrl'
-
- /**
- * The name of the working directory for commands that don't belong to a project (like create-app)
- */
- public static final String CORE_WORKING_DIR_NAME = '.core'
+
+ /**
+ * The name of the working directory for commands that don't belong to a project (like create-app)
+ */
+ public static final String CORE_WORKING_DIR_NAME = '.core'
/**
@@ -238,12 +238,12 @@ class BuildSettings extends AbstractBuildSettings {
URLClassLoader rootLoader
/**
- * The settings used to establish the HTTP proxy to use for dependency resolution etc.
+ * The settings used to establish the HTTP proxy to use for dependency resolution etc.
*/
ConfigObject proxySettings = new ConfigObject()
/**
- * The file containing the proxy settings
+ * The file containing the proxy settings
*/
File proxySettingsFile;
@@ -276,17 +276,14 @@ class BuildSettings extends AbstractBuildSettings {
* Setting for whether or not to enable verbose compilation, can be overridden via -verboseCompile(=[true|false])?
*/
boolean verboseCompile = false
-
- /**
- * Return whether the BuildConfig has been modified
- */
- boolean modified = false
-
+
+ /**
+ * Return whether the BuildConfig has been modified
+ */
+ boolean modified = false
private List<File> compileDependencies = []
private boolean defaultCompileDepsAdded = false
-
-
/** List containing the compile-time dependencies of the app as File instances. */
List<File> getCompileDependencies() {
@@ -306,14 +303,14 @@ class BuildSettings extends AbstractBuildSettings {
/** List containing the default (resolved via the dependencyManager) compile-time dependencies of the app as File instances. */
@Lazy List<File> defaultCompileDependencies = {
- Message.info "Resolving [compile] dependencies..."
+ Message.info "Resolving [compile] dependencies..."
def jarFiles = dependencyManager
.resolveDependencies(IvyDependencyManager.COMPILE_CONFIGURATION)
.getArtifactsReports(null, false)
.localFile + applicationJars
Message.debug("Resolved jars for [compile]: ${{->jarFiles.join('\n')}}")
- resolveCache['compile'] = jarFiles
- storeCache()
+ resolveCache['compile'] = jarFiles
+ storeCache()
return jarFiles
}()
@@ -338,14 +335,14 @@ class BuildSettings extends AbstractBuildSettings {
/** List containing the default test-time dependencies of the app as File instances. */
@Lazy List<File> defaultTestDependencies = {
- Message.info "Resolving [test] dependencies..."
+ Message.info "Resolving [test] dependencies..."
def jarFiles = dependencyManager
.resolveDependencies(IvyDependencyManager.TEST_CONFIGURATION)
.getArtifactsReports(null, false)
.localFile + applicationJars
Message.debug("Resolved jars for [test]: ${{->jarFiles.join('\n')}}")
- resolveCache['test'] = jarFiles
- storeCache()
+ resolveCache['test'] = jarFiles
+ storeCache()
return jarFiles
}()
@@ -370,90 +367,90 @@ class BuildSettings extends AbstractBuildSettings {
/** List containing the default runtime-time dependencies of the app as File instances. */
@Lazy List<File> defaultRuntimeDependencies = {
- Message.info "Resolving [runtime] dependencies..."
+ Message.info "Resolving [runtime] dependencies..."
def jarFiles = dependencyManager
.resolveDependencies(IvyDependencyManager.RUNTIME_CONFIGURATION)
.getArtifactsReports(null, false)
.localFile + applicationJars
Message.debug("Resolved jars for [runtime]: ${{->jarFiles.join('\n')}}")
- resolveCache['runtime'] = jarFiles
- storeCache()
+ resolveCache['runtime'] = jarFiles
+ storeCache()
return jarFiles
}()
- private List<File> providedDependencies = []
- private boolean defaultProvidedDepsAdded = false
-
- /** List containing the runtime dependencies of the app as File instances. */
- List<File> getProvidedDependencies() {
- if (!defaultProvidedDepsAdded) {
- providedDependencies += defaultProvidedDependencies
- defaultProvidedDepsAdded = true
- }
- return providedDependencies
- }
-
- /**
- * Sets the runtime dependencies for the project
- */
- void setProvidedDependencies(List<File> deps) {
- providedDependencies = deps
- }
-
+ private List<File> providedDependencies = []
+ private boolean defaultProvidedDepsAdded = false
+
+ /** List containing the runtime dependencies of the app as File instances. */
+ List<File> getProvidedDependencies() {
+ if (!defaultProvidedDepsAdded) {
+ providedDependencies += defaultProvidedDependencies
+ defaultProvidedDepsAdded = true
+ }
+ return providedDependencies
+ }
+
+ /**
+ * Sets the runtime dependencies for the project
+ */
+ void setProvidedDependencies(List<File> deps) {
+ providedDependencies = deps
+ }
+
/** List containing the dependencies needed at development time, but provided by the container at runtime **/
@Lazy List<File> defaultProvidedDependencies = {
if (dependenciesExternallyConfigured) {
return []
}
- Message.info "Resolving [provided] dependencies..."
+ Message.info "Resolving [provided] dependencies..."
def jarFiles = dependencyManager
.resolveDependencies(IvyDependencyManager.PROVIDED_CONFIGURATION)
.getArtifactsReports(null, false)
.localFile
Message.debug("Resolved jars for [provided]: ${{->jarFiles.join('\n')}}")
- resolveCache['provided'] = jarFiles
- storeCache()
-
+ resolveCache['provided'] = jarFiles
+ storeCache()
+
return jarFiles
}()
- private List<File> buildDependencies = []
- private boolean defaultBuildDepsAdded = false
-
- /** List containing the runtime dependencies of the app as File instances. */
- List<File> getBuildDependencies() {
- if (!defaultBuildDepsAdded) {
- buildDependencies += defaultDuildDependencies
- defaultBuildDepsAdded = true
- }
- return buildDependencies
- }
-
- /**
- * Sets the runtime dependencies for the project
- */
- void setBuildDependencies(List<File> deps) {
- buildDependencies = deps
- }
+ private List<File> buildDependencies = []
+ private boolean defaultBuildDepsAdded = false
+
+ /** List containing the runtime dependencies of the app as File instances. */
+ List<File> getBuildDependencies() {
+ if (!defaultBuildDepsAdded) {
+ buildDependencies += defaultDuildDependencies
+ defaultBuildDepsAdded = true
+ }
+ return buildDependencies
+ }
+
+ /**
+ * Sets the runtime dependencies for the project
+ */
+ void setBuildDependencies(List<File> deps) {
+ buildDependencies = deps
+ }
/**
* List containing the dependencies required for the build system only
*/
@Lazy List<File> defaultDuildDependencies = {
if (dependenciesExternallyConfigured) {
return []
}
-
- Message.info "Resolving [build] dependencies..."
+
+ Message.info "Resolving [build] dependencies..."
def jarFiles = dependencyManager
.resolveDependencies(IvyDependencyManager.BUILD_CONFIGURATION)
.getArtifactsReports(null, false)
.localFile + applicationJars
Message.debug("Resolved jars for [build]: ${{->jarFiles.join('\n')}}")
- resolveCache['build'] = jarFiles
- storeCache()
-
+ resolveCache['build'] = jarFiles
+ storeCache()
+
return jarFiles
}()
@@ -490,8 +487,8 @@ class BuildSettings extends AbstractBuildSettings {
private boolean projectWarOsgiHeadersSet
private boolean buildListenersSet
private boolean verboseCompileSet
- private String resolveChecksum
- private Map resolveCache = new ConcurrentHashMap()
+ private String resolveChecksum
+ private Map resolveCache = new ConcurrentHashMap()
BuildSettings() {
this(null)
@@ -545,26 +542,26 @@ class BuildSettings extends AbstractBuildSettings {
}
}
- private storeCache() {
- projectWorkDir.mkdirs()
- if(resolveChecksum) {
- try {
- def cachedResolve = new File(projectWorkDir, "${resolveChecksum}.resolve")
- cachedResolve.withOutputStream { output ->
- def oos = new ObjectOutputStream(output)
- oos.writeObject(resolveCache)
-
- }
- }
- catch(e) {
- // failed to cache for some reason, probably I/O related. Ignore.
- }
-
- }
- }
+ private storeCache() {
+ projectWorkDir.mkdirs()
+ if (resolveChecksum) {
+ try {
+ def cachedResolve = new File(projectWorkDir, "${resolveChecksum}.resolve")
+ cachedResolve.withOutputStream { output ->
+ def oos = new ObjectOutputStream(output)
+ oos.writeObject(resolveCache)
+
+ }
+ }
+ catch(e) {
+ // failed to cache for some reason, probably I/O related. Ignore.
+ }
+
+ }
+ }
private def loadBuildPropertiesFromClasspath(Properties buildProps) {
InputStream stream = getClass().classLoader.getResourceAsStream("grails.build.properties")
- if(stream == null) {
+ if (stream == null) {
stream = getClass().classLoader.getResourceAsStream("build.properties")
}
if (stream) {
@@ -769,62 +766,60 @@ class BuildSettings extends AbstractBuildSettings {
defaultPluginSet = config.grails.default.plugin.set
}
flatConfig = config.flatten()
-
- def configURL = config.getConfigFile()
- def configFile = configURL ? new File(configURL.getFile()) : null
-
- def metadataFile = Metadata.current.getMetadataFile()
-
- if(configFile?.exists() && metadataFile?.exists()) {
- this.resolveChecksum = ChecksumHelper.computeAsString(configFile, "md5") +
- ChecksumHelper.computeAsString(metadataFile, "md5")
- }
-
- def cachedResolve = new File("${projectWorkDir}/${resolveChecksum}.resolve")
- if(cachedResolve.exists()) {
-
-
-
- cachedResolve.withInputStream { input ->
- def ois = new ObjectInputStream(input)
- def dependencyMap = ois.readObject()
-
- def compileDeps = dependencyMap.compile
- def runtimeDeps = dependencyMap.runtime
- def testDeps = dependencyMap.test
- def buildDeps = dependencyMap.build
- def providedDeps = dependencyMap.provided
-
- if(compileDeps) {
- this.@compileDependencies.addAll(compileDeps)
- defaultCompileDepsAdded = true
- }
-
- if(runtimeDeps) {
- this.@runtimeDependencies.addAll(runtimeDeps)
- defaultRuntimeDepsAdded = true
- }
-
- if(testDeps) {
- this.@testDependencies.addAll(testDeps)
- defaultTestDepsAdded = true
- }
-
- if(buildDeps) {
- this.@buildDependencies.addAll(buildDeps)
- defaultBuildDepsAdded = true
- }
-
- if(providedDeps) {
- this.@providedDependencies.addAll(providedDeps)
- defaultProvidedDepsAdded = true
- }
- }
- }
- else {
- this.modified = true
- }
- configureDependencyManager(config)
+
+ def configURL = config.getConfigFile()
+ def configFile = configURL ? new File(configURL.getFile()) : null
+
+ def metadataFile = Metadata.current.getMetadataFile()
+
+ if (configFile?.exists() && metadataFile?.exists()) {
+ this.resolveChecksum = ChecksumHelper.computeAsString(configFile, "md5") +
+ ChecksumHelper.computeAsString(metadataFile, "md5")
+ }
+
+ def cachedResolve = new File("${projectWorkDir}/${resolveChecksum}.resolve")
+ if (cachedResolve.exists()) {
+
+ cachedResolve.withInputStream { input ->
+ def ois = new ObjectInputStream(input)
+ def dependencyMap = ois.readObject()
+
+ def compileDeps = dependencyMap.compile
+ def runtimeDeps = dependencyMap.runtime
+ def testDeps = dependencyMap.test
+ def buildDeps = dependencyMap.build
+ def providedDeps = dependencyMap.provided
+
+ if (compileDeps) {
+ this.@compileDependencies.addAll(compileDeps)
+ defaultCompileDepsAdded = true
+ }
+
+ if (runtimeDeps) {
+ this.@runtimeDependencies.addAll(runtimeDeps)
+ defaultRuntimeDepsAdded = true
+ }
+
+ if (testDeps) {
+ this.@testDependencies.addAll(testDeps)
+ defaultTestDepsAdded = true
+ }
+
+ if (buildDeps) {
+ this.@buildDependencies.addAll(buildDeps)
+ defaultBuildDepsAdded = true
+ }
+
+ if (providedDeps) {
+ this.@providedDependencies.addAll(providedDeps)
+ defaultProvidedDepsAdded = true
+ }
+ }
+ }
+ else {
+ this.modified = true
+ }
+ configureDependencyManager(config)
}
protected boolean settingsFileLoaded = false
@@ -841,14 +836,14 @@ class BuildSettings extends AbstractBuildSettings {
}
this.proxySettingsFile = new File("$userHome/.grails/ProxySettings.groovy")
- if(proxySettingsFile.exists()) {
+ if (proxySettingsFile.exists()) {
slurper = createConfigSlurper()
try {
Script script = gcl.parseClass(proxySettingsFile)?.newInstance()
if (script) {
proxySettings = slurper.parse(script)
def current = proxySettings.currentProxy
- if(current) {
+ if (current) {
proxySettings[current]?.each { key, value ->
System.setProperty(key, value)
}
@@ -895,7 +890,7 @@ class BuildSettings extends AbstractBuildSettings {
}
} as TransferListener
-
+
def grailsConfig = config.grails
if (!dependenciesExternallyConfigured) {
@@ -914,27 +909,26 @@ class BuildSettings extends AbstractBuildSettings {
}
}
}
-
+
def dependencyConfig = grailsConfig.project.dependency.resolution
if (!dependencyConfig) {
dependencyConfig = grailsConfig.global.dependency.resolution
dependencyManager.inheritsAll = true
}
if (dependencyConfig) {
- if(resolveCache) {
- dependencyManager.pluginsOnly = true
- }
-
+ if (resolveCache) {
+ dependencyManager.pluginsOnly = true
+ }
+
dependencyManager.parseDependencies dependencyConfig
-
}
-
+
// All projects need the plugins to be resolved.
def handlePluginDirectory = pluginDependencyHandler()
def pluginDirs = getPluginDirectories()
- for(dir in pluginDirs) {
- handlePluginDirectory(dir)
- }
+ for (dir in pluginDirs) {
+ handlePluginDirectory(dir)
+ }
}
Closure pluginDependencyHandler() {
@@ -970,9 +964,8 @@ class BuildSettings extends AbstractBuildSettings {
}
def inlinePlugins = getInlinePluginsFromConfiguration(pluginConfig, dir)
- if(inlinePlugins) {
-
- for(File inlinePlugin in inlinePlugins) {
+ if (inlinePlugins) {
+ for (File inlinePlugin in inlinePlugins) {
addPluginDirectory inlinePlugin, true
// recurse
def handleInlinePlugin = pluginDependencyHandler()
@@ -1016,7 +1009,7 @@ class BuildSettings extends AbstractBuildSettings {
}
if (!projectWorkDirSet) {
- def workingDirName = metadata.getApplicationName() ?: CORE_WORKING_DIR_NAME
+ def workingDirName = metadata.getApplicationName() ?: CORE_WORKING_DIR_NAME
projectWorkDir = new File(getPropertyValue(PROJECT_WORK_DIR, props, "$grailsWorkDir/projects/${workingDirName}"))
}
@@ -1026,7 +1019,7 @@ class BuildSettings extends AbstractBuildSettings {
if (!projectWarFileSet) {
def version = metadata.getApplicationVersion()
- def appName = metadata.getApplicationName() ?: baseDir.name
+ def appName = metadata.getApplicationName() ?: baseDir.name
def warName = version ? "$baseDir/target/${appName}-${version}.war" : "$baseDir/target/${appName}.war"
projectWarFile = new File(getPropertyValue(PROJECT_WAR_FILE, props, warName))
@@ -1163,7 +1156,7 @@ class BuildSettings extends AbstractBuildSettings {
webXmlLocation = location
webXmlFileSet = true
}
-
+
String getFunctionalTestBaseUrl() {
System.getProperty(FUNCTIONAL_BASE_URL_PROPERTY)
}
View
26 grails-bootstrap/src/main/groovy/grails/util/Environment.java
@@ -30,8 +30,6 @@
*
* @author Graeme Rocher
* @since 1.1
- * <p/>
- * Created: Dec 12, 2008
*/
@SuppressWarnings("serial")
public enum Environment {
@@ -170,7 +168,7 @@ public static Environment getEnvironment(String shortName) {
* @param closure The top level closure
* @return The environment specific block or null if non exists
*/
- public static Closure getEnvironmentSpecificBlock(Closure closure) {
+ public static Closure<?> getEnvironmentSpecificBlock(Closure<?> closure) {
final Environment env = getCurrent();
return getEnvironmentSpecificBlock(env, closure);
}
@@ -191,7 +189,7 @@ public static Closure getEnvironmentSpecificBlock(Closure closure) {
* @param closure The top level closure
* @return The environment specific block or null if non exists
*/
- public static Closure getEnvironmentSpecificBlock(Environment env, Closure closure) {
+ public static Closure<?> getEnvironmentSpecificBlock(Environment env, Closure<?> closure) {
if (closure == null) {
return null;
}
@@ -215,7 +213,7 @@ public static Closure getEnvironmentSpecificBlock(Environment env, Closure closu
* @param closure The top level closure
* @return The result of the closure execution
*/
- public static Object executeForCurrentEnvironment(Closure closure) {
+ public static Object executeForCurrentEnvironment(Closure<?> closure) {
final Environment env = getCurrent();
return executeForEnvironment(env, closure);
}
@@ -236,7 +234,7 @@ public static Object executeForCurrentEnvironment(Closure closure) {
* @param closure The top level closure
* @return The result of the closure execution
*/
- public static Object executeForEnvironment(Environment env, Closure closure) {
+ public static Object executeForEnvironment(Environment env, Closure<?> closure) {
if (closure == null) {
return null;
}
@@ -245,7 +243,7 @@ public static Object executeForEnvironment(Environment env, Closure closure) {
return evaluator.execute();
}
- private static EnvironmentBlockEvaluator evaluateEnvironmentSpecificBlock(Environment environment, Closure closure) {
+ private static EnvironmentBlockEvaluator evaluateEnvironmentSpecificBlock(Environment environment, Closure<?> closure) {
final EnvironmentBlockEvaluator evaluator = new EnvironmentBlockEvaluator(environment);
closure.setDelegate(evaluator);
closure.call();
@@ -254,9 +252,9 @@ private static EnvironmentBlockEvaluator evaluateEnvironmentSpecificBlock(Enviro
private static class EnvironmentBlockEvaluator extends GroovyObjectSupport {
private Environment current;
- private Closure callable;
+ private Closure<?> callable;
- public Closure getCallable() {
+ public Closure<?> getCallable() {
return callable;
}
@@ -269,26 +267,26 @@ private EnvironmentBlockEvaluator(Environment e) {
}
@SuppressWarnings("unused")
- public void environments(Closure c) {
+ public void environments(Closure<?> c) {
if (c != null) {
c.setDelegate(this);
c.call();
}
}
@SuppressWarnings("unused")
- public void production(Closure c) {
+ public void production(Closure<?> c) {
if (current == Environment.PRODUCTION) {
this.callable = c;
}
}
@SuppressWarnings("unused")
- public void development(Closure c) {
+ public void development(Closure<?> c) {
if (current == Environment.DEVELOPMENT) {
this.callable = c;
}
}
@SuppressWarnings("unused")
- public void test(Closure c) {
+ public void test(Closure<?> c) {
if (current == Environment.TEST) {
this.callable = c;
}
@@ -299,7 +297,7 @@ public Object methodMissing(String name, Object args) {
Object[] argsArray = (Object[])args;
if (args != null && argsArray.length > 0 && (argsArray[0] instanceof Closure)) {
if (current == Environment.CUSTOM && current.getName().equals(name)) {
- this.callable = (Closure) argsArray[0];
+ this.callable = (Closure<?>) argsArray[0];
}
return null;
}
View
8 grails-bootstrap/src/main/groovy/grails/util/Metadata.java
@@ -59,14 +59,12 @@ private Metadata() {
private Metadata(File f) {
this.metadataFile = f;
}
-
-
public File getMetadataFile() {
- return metadataFile;
- }
+ return metadataFile;
+ }
- /**
+ /**
* Resets the current state of the Metadata so it is re-read.
*/
public static void reset() {
View
37 grails-bootstrap/src/main/groovy/grails/util/PluginBuildSettings.groovy
@@ -145,9 +145,9 @@ class PluginBuildSettings {
*/
Resource[] getInlinePluginDirectories() {
def locations = cache['inlinePluginLocations']
- if(locations == null) {
+ if (locations == null) {
- if(buildSettings)
+ if (buildSettings)
locations = buildSettings.getInlinePluginDirectories().collect { new FileSystemResource(it) }
else
locations = [] as Resource[]
@@ -338,7 +338,7 @@ class PluginBuildSettings {
Resource[] getPluginDirectories() {
def pluginDirectoryResources = cache['pluginDirectoryResources']
if (!pluginDirectoryResources) {
- if(buildSettings)
+ if (buildSettings)
pluginDirectoryResources = buildSettings.getPluginDirectories().collect { new FileSystemResource(it) } as Resource[]
else
pluginDirectoryResources = [] as Resource[]
@@ -369,8 +369,8 @@ class PluginBuildSettings {
*/
List<Resource> getImplicitPluginDirectories() {
def implicitPluginDirectories = cache['implicitPluginDirectories']
- if(implicitPluginDirectories == null) {
- if(buildSettings)
+ if (implicitPluginDirectories == null) {
+ if (buildSettings)
implicitPluginDirectories = buildSettings.getImplicitPluginDirectories().collect { new FileSystemResource(it) }
else
implicitPluginDirectories = [] as Resource[]
@@ -578,28 +578,27 @@ class PluginBuildSettings {
if (newResources) {
if (processExcludes) {
def excludes = EXCLUDED_RESOURCES
- AntPathMatcher pathMatcher=new AntPathMatcher()
+ AntPathMatcher pathMatcher=new AntPathMatcher()
newResources = newResources.findAll { Resource r ->
- def relPath = relativePath(dir.file, r.file)
+ def relPath = relativePath(dir.file, r.file)
!excludes.any {
- pathMatcher.match(it, relPath)
- }
+ pathMatcher.match(it, relPath)
+ }
}
}
originalResources = ArrayUtils.addAll(originalResources, newResources as Resource[])
}
}
return originalResources
}
-
- private String relativePath(File relbase, File file) {
- def pathParts = []
- def currentFile = file
- while (currentFile != null && currentFile != relbase) {
- pathParts += currentFile.name
- currentFile = currentFile.parentFile
- }
- pathParts.reverse().join('/')
- }
+ private String relativePath(File relbase, File file) {
+ def pathParts = []
+ def currentFile = file
+ while (currentFile != null && currentFile != relbase) {
+ pathParts += currentFile.name
+ currentFile = currentFile.parentFile
+ }
+ pathParts.reverse().join('/')
+ }
}
View
4 grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/cli/CommandLineHelper.java
@@ -22,7 +22,7 @@
import org.codehaus.groovy.runtime.DefaultGroovyMethods;
/**
- * Utility methods for use on the command line, including method to accept user input etc.
+ * Utility methods for use on the command line, including method to accept user input etc.
*
* @author Graeme Rocher
* @since 1.2
@@ -106,5 +106,5 @@ public String userInput(String message, String[] validResponses) {
// No valid response given.
out.println("No valid response entered - giving up asking.");
return null;
- }
+ }
}
View
17 grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/cli/GrailsScriptRunner.java
@@ -28,7 +28,14 @@
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
-import java.io.*;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.net.MalformedURLException;
@@ -424,7 +431,7 @@ private int callPluginOrGrailsScript(String scriptName, String env) {
throw new RuntimeException("Invalid classpath URL", ex);
}
- if(settings.getGrailsHome() != null) {
+ if (settings.getGrailsHome() != null) {
try {
Log4jConfigurer.initLogging("file:" + settings.getGrailsHome() + "/scripts/log4j.properties");
} catch (FileNotFoundException e) {
@@ -499,7 +506,7 @@ private int callPluginOrGrailsScript(String scriptName, String env) {
private static final long serialVersionUID = 1L;
@Override public Object call(Object arguments) { return null; }
@Override public Object call() { return null; }
- @Override public Object call(Object[] args) { return null; }
+ @Override public Object call(Object... args) { return null; }
};
// First try to load the script from its file. If there is no
@@ -667,7 +674,7 @@ private String askUserForBestMatch(String scriptName, List<String> topMatches) t
}
}
- private int executeWithGantInstance(Gant gant, final Closure doNothingClosure) {
+ private int executeWithGantInstance(Gant gant, final Closure<?> doNothingClosure) {
gant.prepareTargets();
gant.setAllPerTargetPostHooks(doNothingClosure);
gant.setAllPerTargetPreHooks(doNothingClosure);
@@ -706,7 +713,7 @@ private String getScriptNameFromFile(File scriptPath) {
* exists there; otherwise it will load the Init class.
*/
private GantBinding initBinding(final GantBinding binding) {
- Closure c = settings.getGrailsScriptClosure();
+ Closure<?> c = settings.getGrailsScriptClosure();
c.setDelegate(binding);
binding.setVariable("grailsScript", c);
binding.setVariable("grailsSettings", settings);
View
10 grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/cli/ScriptNameResolver.groovy
@@ -28,12 +28,12 @@ class ScriptNameResolver {
static boolean resolvesTo(String scriptName, String scriptFileName) {
def scriptFileNameTokens = scriptFileName.findAll(/[A-Z][a-z]+/)
def scriptNameTokens = scriptName.findAll(/[A-Z][a-z]*/)
-
- if(scriptFileNameTokens.size() != scriptNameTokens.size()) return false
- for(int i = 0; i < scriptNameTokens.size(); i++) {
+
+ if (scriptFileNameTokens.size() != scriptNameTokens.size()) return false
+ for (int i = 0; i < scriptNameTokens.size(); i++) {
String str = scriptNameTokens[i]
- if(!scriptFileNameTokens[i].startsWith(str)) return false
+ if (!scriptFileNameTokens[i].startsWith(str)) return false
}
- true
+ true
}
}
View
4 grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/cli/api/BaseSettingsApi.java
@@ -173,7 +173,7 @@ public boolean isInteractive() {
public Resource grailsResource(String path) {
if (grailsHome != null) {
FileSystemResource resource = new FileSystemResource(grailsHome + "/" + path);
- if(!resource.exists()) {
+ if (!resource.exists()) {
resource = new FileSystemResource(grailsHome + "/grails-resources/" + path);
}
return resource;
@@ -249,7 +249,7 @@ public void updateMetadata(@SuppressWarnings("rawtypes") Map entries) {
*
* where 'compile' is the target.
*/
- public void profile(String name, Closure callable ) {
+ public void profile(String name, Closure<?> callable ) {
if (enableProfile) {
long now = System.currentTimeMillis();
System.out.println("Profiling ["+name+"] start");
View
10 ...trap/src/main/groovy/org/codehaus/groovy/grails/cli/support/GrailsBuildEventListener.java
@@ -36,6 +36,7 @@
import org.apache.tools.ant.BuildEvent;
import org.apache.tools.ant.BuildListener;
+import org.codehaus.groovy.runtime.StackTraceUtils;
import org.springframework.core.io.Resource;
/**
@@ -47,6 +48,7 @@
private static final Pattern EVENT_NAME_PATTERN = Pattern.compile("event([A-Z]\\w*)");
private GroovyClassLoader classLoader;
private Binding binding;
+ @SuppressWarnings("rawtypes")
protected Map<String, List<Closure>> globalEventHooks = new HashMap<String, List<Closure>>();
private BuildSettings buildSettings;
@@ -70,7 +72,7 @@ public void setClassLoader(GroovyClassLoader classLoader) {
this.classLoader = classLoader;
}
- public void setGlobalEventHooks(Map<String, List<Closure>> globalEventHooks) {
+ public void setGlobalEventHooks(@SuppressWarnings("rawtypes") Map<String, List<Closure>> globalEventHooks) {
this.globalEventHooks = globalEventHooks;
}
@@ -121,6 +123,7 @@ public void loadEventsScript(File eventScript) {
Script script = (Script) scriptClass.newInstance();
script.setBinding(new Binding(binding.getVariables()) {
+ @SuppressWarnings("rawtypes")
@Override
public void setVariable(String var, Object o) {
final Matcher matcher = EVENT_NAME_PATTERN.matcher(var);
@@ -131,15 +134,15 @@ public void setVariable(String var, Object o) {
hooks = new ArrayList<Closure>();
globalEventHooks.put(eventName, hooks);
}
- hooks.add((Closure) o);
+ hooks.add((Closure<?>) o);
}
super.setVariable(var, o);
}
});
script.run();
}
catch (Throwable e) {
- org.codehaus.groovy.runtime.StackTraceUtils.deepSanitize(e);
+ StackTraceUtils.deepSanitize(e);
e.printStackTrace();
System.out.println("Error loading event script from file [" + eventScript + "] " + e.getMessage());
}
@@ -181,6 +184,7 @@ public void triggerEvent(String eventName) {
* @param eventName The name of the event
* @param arguments The arguments
*/
+ @SuppressWarnings("rawtypes")
public void triggerEvent(String eventName, Object... arguments) {
List<Closure> handlers = globalEventHooks.get(eventName);
if (handlers != null) {
View
22 grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/plugins/GrailsPluginUtils.groovy
@@ -87,12 +87,12 @@ class GrailsPluginUtils {
/**
* Returns true if rightVersion is greater than leftVersion
- * @param leftVersion
+ * @param leftVersion
* @param rightVersion
* @return
*/
static boolean isVersionGreaterThan(String leftVersion, String rightVersion) {
- if(leftVersion == rightVersion) return false
+ if (leftVersion == rightVersion) return false
def versions = [leftVersion, rightVersion]
versions = versions.sort(new VersionComparator())
return versions[1] == rightVersion
@@ -342,9 +342,9 @@ class GrailsPluginUtils {
}
class VersionComparator implements Comparator {
-
+
static private final SNAPSHOT_SUFFIXES = ["-SNAPSHOT", ".BUILD-SNAPSHOT"].asImmutable()
-
+
int compare(o1, o2) {
int result = 0
if (o1 == '*') {
@@ -380,18 +380,18 @@ class VersionComparator implements Comparator {
if (result != 0) {
break
}
- if(i == (nums1.size()-1) && bigRight) {
- if(nums2[i+1] != 0)
+ if (i == (nums1.size()-1) && bigRight) {
+ if (nums2[i+1] != 0)
result = -1; break
}
}
- else if(bigLeft){
- if(nums1[i] != 0)
- result = 1; break
+ else if (bigLeft) {
+ if (nums1[i] != 0)
+ result = 1; break
}
}
}
-
+
if (result == 0) {
// Versions are equal, but one may be a snapshot.
// A snapshot version is considered less than a non snapshot version
@@ -421,7 +421,7 @@ class VersionComparator implements Comparator {
version
}
}
-
+
protected isSnapshot(String version) {
SNAPSHOT_SUFFIXES.any { version.endsWith(it) }
}
View
83 ...trap/src/main/groovy/org/codehaus/groovy/grails/resolve/AbstractIvyDependencyManager.java
@@ -124,45 +124,43 @@
protected String applicationName;
protected String applicationVersion;
protected DefaultDependencyDescriptor currentDependencyDescriptor;
- protected DefaultModuleDescriptor moduleDescriptor;
+ protected DefaultModuleDescriptor moduleDescriptor;
protected boolean hasApplicationDependencies = false;
-
-
+
public DefaultModuleDescriptor getModuleDescriptor() {
- return moduleDescriptor;
- }
+ return moduleDescriptor;
+ }
- public void setModuleDescriptor(DefaultModuleDescriptor moduleDescriptor) {
- this.moduleDescriptor = moduleDescriptor;
- }
+ public void setModuleDescriptor(DefaultModuleDescriptor moduleDescriptor) {
+ this.moduleDescriptor = moduleDescriptor;
+ }
- /**
+ /**
* Returns true if the application has any dependencies that are not inherited
* from the framework or other plugins
*/
-
public boolean hasApplicationDependencies() {
- return hasApplicationDependencies;
- }
-
- public DefaultDependencyDescriptor getCurrentDependencyDescriptor() {
- return currentDependencyDescriptor;
- }
-
- public void setCurrentDependencyDescriptor(
- DefaultDependencyDescriptor currentDependencyDescriptor) {
- this.currentDependencyDescriptor = currentDependencyDescriptor;
- }
-
- public Collection<String> getUsedConfigurations() {
- return usedConfigurations;
- }
-
- public void setUsedConfigurations(Collection<String> usedConfigurations) {
- this.usedConfigurations = usedConfigurations;
- }
-
- /**
+ return hasApplicationDependencies;
+ }
+
+ public DefaultDependencyDescriptor getCurrentDependencyDescriptor() {
+ return currentDependencyDescriptor;
+ }
+
+ public void setCurrentDependencyDescriptor(
+ DefaultDependencyDescriptor currentDependencyDescriptor) {
+ this.currentDependencyDescriptor = currentDependencyDescriptor;
+ }
+
+ public Collection<String> getUsedConfigurations() {
+ return usedConfigurations;
+ }
+
+ public void setUsedConfigurations(Collection<String> usedConfigurations) {
+ this.usedConfigurations = usedConfigurations;
+ }
+
+ /**
* Obtains a set of dependency descriptors defined in the project
*/
Set<DependencyDescriptor> getDependencyDescriptors() {
@@ -259,14 +257,16 @@ public void addDependency(ModuleRevisionId revisionId) {
}
public void configureDependencyDescriptor(EnhancedDefaultDependencyDescriptor dependencyDescriptor, String scope) {
- configureDependencyDescriptor(dependencyDescriptor, scope, null, false);
+ configureDependencyDescriptor(dependencyDescriptor, scope, null, false);
}
-
- public void configureDependencyDescriptor(EnhancedDefaultDependencyDescriptor dependencyDescriptor, String scope, Closure dependencyConfigurer) {
- configureDependencyDescriptor(dependencyDescriptor, scope, dependencyConfigurer, false);
+
+ public void configureDependencyDescriptor(EnhancedDefaultDependencyDescriptor dependencyDescriptor,
+ String scope, @SuppressWarnings("rawtypes") Closure dependencyConfigurer) {
+ configureDependencyDescriptor(dependencyDescriptor, scope, dependencyConfigurer, false);
}
- public void configureDependencyDescriptor(EnhancedDefaultDependencyDescriptor dependencyDescriptor, String scope, Closure dependencyConfigurer, boolean pluginMode ) {
+ public void configureDependencyDescriptor(EnhancedDefaultDependencyDescriptor dependencyDescriptor,
+ String scope, @SuppressWarnings("rawtypes") Closure dependencyConfigurer, boolean pluginMode ) {
if (!usedConfigurations.contains(scope)) {
usedConfigurations.add( scope );
}
@@ -282,10 +282,10 @@ public void configureDependencyDescriptor(EnhancedDefaultDependencyDescriptor de
finally {
this.currentDependencyDescriptor = null;
}
- if (dependencyDescriptor.getModuleConfigurations().length == 0){
+ if (dependencyDescriptor.getModuleConfigurations().length == 0) {
List<String> mappings = configurationMappings.get(scope);
- if(mappings != null) {
- for(String m : mappings) {
+ if (mappings != null) {
+ for (String m : mappings) {
dependencyDescriptor.addDependencyConfiguration( scope, m );
}
}
@@ -302,11 +302,10 @@ public void configureDependencyDescriptor(EnhancedDefaultDependencyDescriptor de
else {
dependencyDescriptors.add(dependencyDescriptor);
if (dependencyDescriptor.isExportedToApplication()) {
- moduleDescriptor.addDependency(dependencyDescriptor);
+ moduleDescriptor.addDependency(dependencyDescriptor);
}
-
}
- }
+ }
protected ArtifactId createExcludeArtifactId(String excludeName) {
return createExcludeArtifactId(excludeName, PatternMatcher.ANY_EXPRESSION);
View
1 ...tstrap/src/main/groovy/org/codehaus/groovy/grails/resolve/DependencyDefinitionParser.java
@@ -30,5 +30,6 @@
*
* @param definition The DSL code
*/
+ @SuppressWarnings("rawtypes")
void parseDependencies(Closure definition);
}
View
2 ...main/groovy/org/codehaus/groovy/grails/resolve/EnhancedDefaultDependencyDescriptor.groovy
@@ -122,7 +122,7 @@ class EnhancedDefaultDependencyDescriptor extends DefaultDependencyDescriptor {
field.set(this, b)
}
- void addRuleForModuleId(ModuleId mid, String scope, String type = WILDCARD, String ext = WILDCARD) {
+ void addRuleForModuleId(ModuleId mid, String scope, String type = WILDCARD, String ext = WILDCARD) {
def id = new ArtifactId(mid, WILDCARD, type, ext)
def rule = new DefaultExcludeRule(id, ExactPatternMatcher.INSTANCE, null)
addExcludeRule scope, rule
View
546 ...-bootstrap/src/main/groovy/org/codehaus/groovy/grails/resolve/IvyDependencyManager.groovy
@@ -55,9 +55,6 @@ import org.apache.ivy.core.module.id.ArtifactId
import org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor
import org.apache.ivy.plugins.repository.TransferListener
import java.util.concurrent.ConcurrentLinkedQueue
-
-
-
import org.apache.ivy.plugins.resolver.RepositoryResolver
import org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser
import org.codehaus.groovy.grails.plugins.VersionComparator
@@ -70,27 +67,26 @@ import org.codehaus.groovy.grails.plugins.VersionComparator
*/
class IvyDependencyManager extends AbstractIvyDependencyManager implements DependencyResolver, DependencyDefinitionParser{
-
ResolveEngine resolveEngine
BuildSettings buildSettings
IvySettings ivySettings
MessageLogger logger
Metadata metadata
- ChainResolver chainResolver = new ChainResolver(name:"default",returnFirst:true)
+ ChainResolver chainResolver = new ChainResolver(name:"default",returnFirst:true)
DefaultDependencyDescriptor currentDependencyDescriptor
Collection repositoryData = new ConcurrentLinkedQueue()
Collection<String> configuredPlugins = new ConcurrentLinkedQueue()
-
+
Collection moduleExcludes = new ConcurrentLinkedQueue()
TransferListener transferListener
boolean readPom = false
boolean inheritsAll = false
boolean resolveErrors = false
- boolean defaultDependenciesProvided = false
- boolean pluginsOnly = false
- boolean inheritRepositories = true
-
+ boolean defaultDependenciesProvided = false
+ boolean pluginsOnly = false
+ boolean inheritRepositories = true
+
/**
* Creates a new IvyDependencyManager instance
*/
@@ -214,158 +210,158 @@ class IvyDependencyManager extends AbstractIvyDependencyManager implements Depen
//mavenRepo "http://repository.jboss.com/maven2/
}
dependencies {
- def compileTimeDependenciesMethod = defaultDependenciesProvided ? 'provided' : 'compile'
- def runtimeDependenciesMethod = defaultDependenciesProvided ? 'provided' : 'runtime'
-
- // dependencies needed by the Grails build system
- for(mrid in [ ModuleRevisionId.newInstance("org.tmatesoft.svnkit", "svnkit", "1.3.4"),
- ModuleRevisionId.newInstance("org.apache.ant","ant","1.7.1"),
- ModuleRevisionId.newInstance("org.apache.ant","ant-launcher","1.7.1"),
- ModuleRevisionId.newInstance("org.apache.ant","ant-junit","1.7.1"),
- ModuleRevisionId.newInstance("org.apache.ant","ant-nodeps","1.7.1"),
- ModuleRevisionId.newInstance("org.apache.ant","ant-trax","1.7.1"),
- ModuleRevisionId.newInstance("jline","jline","0.9.94"),
- ModuleRevisionId.newInstance("org.fusesource.jansi","jansi","1.2.1"),
- ModuleRevisionId.newInstance("xalan","serializer","2.7.1"),
- ModuleRevisionId.newInstance("org.grails","grails-docs",grailsVersion),
- ModuleRevisionId.newInstance("org.grails","grails-bootstrap", grailsVersion),
- ModuleRevisionId.newInstance("org.grails","grails-scripts",grailsVersion),
- ModuleRevisionId.newInstance("org.grails","grails-core",grailsVersion),
- ModuleRevisionId.newInstance("org.grails","grails-resources",grailsVersion),
- ModuleRevisionId.newInstance("org.grails","grails-web",grailsVersion),
- ModuleRevisionId.newInstance("org.slf4j","slf4j-api","1.6.1"),
- ModuleRevisionId.newInstance("org.slf4j","slf4j-log4j12","1.6.1"),
- ModuleRevisionId.newInstance("org.springframework","spring-test","3.0.3.RELEASE"),
- ModuleRevisionId.newInstance("com.googlecode.concurrentlinkedhashmap","concurrentlinkedhashmap-lru","1.1_jdk5")] ) {
- def dependencyDescriptor = new EnhancedDefaultDependencyDescriptor(mrid, false, false ,"build")
- addDependency mrid
- configureDependencyDescriptor(dependencyDescriptor, "build", null, false)
- }
-
-
- for(mrid in [ModuleRevisionId.newInstance("org.xhtmlrenderer","core-renderer","R8"),
- ModuleRevisionId.newInstance("com.lowagie","itext","2.0.8"),
- ModuleRevisionId.newInstance("radeox","radeox","1.0-b2")]) {
- def dependencyDescriptor = new EnhancedDefaultDependencyDescriptor(mrid, false, false ,"docs")
- addDependency mrid
- configureDependencyDescriptor(dependencyDescriptor, "docs", null, false)
- }
-
- // dependencies needed during development, but not for deployment
- for(mrid in [ModuleRevisionId.newInstance("javax.servlet","servlet-api","2.5"),
- ModuleRevisionId.newInstance( "javax.servlet.jsp","jsp-api","2.1")]) {
- def dependencyDescriptor = new EnhancedDefaultDependencyDescriptor(mrid, false, false ,"provided")
- addDependency mrid
- configureDependencyDescriptor(dependencyDescriptor, "provided", null, false)
- }
-
- // dependencies needed for compilation
- "${compileTimeDependenciesMethod}"("org.codehaus.groovy:groovy-all:1.8.0-beta-4") {
- excludes 'jline'
- }
-
- "${compileTimeDependenciesMethod}"("commons-beanutils:commons-beanutils:1.8.0", "commons-el:commons-el:1.0", "commons-validator:commons-validator:1.3.1") {
- excludes "commons-logging", "xml-apis"
- }
-
- for(mrid in [ ModuleRevisionId.newInstance("org.coconut.forkjoin","jsr166y","070108"),
- ModuleRevisionId.newInstance("org.codehaus.gpars","gpars","0.9"),
- ModuleRevisionId.newInstance("aopalliance","aopalliance","1.0"),
- ModuleRevisionId.newInstance("com.googlecode.concurrentlinkedhashmap","concurrentlinkedhashmap-lru","1.1_jdk5"),
- ModuleRevisionId.newInstance("commons-codec","commons-codec","1.4"),
- ModuleRevisionId.newInstance("commons-collections","commons-collections","3.2.1"),
- ModuleRevisionId.newInstance("commons-io","commons-io","1.4"),
- ModuleRevisionId.newInstance("commons-lang","commons-lang","2.4"),
- ModuleRevisionId.newInstance("javax.transaction","jta","1.1"),
- ModuleRevisionId.newInstance("javax.persistence","persistence-api","1.0"),
- ModuleRevisionId.newInstance("opensymphony","sitemesh","2.4"),
- ModuleRevisionId.newInstance("org.grails","grails-bootstrap","$grailsVersion"),
- ModuleRevisionId.newInstance("org.grails","grails-core","$grailsVersion"),
- ModuleRevisionId.newInstance("org.grails","grails-crud","$grailsVersion"),
- ModuleRevisionId.newInstance("org.grails","grails-hibernate","$grailsVersion"),
- ModuleRevisionId.newInstance("org.grails","grails-resources","$grailsVersion"),
- ModuleRevisionId.newInstance("org.grails","grails-spring","$grailsVersion"),
- ModuleRevisionId.newInstance("org.grails","grails-web","$grailsVersion"),
+ def compileTimeDependenciesMethod = defaultDependenciesProvided ? 'provided' : 'compile'
+ def runtimeDependenciesMethod = defaultDependenciesProvided ? 'provided' : 'runtime'
+
+ // dependencies needed by the Grails build system
+ for(mrid in [ ModuleRevisionId.newInstance("org.tmatesoft.svnkit", "svnkit", "1.3.4"),
+ ModuleRevisionId.newInstance("org.apache.ant","ant","1.7.1"),
+ ModuleRevisionId.newInstance("org.apache.ant","ant-launcher","1.7.1"),
+ ModuleRevisionId.newInstance("org.apache.ant","ant-junit","1.7.1"),
+ ModuleRevisionId.newInstance("org.apache.ant","ant-nodeps","1.7.1"),
+ ModuleRevisionId.newInstance("org.apache.ant","ant-trax","1.7.1"),
+ ModuleRevisionId.newInstance("jline","jline","0.9.94"),
+ ModuleRevisionId.newInstance("org.fusesource.jansi","jansi","1.2.1"),
+ ModuleRevisionId.newInstance("xalan","serializer","2.7.1"),
+ ModuleRevisionId.newInstance("org.grails","grails-docs",grailsVersion),
+ ModuleRevisionId.newInstance("org.grails","grails-bootstrap", grailsVersion),
+ ModuleRevisionId.newInstance("org.grails","grails-scripts",grailsVersion),
+ ModuleRevisionId.newInstance("org.grails","grails-core",grailsVersion),
+ ModuleRevisionId.newInstance("org.grails","grails-resources",grailsVersion),
+ ModuleRevisionId.newInstance("org.grails","grails-web",grailsVersion),
+ ModuleRevisionId.newInstance("org.slf4j","slf4j-api","1.6.1"),
+ ModuleRevisionId.newInstance("org.slf4j","slf4j-log4j12","1.6.1"),
+ ModuleRevisionId.newInstance("org.springframework","spring-test","3.0.3.RELEASE"),
+ ModuleRevisionId.newInstance("com.googlecode.concurrentlinkedhashmap","concurrentlinkedhashmap-lru","1.1_jdk5")] ) {
+ def dependencyDescriptor = new EnhancedDefaultDependencyDescriptor(mrid, false, false ,"build")
+ addDependency mrid
+ configureDependencyDescriptor(dependencyDescriptor, "build", null, false)
+ }
+
+
+ for(mrid in [ModuleRevisionId.newInstance("org.xhtmlrenderer","core-renderer","R8"),
+ ModuleRevisionId.newInstance("com.lowagie","itext","2.0.8"),
+ ModuleRevisionId.newInstance("radeox","radeox","1.0-b2")]) {
+ def dependencyDescriptor = new EnhancedDefaultDependencyDescriptor(mrid, false, false ,"docs")
+ addDependency mrid
+ configureDependencyDescriptor(dependencyDescriptor, "docs", null, false)
+ }
+
+ // dependencies needed during development, but not for deployment
+ for(mrid in [ModuleRevisionId.newInstance("javax.servlet","servlet-api","2.5"),
+ ModuleRevisionId.newInstance( "javax.servlet.jsp","jsp-api","2.1")]) {
+ def dependencyDescriptor = new EnhancedDefaultDependencyDescriptor(mrid, false, false ,"provided")
+ addDependency mrid
+ configureDependencyDescriptor(dependencyDescriptor, "provided", null, false)
+ }
+