Thursday, August 7, 2014



Grails in Websphere - Not loading/working static resources in cluster env.

Problem:
It is observed that the Grails application was working fine in local (tomcat) developer box and not behaving the same when deployed into Websphere cluster.

Solution:
If you are using grails resources plugins then use the plugins in the following order.
        // Manually update the resoures plugin to resolove websphere look up errors
        runtime ":resources:1.2"
        runtime ":cached-resources:1.0"
        //runtime ":zipped-resources:1.0"
        compile ":cache-headers:1.1.5"


Friday, July 18, 2014

Proxy Settings for Grails application



If you happen to work on more than one Grails application then it makes more sense to configure the HTTP Proxy settings in one place than in BuildConfig.groovy of each Grails project.

The following steps are for Windows7 env.
1. Create 'ProxySettings.groovy' file in C:\Users\USERID\.grails directory.
2. Add the following entries to it.

client=['http.proxyHost':'PROXY URL', 'http.proxyPort':'8080', 
        'http.proxyUser':'DOMAIN\\USERID',         
        'http.proxyPassword':'PASSWORD',             
        'http.nonProxyHosts':'IF ANY' ] 

currentProxy='client'   

Reboot/Restarting of the machine is required to affect the changes.


Additional Settings to check-in/release Grails applications/plugins into your corporate/private SVN repository and Maven repositories.
1. Create 'ettings.groovy' file in C:\Users\USERID\.grails directory.
2. Add the following entries to it.

grails.project.repos."REPO_NAME_IN_NEXUS".url="FULL_URL_OF_REPO" 
grails.project.repos."REPO_NAME_IN_NEXUS".type = "maven" 
grails.project.repos.default="REPO_NAME_IN_NEXUS" 
grails.release.scm.enabled=false 

//Example:
//grails.project.repos."my-grails-plugins".url="http://nexus.mycomp.net:8081/nexus/content/repositories/my-grails-plugins"
//grails.project.repos."my-grails-plugins".type = "maven" 
//grails.project.repos.default="my-grails-plugins" 
//grails.release.scm.enabled=false