Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of git@github.com:grails/grails

  • Loading branch information...
commit 807c40299d017f79b75bb759e7cffffe85d4c1d4 2 parents 8bcc618 + b71fc40
@graemerocher graemerocher authored
View
19 grails-doc/src/guide/12.1 Creating and Installing Plug-ins.gdoc
@@ -92,5 +92,24 @@ Although the [create-plugin|commandLine] command creates certain files for you s
If you need artefacts within @WEB-INF@ it is recommended you use the @_Install.groovy@ script (covered later), which is executed when a plug-in is installed, to provide such artefacts. In addition, although @UrlMappings.groovy@ is excluded you are allowed to include a @UrlMappings@ definition with a different name, such as @FooUrlMappings.groovy@.
+h4. Modular Application Development With Plugins
+
+An application can load plugins from anywhere on the file system, even if they have not been installed. Simply add the location of the (unpacked) plugin to the application's @grails-app/conf/BuildConfig.groovy@ file:
+
+{code:java}
+// Useful to test plugins you are developing.
+grails.plugin.location.jsecurity = "/home/dilbert/dev/plugins/grails-jsecurity"
+
+// Useful for modular applications where all plugins and
+// applications are in the same directory.
+grails.plugin.location.'grails-ui' = "../grails-grails-ui"
+{code}
+
+This is particularly useful in two cases:
+
+* You are developing a plugin and want to test it in a real application without packaging and installing it first.
+* You have split an application into a set of plugins and an application, all in the same "super-project" directory.
+
+
View
16 grails/build.gradle
@@ -11,8 +11,8 @@ apply id: 'groovy'
version = '1.3.0.BUILD-SNAPSHOT'
-sourceCompatibilty = "1.5"
-targetCompatibilty = "1.5"
+sourceCompatibility = "1.5"
+targetCompatibility = "1.5"
configurations {
compile.transitive = true
@@ -49,7 +49,7 @@ sourceSets {
java {
srcDirs = []
}
- groovy { Rel
+ groovy {
srcDirs = ['src/test']
}
resources {
@@ -79,11 +79,11 @@ configure([compileJava, compileTestJava]) {
}
apply {
- apply url: 'gradle/docs.gradle'
- apply url: 'gradle/unit-test.gradle'
- apply url: 'gradle/assemble.gradle'
- apply url: 'gradle/maven.gradle'
- apply url: 'gradle/findbugs.gradle'
+ url 'gradle/docs.gradle'
+ url 'gradle/unit-test.gradle'
+ url 'gradle/assemble.gradle'
+ url 'gradle/maven.gradle'
+ url 'gradle/findbugs.gradle'
}
clean {
View
4 grails/src/java/org/codehaus/groovy/grails/web/servlet/mvc/GrailsParameterMap.groovy
@@ -241,6 +241,10 @@ class GrailsParameterMap extends TypeConvertingMap {
return parameterMap.entrySet()
}
+ protected Object clone() {
+ return new GrailsParameterMap(this.@wrappedMap?.clone())
+ }
+
/**
* Converts this parameter map into a query String. Note that this will flatten nested keys separating them with the
* . character and URL encode the result
View
12 grails/src/test/org/codehaus/groovy/grails/web/servlet/mvc/GrailsParameterMapTests.groovy
@@ -11,6 +11,18 @@ class GrailsParameterMapTests extends GroovyTestCase {
mockRequest = new MockHttpServletRequest();
}
+ void testPlusOperator() {
+ mockRequest.addParameter("album", "Foxtrot")
+
+ def originalMap = new GrailsParameterMap(mockRequest)
+
+ def newMap = originalMap + [vocalist: 'Peter']
+ assertTrue originalMap.containsKey('album')
+ assertFalse originalMap.containsKey('vocalist')
+ assertTrue newMap.containsKey('album')
+ assertTrue newMap.containsKey('vocalist')
+ }
+
void testConversionHelperMethods() {
def map = new GrailsParameterMap(mockRequest)
Please sign in to comment.
Something went wrong with that request. Please try again.