Lets see ...
Results in ...
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- jetty-jspc-maven-plugin:9.4.7.v20170914:help (default-cli) @ standalone-pom ---
[INFO] Jetty :: Jetty JSPC Maven Plugin 9.4.7.v20170914
The Eclipse Jetty Project
This plugin has 2 goals:
jetty-jspc:help
Display help information on jetty-jspc-maven-plugin.
Call mvn jetty-jspc:help -Ddetail=true -Dgoal=<goal-name> to display parameter
details.
jetty-jspc:jspc
This goal will compile jsps for a webapp so that they can be included in a
war.
At runtime, the plugin will use the jspc compiler to precompile jsps and tags.
Note that the same java compiler will be used as for on-the-fly compiled jsps,
which will be the Eclipse java compiler.
See Usage Guide for instructions on using this plugin.
Cool, lets see what the parameters are for the jspc goal ...
$ mvn org.eclipse.jetty:jetty-jspc-maven-plugin:9.4.7.v20170914:help -Ddetail=true -Dgoal=jspc
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- jetty-jspc-maven-plugin:9.4.7.v20170914:help (default-cli) @ standalone-pom ---
[INFO] Jetty :: Jetty JSPC Maven Plugin 9.4.7.v20170914
The Eclipse Jetty Project
jetty-jspc:jspc
This goal will compile jsps for a webapp so that they can be included in a
war.
At runtime, the plugin will use the jspc compiler to precompile jsps and tags.
Note that the same java compiler will be used as for on-the-fly compiled jsps,
which will be the Eclipse java compiler.
See Usage Guide for instructions on using this plugin.
Available parameters:
classesDirectory (Default: ${project.build.outputDirectory})
The location of the compiled classes for the webapp
excludes
The comma separated list of file name patters to exclude from compilation.
generatedClasses (Default: ${project.build.outputDirectory})
The destination directory into which to put the compiled jsps.
includes (Default: **/*.jsp, **/*.jspx)
The comma separated list of patterns for file extensions to be processed.
By default will include all .jsp and .jspx files.
insertionMarker
Optional. A marker string in the src web.xml file which indicates where to
merge in the generated web.xml fragment. Note that the marker string will
NOT be preserved during the insertion. Can be left blank, in which case
the generated fragment is inserted just before the </web-app> line
jspc
The JspC instance being used to compile the jsps.
keepSources (Default: false)
Controls whether or not .java files generated during compilation will be
preserved.
mergeFragment (Default: true)
Merge the generated fragment file with the web.xml from
webAppSourceDirectory. The merged file will go into the same directory as
the webXmlFragment.
scanAllDirectories (Default: true)
Whether dirs on the classpath should be scanned as well as jars. True by
default. This allows for scanning for tlds of dependent projects that are
in the reactor as unassembled jars.
sourceVersion
Source version - if not set defaults to jsp default (currently 1.7)
targetVersion
Target version - if not set defaults to jsp default (currently 1.7)
tldJarNamePatterns (Default: .*taglibs[^/]*.jar|.*jstl[^/]*.jar$)
Patterns of jars on the system path that contain tlds. Use | to separate
each pattern.
useProvidedScope (Default: false)
Whether or not to include dependencies on the plugin's classpath with
<scope>provided</scope> Use WITH CAUTION as you may wind up with duplicate
jars/classes.
webAppSourceDirectory (Default: ${basedir}/src/main/webapp)
Root directory for all html/jsp etc files
webXml (Default: ${basedir}/src/main/webapp/WEB-INF/web.xml)
Location of web.xml. Defaults to src/main/webapp/web.xml.
webXmlFragment (Default: ${basedir}/target/webfrag.xml)
File into which to generate the <servlet> and <servlet-mapping> tags for
the compiled jsps
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.998 s
[INFO] Finished at: 2017-10-20T19:38:57Z
[INFO] Final Memory: 7M/26M
[INFO] ------------------------------------------------------------------------
That "jspc" parameter looks interesting.
Says it's the JspC object instance too.
The JspC object has a .setFailOnError(boolean) method that sounds about what you are looking for.
So that means the maven plugin style configuration should be ...