1 Reply Latest reply: Mar 14, 2012 3:31 PM by david.karr RSS

    [CQ newbie] Possible to load and compile all CQ pages in continuous integration?

    david.karr Community Member

      I know very little about CQ.

       

      I'm trying to figure out how we can implement a continuous integration process which would deploy our build to a test server and automatically compile all of the generated pages, and send reports to "last change" authors if there are failures.

       

      If this was a plain JSP-based application, I know how to do this, because WebLogic gives me the ability to compile all JSPs at deployment time.

       

      With CQ, I've been told that JSP pages are assembled with the Vault plugin and stored in the repository.  I've seen sample code that can load pages from the repository, but can I use that mechanism to iterate through all the pages in the repository and force them to be loaded, and also get detailed errors if they fail to compile or load?

        • 1. Re: [CQ newbie] Possible to load and compile all CQ pages in continuous integration?
          david.karr Community Member

          I discovered that someone here wrote a "UrlTreeHelper" class that starts from a root node and uses the ResourceResolver and sees if the primary node is "cq:Page", or if it has child nodes.  If the former, it gets the URL path from the node and adds that to a list to return.  If the latter, it recurses through that list. That results in a final list of urls that we can at least do a GET on and verify we get a 200.  If we don't, we at least know something's wrong with that page, even if we don't know what failed.

           

          They call this from a JSP page, so they can get the ResourceResolver. Is it possible to get the ResourceResolver in plain Java code, so we could call this from something besides a JSP?