I want to assemble a war file w/o any jar files (I copied them to my /opt/tomcat8/lib
dir already).
I read about -nojars
options, but it's not available for Grails 3.1.7.
Then I tried customizing my build.gradle
:
war{
rootSpec.exclude "**/*.jar"
}
and the resulting war indeed became very small ~1 MB. Although when I deploy it into a tomcat and call the http://host:8080/
, I'm getting
javax.servlet.ServletException: Could not resolve view with name '/error' in servlet with name 'grailsDispatcherServlet' org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1229) org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1029) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:973) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:895) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967)
What's the proper way to build the slim war's?
SIDE NOTE:
The application contains only of a couple of domain classes and scaffolded controllers. No views were modified after grails create-app