AO Web Resources Optimizer

project: alphamanagement: previewpackaging: developmental
java: >= 11java ee: >= 7semantic versioning: 2.0.0license: LGPL v3

BuildMaven CentralQuality Gate StatusLines of Code
Reliability RatingSecurity RatingMaintainability RatingCoverage

Automatic and dynamic web resource optimization via WRO4J.


  • Support combining automatically (but not inlined).
    Rewriting all URL() to be relative to the web root /contextPath/…
  • Also support minification
    Independent of inline / combined / single
      This also has an ebook for building REST AIP in Spring - neat!
      Lots of minifier options listed here
        Looks like a one-release dead project. (this looks very promising!)
          This has an example of dynamically adding
          Also has the scripts added dynamically at the end by
        LastModifiedServlet-style URL ?lastModfied=... could be our own filter/processor inlined
          CONTEXT-ONLY to not get the *.css resources from LastModifiedServlet?
          How to get the effective lastModified of the wro4j-generated *.css and *.js?
        Would we create own own WroModel, and add to it from @WebListener on each project?
        Would this be in a "ao-wro4j" project, that also automatically configures all the wro4j stuff.
        The goal is an application can just include "ao-styles", "semanticcms-*-style" and it's all automatic.
        Should we have a group "static" for things combined during maven plugin?
        Should we have a group "dynamic" for things added on-the-fly?
        Dynamic wro.xml with all registered projects?

          Each project gets its own group?
          group-ref for dependencies?
        Add our own annotated subclass of WroServletContextListener?
          Or have ao-wro4j declare it in a web-fragment.xml

        Do we somehow create groups dynamically based on what applies to the current request?
          Views, for example, can affect what is applied to the page.
        We'd need a "-print" group, to be used after the non-print
        So the grouping would have to consider ordering and -print/conditional comments.
          Could find optimal grouping while still maintaining ordering
            Starting by assuming:
              1) non-print, no conditional comments, in path order
              2) non-print, conditional comments, in path order
              3) print, no conditional comments, in path order
              4) print, conditional comments, in path order
            This definition will give a good starting point, so it won't be necessary to specify ordering for every print/conditional comment override?
            Then perform topological sort based on ordering dependencies
              This topological sort should be stable and maintain the original ordering as much as possible
          Deterministic ordering, combined with some sort of hash to generate group name dynamically