private void processFile()

in src/main/java/org/apache/sling/maven/jspc/JspcMojo.java [474:515]


    private void processFile(final String file) throws JasperException {
        try {
            final String jspUri = file.replace('\\', '/');
            final JspCompilationContext clctxt = new JspCompilationContext(jspUri, false, this, context, rctxt, false);

            JasperException error = clctxt.compile(true);
            PageInfo pageInfo = clctxt.getCompiler().getPageInfo();
            if (pageInfo != null && dependencyTracker != null) {
                dependencyTracker.collectJSPInfo(file, pageInfo);
            }
            if (error != null) {
                throw error;
            }
            if (showSuccess) {
                getLog().info("Built File: " + file);
            }

        } catch (final JasperException je) {
            Throwable rootCause = je;
            while (rootCause instanceof JasperException
                && ((JasperException) rootCause).getRootCause() != null) {
                rootCause = ((JasperException) rootCause).getRootCause();
            }
            if (rootCause != je) {
                getLog().error("General problem compiling " + file, rootCause);
            }

            // Bugzilla 35114.
            if (failOnError) {
                throw je;
            }

            // just log otherwise
            getLog().error(je.getMessage());

        } catch (Throwable e) {
            if (failOnError) {
                throw new JasperException(e);
            }
            getLog().error(e.getMessage(), e);
        }
    }