I ran into this problem on an application, and was able to reproduce it with a brand new application. Here are the steps I went through.
- Create an application with
grails create-app new-application
. This is using Grails 3.0.3, Groovy 2.4.3 and Java 1.8.0_25. - Modify
build.gradle
and switch thespring-boot-tomcat-starter
from a scope ofcompile
toprovided
(so that it can run in an external Tomcat 7). - Create the war with
gradle clean build
. - Transfer the war file to Tomcat's
webapp
directory. - Start Tomcat
- Navigate to the default Grails landing page, and there is no CSS. Check the source, and the javascript and css are not included.
In main.gsp
these lines exist:
<asset:stylesheet src="application.css"/>
<asset:javascript src="application.js"/>
But in the source of the loaded page, there are simply blank lines where the CSS and JS should be included.
Any ideas how to get assets to load properly through the Asset Pipeline in Grails 3 using Tomcat 7?