While reading the Grails docs I came across a useful Grails command i.e. integrate-with. In this short blog I just want to present some of the uses of this command.
By using this command we can create Git’s .gitignore file:
grails integrate-with --git
The above command will create a .gitignore file in the root of our project with the following content:
*.iws *Db.properties *Db.script .settings stacktrace.log /*.zip /plugin.xml /*.log /*DB.* /cobertura.ser .DS_Store /target/ /out/ /web-app/plugins /web-app/WEB-INF/classes /.link_to_grails_plugins/ /target-eclipse/
Another use of ‘integrate-with’ command is to create an Eclipse specific file structure (to be opened in Eclipse IDE) of our Grails project:
grails integrate-with --eclipse
‘eclipse‘ option in the above command will produce .project and .classpath files for use with Eclipse.
Similarly, you can create IntelliJ Idea specific project file structure from a Grails project
grails integrate-with --intellij
‘intellij’ option in the above command will produce .iml, .ipr and .iws files for use with IntelliJ Idea IDE.
Hope this cool ‘integrate-with’ command gives you a head-start in starting your next Grails project.