Skip to content

Moving Grails’ Configuration Around On Windows

A common question on the Grails user list (and sites like StackOverflow for example) is “How can I move the ‘.grails’ folder around.”

it is possible to establish unique settings in the application’s BuildConfig.groovy to do this, but there IS a Windows-level ability.

Yes, Virginia: Windows/NTFS can do file and folder links. Hard and soft links, too.

Take a look:

Top left in the image shows you the command and usage, top right shows my profile directory after the move/linking. Bottom shows the destination folder containing the moved directories.

Moving things around with filesystem links seems much better to me: the logical project layout can stay the same and evolve, even if the various development environments aren’t identical. Also: the fewer configuration items that one has to tweak, the better, IMHO.

The other good thing about this is that it can apply to pretty much anything you need to do (note that I am moving my ‘.IntelliJidea12′ configuration directory as well, among others). It’s a standard Windows facility that Windows itself uses.

Want to know more?

Tags: , , , ,

C, Java Enterprise Edition, JEE, J2EE, JBoss, Application Server, Glassfish, JavaServer Pages, JSP, Tag Libraries, Servlets, Enterprise Java Beans, EJB, Java Messaging Service JMS, BEA Weblogic, JBoss, Application Servers, Spring Framework, Groovy, Grails, Griffon, GPars, GAnt, Spock, Gradle, Seam, Open Source, Service Oriented Architectures, SOA, Java 2 Standard Edition, J2SE, Eclipse, Intellij, Oracle Service Bus, OSB