https://github.com/leonardehrenfried/jspc-maven-plugin
Maven JSP precompilation plugin
https://github.com/leonardehrenfried/jspc-maven-plugin
jasper java precompiler-plugins
Last synced: 15 days ago
JSON representation
Maven JSP precompilation plugin
- Host: GitHub
- URL: https://github.com/leonardehrenfried/jspc-maven-plugin
- Owner: leonardehrenfried
- License: apache-2.0
- Created: 2011-05-19T16:08:59.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2025-09-06T23:48:25.000Z (29 days ago)
- Last Synced: 2025-09-18T09:12:59.847Z (18 days ago)
- Topics: jasper, java, precompiler-plugins
- Language: Java
- Homepage: https://leonardehrenfried.github.io/jspc-maven-plugin/compile-mojo.html
- Size: 1.35 MB
- Stars: 31
- Watchers: 8
- Forks: 22
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## JSPC Maven Plugin
[](https://travis-ci.org/leonardehrenfried/jspc-maven-plugin)
[](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22io.leonard.maven.plugins%22%20AND%20a%3A%22jspc-maven-plugin%22)This plugin precompiles JSPs. It is a fork of jetty-jspc-maven-plugin and configured as follows:
```xml
....
io.leonard.maven.plugins
jspc-maven-plugin
${ENTER_VERSION_HERE}
jspc
compile
...
```
It has the following improvements compared to jetty-jspc-maven-plugin:
* Faster: can be configured to run multi-threaded. For a speed comparison read the blog post below.
* More descriptive error messages: Under Maven 3 this plugin shows a clear indication of what caused the error and which file it is in
* Not stop at the first error (depends plugin configuration)The compiler used by default in this plugin is Apache Jasper 10.
If the Jasper compiler version needs to be overloaded, the plugin must be configured as follows:
```xml
....
io.leonard.maven.plugins
jspc-maven-plugin
${ENTER_VERSION_HERE}
jspc
compile
org.apache.tomcat
tomcat-jasper
${ENTER_JASPER_VERSION_HERE}
org.eclipse.jdt
ecj
org.eclipse.jdt
ecj
3.36.0
...```
Full documentation of the goal is available at https://leonardehrenfried.github.io/jspc-maven-plugin/compile-mojo.html
## Compatibility Matrix
* 5.X version of jspc-maven-plugin : needs Java >= 17, Jasper only 11.X
* 4.X version of jspc-maven-plugin : needs Java >= 11, Jasper only 10.X
* 3.X version of jspc-maven-plugin : needs Java >= 1.8, Jasper only 9.X
* 2.X version of jspc-maven-plugin : needs Java >= 1.7, Jasper only 8.X
* 1.X version of jspc-maven-plugin : needs Java >= 1.5, Jasper only 6.X, 7.X## Comparison of precompiler plugins
[https://tcollignon.github.io/2016/12/04/How-to-compile-JSP-with-Tomcat-and-Maven-faster.html](https://tcollignon.github.io/2016/12/04/How-to-compile-JSP-with-Tomcat-and-Maven-faster.html)
## Use another JSP compiler
By default this plugin use org.apache.jasper.compiler.JDTCompiler (see compilerClass goal option). But if the number of threads is over 2,
this compiler has too much synchronization overheas and hence is no very not very performant.To improve this is possible to user another compilerClass `org.apache.jasper.compiler.ParallelJDTCompiler`, which reduces synchronization.
Note : With Tomcat 9 the compiler `org.apache.jasper.compiler.ParallelJDTCompiler` will not work very well. It needs some fix.
We advice to use the standard `org.apache.jasper.compiler.JDTCompiler` instead.## Release process
1. `make release`
1. `make commit-site`