The Apache Sling JSPC Maven Plugin Compiles JSP scripts into class files.
See Goals for a list of supported goals.
The JSPC Maven Plugin provides a single goal jspc which is by default executed in the compile phase of the Maven build process. This goal takes all JSP source files from a configured location (src/main/scripts by default) and compiles them into classes in a configurable location (target/classes by default).
To use the JSPC Maven Plugin define the following elements in the <plugins> section of the POM:
<project>
....
<build>
....
<plugins>
....
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>jspc-maven-plugin</artifactId>
<version>2.2.2</version>
<executions>
<execution>
<id>compile-jsp</id>
<goals>
<goal>jspc</goal>
</goals>
</execution>
</executions>
</plugin>
....
<plugins>
....
<build>
....
<project>
The generated JSP classes are automatically copied to the generated bundle jar file if the Maven Bundle Plugin is used to build the project package.