Grails allow the plugin to reference the JNDI connection details

I have just found this plugin when searching for a way to do the rails style migrations in grails. This plugin sounds very promising however, I am not able to connect to any of my jndi datasources because the code is looking for fully qualified db connections. I could add this info to the datasources but then i will be exposing password information to the app. I was hoping that someone has a method for referencing either a local source for the connection information outside of the app of using the jndi references? I also noticed when running the app for the first time it was failing to find the Init.groovy file because of the reference to env.GRAILS_HOME which just returned null. I updated this with grailsScript(“Init”) etc and that seemed to solve that problem but just stopped me on the jndi one :wink: .I suppose another thing i could ask is… can i run a more recent version ie “beta” that will solve a lot of these problems and where would i get/install that from? Atm i am running the version from grails plugins:

    liquibase          1.9.3.5          --  LiquiBase Database Refactoring for Grails

Any help would be appreciated because I am about to do some massive refactoring on my app and would like a way to manage the changes.

    grailsHome = Ant.antProject.properties."env.GRAILS_HOME"

    includeTargets << grailsScript(“Init”)
    includeTargets << grailsScript(“Package”)
    includeTargets << grailsScript(“Bootstrap”)

    /*includeTargets << new File ( “${grailsHome}/scripts/Init.groovy” )
    includeTargets << new File ( “${grailsHome}/scripts/Package.groovy” )
    includeTargets << new File ( “${grailsHome}/scripts/Bootstrap.groovy” )
    */

Check out this JIRA issue:
http://liquibase.jira.com/browse/CORE-760

Thanks for posting the issue to jira too.  I’m hoping to get to updating the grails plugin this week with the new liquibase 2.0 changes, and i’ll look at your jndi issue as well.

Nathan

Actually I have been thinking about it and it might be easier to have some sort of config file with the usernames/passes for of your apps custom datasources. That way you wont have to mess with the inbuilt grails tomcat engine and could just have it in your home. I have written a dodgy python script that sort of does this for me and allows me so it would be nice if you could do something similar with the grails plugin. With this script i can just say script --source=dev --dest=test and then pick what i want to do. I just have the connections details stored in the script. ??

Any thoughts .