Jetty Jspc Maven Plugin Usage Guide
To use the jetty jspc plugin, you need to put a <plugin> element in your pom.xml for it, and also to configure the
war plugin so that it uses the
web.xml file produced by the jspc plugin.
Your pom.xml will look like this:
Note: change the <version> tag value to match your prefered jetty jspc plugin release.
For a full listing of the <configuration> items supported by this plugin, see jspc parameter reference.
Invoking the plugin will now be done by simply building your webapp to at least the
However, as compiling jsps is usually done during preparation for a production release and not usually done during development, it is more convenient to put the plugin setup inside a <profile> which which can be deliberately invoked during prep for production .
For example, the following profile will only be invoked if the flag
-Dprod is present on the run line:
So, the following invocation would cause your code to be compiled, the jsps to be compiled, the <servlet> and <servlet-mapping>s inserted in the web.xml and your webapp assembled into a war: