springspring-mvcwro4j

wro4j - build all groups using runtime solution


I'm using wro4j with a maven + spring-mvc based web application. I have two different wro.properties file to configure the web app differently when in development mode vs deployment mode. wro4j is configured to run using the runtime solution. The setup is working fine so far.

What I want to be able to do now is that in deployment mode, all the wro4j groups should be built immediately on server start up (as opposed to on-first-request per wro resource). I haven't found a configuration option for this - is there one? If not, how can I go about making this happen?

(I know I can probably get similar result using compile mode for deployment, but given that I already have runtime mode set up I am wondering if I can piggy back on that)


Solution

  • A possible solution is to create a custom requestHandler which would iterate through all the groups and would trigger processing. You would have to invoke that request handler during application startup.

    If you would like to have this feature out of the box, feel free to open an issue.