unable to get maven to compile JSPs
Hi,
I'm using AEM 5.6.1 and I've followed the instructions on http://dev.day.com/docs/en/cq/aem-how-tos/development/how-to-build-aem-projects-using-apache-maven.html.
I'm trying to get my JSPs to compile as the "content" project of my multi-module project. Because some of my JSPs reference /libs/foundation/global.jsp, I had to include that file in the compilation. And because one of my JSPs overrides one of the /libs/foundations/components JSPs, I had to include that, too, which of course introduced a bunch of additional dependencies that I needed to resolve.
I painstakingly added the necessary dependencies to the pom.xml file, attempting to build each time and using the "depfind" feature to figure out which one to add every time I got a compilation error that a particular class could not be resolved. I finally got all of the class resolution errors sorted out.
Now I'm faced with new errors where the compiler can't resolve, among other things, "xssAPI," which seems to be referenced from many JSPs but never actually defined anywhere. The errors are shown below. Any ideas? I'd really like to get this to work, as my next step is to get JSP auto-complete to work in Eclipse. But even just having it work in the maven build would be a good start. This is Adobe's out-of-the-box stuff for the most part!
[ERROR] Compilation Failure org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 3 in the jsp file: /libs/foundation/components/profile/form/formrowtext.jsp xssAPI cannot be resolved 1: <%@page session="false"%><div class="form_row"> 2: <div class="form_leftcol"> 3: <div class="form_leftcollabel"><label for="<%= xssAPI.encodeForHTMLAttr(path) %>"><%= xssAPI.encodeForHTML(title) %></label></div> 4: <div class="form_leftcolmark <%= required ? "form_required" : ""%>"><%= required ? "*" : " " %></div> 5: </div> 6: <div class="form_rightcol"><% An error occurred at line: 3 in the jsp file: /libs/foundation/components/profile/form/formrowtext.jsp path cannot be resolved 1: <%@page session="false"%><div class="form_row"> 2: <div class="form_leftcol"> 3: <div class="form_leftcollabel"><label for="<%= xssAPI.encodeForHTMLAttr(path) %>"><%= xssAPI.encodeForHTML(title) %></label></div> 4: <div class="form_leftcolmark <%= required ? "form_required" : ""%>"><%= required ? "*" : " " %></div> 5: </div> 6: <div class="form_rightcol"><% An error occurred at line: 3 in the jsp file: /libs/foundation/components/profile/form/formrowtext.jsp title cannot be resolved 1: <%@page session="false"%><div class="form_row"> 2: <div class="form_leftcol"> 3: <div class="form_leftcollabel"><label for="<%= xssAPI.encodeForHTMLAttr(path) %>"><%= xssAPI.encodeForHTML(title) %></label></div> 4: <div class="form_leftcolmark <%= required ? "form_required" : ""%>"><%= required ? "*" : " " %></div> 5: </div> 6: <div class="form_rightcol"><% An error occurred at line: 4 in the jsp file: /libs/foundation/components/profile/form/formrowtext.jsp required cannot be resolved 1: <%@page session="false"%><div class="form_row"> 2: <div class="form_leftcol"> 3: <div class="form_leftcollabel"><label for="<%= xssAPI.encodeForHTMLAttr(path) %>"><%= xssAPI.encodeForHTML(title) %></label></div> 4: <div class="form_leftcolmark <%= required ? "form_required" : ""%>"><%= required ? "*" : " " %></div> 5: </div> 6: <div class="form_rightcol"><% 7: final String rows = properties.get("rows", ""); An error occurred at line: 7 in the jsp file: /libs/foundation/components/profile/form/formrowtext.jsp properties cannot be resolved 4: <div class="form_leftcolmark <%= required ? "form_required" : ""%>"><%= required ? "*" : " " %></div> 5: </div> 6: <div class="form_rightcol"><% 7: final String rows = properties.get("rows", ""); 8: if ( rows.length() == 0 || rows.equals("1") ) { 9: %><input class="geo textinput" <% 10: %>name="<%= xssAPI.encodeForHTMLAttr(nodeName) %>" <% An error occurred at line: 10 in the jsp file: /libs/foundation/components/profile/form/formrowtext.jsp nodeName cannot be resolved 7: final String rows = properties.get("rows", ""); 8: if ( rows.length() == 0 || rows.equals("1") ) { 9: %><input class="geo textinput" <% 10: %>name="<%= xssAPI.encodeForHTMLAttr(nodeName) %>" <% 11: %>value="<%= xssAPI.encodeForHTMLAttr(value)%>" <% 12: %>size="<%= xssAPI.getValidInteger(cols, 35) %>" <% 13: if (width.length() > 0) { An error occurred at line: 12 in the jsp file: /libs/foundation/components/profile/form/formrowtext.jsp cols cannot be resolved 9: %><input class="geo textinput" <% 10: %>name="<%= xssAPI.encodeForHTMLAttr(nodeName) %>" <% 11: %>value="<%= xssAPI.encodeForHTMLAttr(value)%>" <% 12: %>size="<%= xssAPI.getValidInteger(cols, 35) %>" <% 13: if (width.length() > 0) { 14: %>style="width:<%= xssAPI.getValidInteger(width, 100) %>px;" <% 15: }