How can I permanently get rid of the default Grails web application files?

When I create a Grails application, it comes with some default files in the directory web-app:

$ find web-app
web app
web-app / css
web-app / css / errors.css
web-app / css / main.css
web-app / css / mobile.css
web-app / images
web-app / images / apple-touch-icon-retina.png
web-app / images / apple-touch-icon.png
web-app / images / favicon.ico
web-app / images / grails_logo.jpg
web-app / images / grails_logo.png
web-app / images / leftnav_btm.png
web-app / images / leftnav_midstretch.png
web-app / images / leftnav_top.png
web-app / images / skin
web-app / images / skin / database_add.png
web-app / images / skin / database_delete.png
web-app / images / skin / database_edit.png
web-app / images / skin / database_save.png
web-app / images / skin / database_table.png
web-app / images / skin / exclamation.png
web-app / images / skin / house.png
web-app / images / skin / information.png
web-app / images / skin / shadow.jpg
web-app / images / skin / sorted_asc.gif
web-app / images / skin / sorted_desc.gif
web-app / images / spinner.gif
web-app / images / springsource.png
web-app / js
web-app / js / application.js

( META-INFand WEB-INFfolders cut from output)

These files create a mess in my application, and also use common directory names css, imagesand jswhich I probably want to use for my own resources.

In the past, I manually deleted them, but they come back after startup grails upgrade, overwriting my own files in the process.

. -, ? , , ?

+5
2

Burt Beckwith, grails upgrade. -, Grails, , , , , .

:

  • application.properties .
  • grails clean, .
  • grails compile, , Hibernate Tomcat ( BuildConfig.groovy).

$HOME/.grails.

, Burt, :

, grails.project.work.dir = 'target' BuildConfig.groovy. , , / , .

(, 1.x 2.x), :

  • Grails
  • Grails
  • - , , . , , , . Grails, , - , HSQLDB → H2 DataSource.groovy .. .

, , , , .


, , , . , , Grails ( , ).

- , Grails, - , (/ ) main , CSS , .

, main.gsp scaffolding.gsp , CSS JS . grails install-templates, . .

, , , . , , .


, , artifacts war, src/templates. , , .


, , , ​​ git mercurial. , , grails upgrade, , . IDE .

+9

grails _Events.groovy

script 2 , , script thoses .

-

eventStatusUpdate = { msg ->
    def listenMsg = "Please make sure you view the README for important information about changes to your source code."
    if(msg == listenMsg) {
        copy(todir: "<the dir you want to put your stuff>") {
            fileset(dir: "${basedir}/web-app") {
                include(name: "**/**")
                exclude(name: "WEB-INF/**")
                present(present: "srconly", targetdir: "${basedir}/web-app")
            }
        }
    }  
}

eventStatusFinal = { msg ->
    if(msg == "Project upgraded") {
        copy(todir: "${basedir}/web-app") {
            fileset(dir: "<the dir with your stuff...>") {
                include(name: "**/**")
                exclude(name: "WEB-INF/**")
                present(present: "srconly", targetdir: "${basedir}/web-app")
            }
        }
    }    
}
+1

All Articles