- Timestamp:
- Nov 9, 2010, 2:55:29 PM (12 years ago)
- Location:
- trunk/grails-app/conf
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/Config.groovy
r1072 r1106 2 2 * Application Configuration 3 3 * 4 * @author 5 * @since 4 * @author Jeroen Wesbeek 5 * @since 20100520 6 6 * 7 7 * Revision information: … … 24 24 grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format 25 25 grails.mime.use.accept.header = false 26 grails.mime.types = [ html: ['text/html','application/xhtml+xml'],27 28 29 30 31 32 33 34 35 json: ['application/json','text/json'],36 37 38 26 grails.mime.types = [html: ['text/html', 'application/xhtml+xml'], 27 xml: ['text/xml', 'application/xml'], 28 text: 'text/plain', 29 js: 'text/javascript', 30 rss: 'application/rss+xml', 31 atom: 'application/atom+xml', 32 css: 'text/css', 33 csv: 'text/csv', 34 all: '*/*', 35 json: ['application/json', 'text/json'], 36 form: 'application/x-www-form-urlencoded', 37 multipartForm: 'multipart/form-data' 38 ] 39 39 // The default codec used to encode data with ${} 40 grails.views.default.codec ="none" // none, html, base6441 grails.views.gsp.encoding ="UTF-8"42 grails.converters.encoding ="UTF-8"40 grails.views.default.codec = "none" // none, html, base64 41 grails.views.gsp.encoding = "UTF-8" 42 grails.converters.encoding = "UTF-8" 43 43 44 44 // enabled native2ascii conversion of i18n properties files … … 47 47 // set per-environment serverURL stem for creating absolute links 48 48 environments { 49 production { 50 grails.serverURL = "http://gscf.nmcdsp.org" 51 } 52 development { 53 grails.serverURL = "http://localhost:8080/${appName}" 54 } 55 test { 56 grails.serverURL = "http://localhost:8080/${appName}" 57 } 58 49 development { 50 grails.serverURL = "http://localhost:8080/${appName}" 51 } 52 ci { 53 // used by build script 54 grails.serverURL = "http://ci.gscf.nmcdsp.org" 55 } 56 test { 57 // used by build script 58 grails.serverURL = "http://test.gscf.nmcdsp.org" 59 } 60 production { 61 grails.serverURL = "http://www.nmcdsp.org" 62 } 63 www { 64 // used by build script 65 grails.serverURL = "http://www.nmcdsp.org" 66 } 59 67 } 60 68 61 69 // log4j configuration 62 70 log4j = { 63 64 65 66 67 68 69 70 error'org.codehaus.groovy.grails.web.servlet', // controllers71 72 73 74 75 76 77 78 79 80 81 warn'org.mortbay.log'82 83 71 // Example of changing the log pattern for the default console 72 // appender: 73 // 74 //appenders { 75 // console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n') 76 //} 77 78 error 'org.codehaus.groovy.grails.web.servlet', // controllers 79 'org.codehaus.groovy.grails.web.pages', // GSP 80 'org.codehaus.groovy.grails.web.sitemesh', // layouts 81 'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping 82 'org.codehaus.groovy.grails.web.mapping', // URL mapping 83 'org.codehaus.groovy.grails.commons', // core / classloading 84 'org.codehaus.groovy.grails.plugins', // plugins 85 'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration 86 'org.springframework', 87 'org.hibernate' 88 89 warn 'org.mortbay.log' 90 91 //debug 'org.codehaus.groovy.grails.plugins' 84 92 } 85 93 86 94 graphviz { 87 88 89 90 91 92 93 94 95 96 97 98 95 // graphviz installation path is dependent on OS 96 // (requirement for class diagram plugin) 97 switch (System.properties["os.name"]) { 98 case "Mac OS X": 99 // define mac path to Graphviz dot executable 100 // (install using macports: sudo port install graphviz) 101 dot.executable = "/opt/local/bin/dot" 102 break 103 default: 104 // assume the linux default path 105 dot.executable = "/usr/bin/dot" 106 } 99 107 } 100 108 … … 144 152 // use: grailsApplication.config.gscf.domain.importableEntities 145 153 // @see ImporterController 146 importableEntities: [ 147 event : [name: 'Event', entity:'dbnp.studycapturing.Event'],148 sample 149 study 150 subject 151 samplingevent 154 importableEntities: [ 155 event: [name: 'Event', entity: 'dbnp.studycapturing.Event'], 156 sample: [name: 'Sample', entity: 'dbnp.studycapturing.Sample'], 157 study: [name: 'Study', entity: 'dbnp.studycapturing.Study'], 158 subject: [name: 'Subject', entity: 'dbnp.studycapturing.Subject'], 159 samplingevent: [name: 'SamplingEvent', entity: 'dbnp.studycapturing.SamplingEvent'] 152 160 153 161 ] … … 156 164 157 165 // jquery plugin 158 grails.views.javascript.library ="jquery"166 grails.views.javascript.library = "jquery" 159 167 160 168 // Needed for the Spring Security Core plugin: … … 175 183 // NB: the RegisterController is used for forgotten passwords. It should be accessible by anyone 176 184 grails.plugins.springsecurity.controllerAnnotations.staticRules = [ 177 178 179 180 181 182 183 184 185 186 185 '/user/**': ['ROLE_ADMIN'], 186 '/role/**': ['ROLE_ADMIN'], 187 '/aclclass/**': ['ROLE_ADMIN'], 188 '/aclentry/**': ['ROLE_ADMIN'], 189 '/aclobjectidentity/**': ['ROLE_ADMIN'], 190 '/aclsid/**': ['ROLE_ADMIN'], 191 '/persistentlogin/**': ['ROLE_ADMIN'], 192 '/registrationcode/**': ['ROLE_ADMIN'], 193 '/requestmap/**': ['ROLE_ADMIN'], 194 '/securityinfo/**': ['ROLE_ADMIN'] 187 195 ] 188 189 196 190 197 // Needed for sending emails 191 198 grails { 192 mail { 193 host = "smtp.gmail.com" 194 port = 465 195 username = "gscfproject@gmail.com" 196 password = "gscf2010" 197 props = [ 198 "mail.smtp.auth":"true", 199 "mail.smtp.socketFactory.port": '465', 200 "mail.smtp.socketFactory.class": "javax.net.ssl.SSLSocketFactory", 201 "mail.smtp.socketFactory.fallback": "false" 202 ] 203 } 204 } 205 206 // The OAuth consumer key and secret variables are currently replaced by Jeroen's Continuous Integration script. 207 // These keys were requested by me (Tjeerd) from myExperiment. 208 oauth { 209 myExperiment { 210 requestTokenUrl = 'http://www.myexperiment.org/oauth/request_token' 211 accessTokenUrl = 'http://www.myexperiment.org/oauth/access_token' 212 authUrl = 'http://www.myexperiment.org/oauth/authorize' 213 scope = 'http://example.com/oauth/feed/api/' // Optional - currently required by the Google GData APIs 214 consumer.key = '$oauthkey$' 215 consumer.secret = '$oauthsecret$' 216 } 217 } 218 199 mail { 200 host = "smtp.gmail.com" 201 port = 465 202 username = "gscfproject@gmail.com" 203 password = "gscf2010" 204 props = [ 205 "mail.smtp.auth": "true", 206 "mail.smtp.socketFactory.port": '465', 207 "mail.smtp.socketFactory.class": "javax.net.ssl.SSLSocketFactory", 208 "mail.smtp.socketFactory.fallback": "false" 209 ] 210 } 211 } -
trunk/grails-app/conf/DataSource.groovy
r776 r1106 14 14 development { 15 15 dataSource { 16 //println "DATASOURCE DEBUG :: user.home = "+System.properties["user.home"] 17 switch (System.properties["user.home"]) { 18 case "/Users/adem/TURNEDOFFBYDEFAULT": 19 // Development Postgres Database is turned off by default 20 // if you do want to keep your data you can: 21 // - reformate 'case' to your user.home (/Users/adem ?) 22 // - define development data in the BootStrap.groovy instead 23 dbCreate = "update" 24 username = "gscf" 25 password = "dbnp" 26 27 // PostgreSQL 28 driverClassName = "org.postgresql.Driver" 29 url = "jdbc:postgresql://localhost:5432/gscf" 30 dialect = org.hibernate.dialect.PostgreSQLDialect 31 break; 32 default: 33 // by default we use an in memory development database 34 dbCreate = "create-drop" // one of 'create', 'create-drop','update' 35 url = "jdbc:hsqldb:mem:devDB" 36 //loggingSql = true 37 break; 38 } 16 // by default we use an in memory development database 17 dbCreate = "create-drop" // one of 'create', 'create-drop','update' 18 url = "jdbc:hsqldb:mem:devDB" 19 //loggingSql = true 39 20 } 40 21 } 41 test { 22 ci { 23 // used by build script 42 24 dataSource { 43 dbCreate = "update"44 url = "jdbc:hsqldb:mem:testDb"45 }46 }47 production {48 dataSource {49 /*50 * when releasing a new stable to the live environment51 * you would probably comment out the dbCreate option52 * so hibernate won't try to update (which is does not53 * do so well) and you update the live database yourself54 *55 * @see http://grails.org/plugin/autobase56 * @see http://wiki.github.com/RobertFischer/autobase/example-usage57 */58 25 dbCreate = "update" 59 26 username = "gscf" … … 62 29 // PostgreSQL 63 30 driverClassName = "org.postgresql.Driver" 64 url = "jdbc:postgresql://localhost:5432/gscf "31 url = "jdbc:postgresql://localhost:5432/gscf-ci" 65 32 dialect = org.hibernate.dialect.PostgreSQLDialect 66 33 //logSql = true // enable logging while not yet final 34 } 35 } 36 test { 37 dataSource { 38 dbCreate = "update" 39 username = "gscf" 40 password = "dbnp" 67 41 68 /* Apparently Hibernate performs two queries on inserting, one before 69 * to generate the unique id, and then the insert itself. In PostgreSQL 70 * > 8.2 this behaviour has changed, however hibernate has not implemented 71 * this change. In case we might optimize in the future, more info is here: 72 * http://blog.wolfman.com/articles/2009/11/11/using-postgresql-with-grails 73 * - Jeroen 74 */ 42 // PostgreSQL 43 driverClassName = "org.postgresql.Driver" 44 url = "jdbc:postgresql://localhost:5432/gscf-test" 45 dialect = org.hibernate.dialect.PostgreSQLDialect 46 //logSql = true // enable logging while not yet final 47 } 48 } 49 production { 50 dataSource { 51 dbCreate = "update" 52 username = "gscf" 53 password = "dbnp" 75 54 76 // MySQL 77 //driverClassName = "com.mysql.jdbc.Driver" 78 //url = "jdbc:mysql://localhost/gscf" 79 //dialect = "org.hibernate.dialect.MySQL5InnoDBDialect" 55 // PostgreSQL 56 driverClassName = "org.postgresql.Driver" 57 url = "jdbc:postgresql://localhost:5432/gscf-www" 58 dialect = org.hibernate.dialect.PostgreSQLDialect 59 //logSql = true // enable logging while not yet final 60 } 61 } 62 www { 63 // used by build script 64 dataSource { 65 dbCreate = "update" 66 username = "gscf" 67 password = "dbnp" 80 68 81 //In memory 82 //url = "jdbc:hsqldb:file:prodDb;shutdown=true" 69 // PostgreSQL 70 driverClassName = "org.postgresql.Driver" 71 url = "jdbc:postgresql://localhost:5432/gscf-www" 72 dialect = org.hibernate.dialect.PostgreSQLDialect 73 //logSql = true // enable logging while not yet final 83 74 } 84 75 } -
trunk/grails-app/conf/Searchable.groovy
r776 r1106 1 1 /** 2 * This {@link groovy.util.ConfigObject}script provides Grails Searchable Plugin configuration.2 * This {@link groovy.util.ConfigObject} script provides Grails Searchable Plugin configuration. 3 3 * 4 4 * You can use the "environments" section at the end of the file to define per-environment … … 25 25 searchable { 26 26 27 /** 28 * The location of the Compass index 29 * 30 * Examples: "/home/app/compassindex", "ram://app-index" or null to use the default 31 * 32 * The default is "${user.home}/.grails/projects/${app.name}/searchable-index/${grails.env}" 33 */ 34 compassConnection = new File( 35 ((new File("/home/tomcat").exists()) ? "/home/tomcat/searchable/gscf/compassindex" : "/tmp/searchable/gscf/compassindex") 36 ).absolutePath 27 /** 28 * The location of the Compass index 29 * 30 * Examples: "/home/app/compassindex", "ram://app-index" or null to use the default 31 * 32 * The default is "${user.home}/.grails/projects/${app.name}/searchable-index/${grails.env}" 33 */ 34 compassConnection = "${user.home}/.grails/projects/${app.name}/searchable-index/${grails.env}" 37 35 38 /** 39 * Any settings you wish to pass to Compass 40 * 41 * Use this to configure custom/override default analyzers, query parsers, eg 42 * 43 * Map compassSettings = [ 44 * 'compass.engine.analyzer.german.type': 'German' 45 * ] 46 * 47 * gives you an analyzer called "german" you can then use in mappings and queries, like 48 * 49 * class Book { 50 * static searchable = { content analyzer: 'german' } 51 * String content 52 * } 53 * 54 * Book.search("unter", analyzer: 'german') 55 * 56 * Documentation for Compass settings is here: http://www.compass-project.org/docs/2.1.0M2/reference/html/core-settings.html 57 */ 58 compassSettings = [:] 36 /** 37 * Any settings you wish to pass to Compass 38 * 39 * Use this to configure custom/override default analyzers, query parsers, eg 40 * 41 * Map compassSettings = [ 42 * 'compass.engine.analyzer.german.type': 'German' 43 * ] 44 * 45 * gives you an analyzer called "german" you can then use in mappings and queries, like 46 * 47 * class Book {* static searchable = { content analyzer: 'german' }* String content 48 *}* 49 * Book.search("unter", analyzer: 'german') 50 * 51 * Documentation for Compass settings is here: http://www.compass-project.org/docs/2.1.0M2/reference/html/core-settings.html 52 */ 53 compassSettings = [:] 59 54 60 61 62 63 64 65 66 67 68 69 55 /** 56 * Default mapping property exclusions 57 * 58 * No properties matching the given names will be mapped by default 59 * ie, when using "searchable = true" 60 * 61 * This does not apply for classes using "searchable = [only/except: [...]]" 62 * or mapping by closure 63 */ 64 defaultExcludedProperties = ["password"] 70 65 71 72 73 74 75 76 77 78 79 80 81 82 66 /** 67 * Default property formats 68 * 69 * Value is a Map between Class and format string, eg 70 * 71 * [(Date): "yyyy-MM-dd'T'HH:mm:ss"] 72 * 73 * Only applies to class properties mapped as "searchable properties", which are typically 74 * simple class types that can be represented as Strings (rather than references 75 * or components) AND only required if overriding the built-in format. 76 */ 77 defaultFormats = [:] 83 78 84 85 86 87 88 89 90 91 92 * @param reloadwhether to reload domain class instances from the DB: true|false93 94 95 * @param escapewhether to escape special characters in string queries: true|false96 * @param offsetthe 0-based hit offset of the first page of results.97 98 99 * @param maxthe page size, for paged search results100 101 102 103 104 * @param suggestQueryif true and search method is returning a search-result object105 106 107 108 109 110 111 112 113 114 115 116 79 /** 80 * Set default options for each SearchableService/Domain-class method, by method name. 81 * 82 * These can be overriden on a per-query basis by passing the method a Map of options 83 * containing those you want to override. 84 * 85 * You may want to customise the options used by the search method, which are: 86 * 87 * @param reload whether to reload domain class instances from the DB: true|false 88 * If true, the search will be slower but objects will be associated 89 * with the current Hibernate session 90 * @param escape whether to escape special characters in string queries: true|false 91 * @param offset the 0-based hit offset of the first page of results. 92 * Normally you wouldn't change it from 0, it's only here because paging 93 * works by using an offset + max combo for a specific page 94 * @param max the page size, for paged search results 95 * @param defaultOperator if the query does not otherwise indicate, then the default operator 96 * applied: "or" or "and". 97 * If "and" means all terms are required for a match, if "or" means 98 * any term is required for a match 99 * @param suggestQuery if true and search method is returning a search-result object 100 * (rather than a domain class instance, list or count) then a 101 * "suggestedQuery" property is also added to the search-result. 102 * This can also be a Map of options as supported by the suggestQuery 103 * method itself 104 * 105 * For the options supported by other methods, please see the documentation 106 * http://grails.org/Searchable+Plugin 107 */ 108 defaultMethodOptions = [ 109 search: [reload: false, escape: false, offset: 0, max: 10, defaultOperator: "and"], 110 suggestQuery: [userFriendly: true] 111 ] 117 112 118 119 120 121 122 123 124 113 /** 114 * Should changes made through GORM/Hibernate be mirrored to the index 115 * automatically (using Compass::GPS)? 116 * 117 * If false, you must manage the index manually using index/unindex/reindex 118 */ 119 mirrorChanges = true 125 120 126 127 128 129 130 131 132 133 134 135 136 137 121 /** 122 * Should the database be indexed at startup (using Compass:GPS)? 123 * 124 * Possible values: true|false|"fork" 125 * 126 * The value may be a boolean true|false or a string "fork", which means true, 127 * and fork a thread for it 128 * 129 * If you use BootStrap.groovy to insert your data then you should use "true", 130 * which means do a non-forking, otherwise "fork" is recommended 131 */ 132 bulkIndexOnStartup = true 138 133 139 140 141 142 134 /** 135 * Should index locks be removed (if present) at startup? 136 */ 137 releaseLocksOnStartup = true 143 138 } 144 139 145 140 // per-environment settings 146 141 environments { 147 development { 148 searchable { 149 // development is default; inherits from above 150 } 151 } 142 development { 143 searchable { 144 // development is default; inherits from above 145 compassConnection = new File( 146 ((new File("/home/tomcat").exists()) ? "/home/tomcat/searchable/gscf-dev/compassindex" : "/tmp/searchable/gscf-dev/compassindex") 147 ).absolutePath 148 } 149 } 150 ci { 151 // used by build script 152 searchable { 153 compassConnection = new File( 154 ((new File("/home/tomcat").exists()) ? "/home/tomcat/searchable/gscf-ci/compassindex" : "/tmp/searchable/gscf-ci/compassindex") 155 ).absolutePath 156 } 157 } 158 test { 159 // used by build script 160 searchable { 161 // disable bulk index on startup 162 //bulkIndexOnStartup = false 152 163 153 test { 154 searchable { 155 // disable bulk index on startup 156 bulkIndexOnStartup = false 164 // use faster in-memory index 165 //compassConnection = "ram://test-index" 157 166 158 // use faster in-memory index 159 compassConnection = "ram://test-index" 160 } 161 } 162 163 production { 164 searchable { 165 // add your production settings here 166 } 167 } 167 compassConnection = new File( 168 ((new File("/home/tomcat").exists()) ? "/home/tomcat/searchable/gscf-test/compassindex" : "/tmp/searchable/gscf-test/compassindex") 169 ).absolutePath 170 } 171 } 172 production { 173 searchable { 174 // add your production settings here 175 } 176 } 177 www { 178 // used by build script 179 searchable { 180 // add your production settings here 181 compassConnection = new File( 182 ((new File("/home/tomcat").exists()) ? "/home/tomcat/searchable/gscf-www/compassindex" : "/tmp/searchable/gscf-www/compassindex") 183 ).absolutePath 184 } 185 } 168 186 }
Note: See TracChangeset
for help on using the changeset viewer.