Fork me on GitHub

jspc:jspc

Full name:

org.apache.sling:jspc-maven-plugin:2.3.4:jspc

Description:

The JspcMojo is implements the Sling Maven JspC goal jspc compiling JSP into the target and creating a component descriptor for Declarative Services to use the JSP with the help of the appropriate adapter as component.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: compile.
  • Binds by default to the lifecycle phase: compile.

Optional Parameters

Name Type Since Description
<compilerSourceVM> String - The Compiler Source Version of the Java source generated from the JSP files before compiling into classes.
Default value is: 1.8.
User property is: jspc.compilerSourceVM.
<compilerTargetVM> String - The Target Virtual Machine Version to generate class files for.
Default value is: 1.8.
User property is: jspc.compilerTargetVM.
<excludes> String[] - Excluded JSPs, empty by default
<failOnError> boolean - (no description)
Default value is: true.
User property is: jspc.failOnError.
<feature> JspcMojo$FeatureDependency - (no description)
<generateCompilationReport> boolean 2.3.0 Generates a compilation report text file (compilation_report.json) in the ${project.build.outputDirectory}.

The compilation report has the following format:

    {
        "packageProviders": [
            {
                "package": "<a Java package name>",
                "providers": [
                    "<Maven Artifact ID>"
                ]
            }
        ],
        "jspDependencies": [
            {
                "jsp": "src/main/scripts/<a script>.jsp",
                "dependencies": [
                    "<jar file name>:<path to JSP>",
                    "src/main/scripts/<path to file in local project>.jsp"
                ]
            }
        ],
        "unusedDependencies": [
            "<Maven Artifact ID>"
        ]
     }
   



Default value is: false.
User property is: jspc.generateCompilationReport.
<includes> String[] - Included JSPs, defaults to "**/*.jsp"
<jasperClassDebugInfo> boolean - (no description)
Default value is: true.
User property is: jspc.jasper.classdebuginfo.
<jasperEnablePooling> boolean - (no description)
Default value is: true.
User property is: jspc.jasper.enablePooling.
<jasperGenStringAsCharArray> boolean - (no description)
Default value is: false.
User property is: jspc.jasper.genStringAsCharArray.
<jasperIeClassId> String - (no description)
Default value is: clsid:8AD9C840-044E-11D1-B3E9-00805F499D93.
User property is: jspc.jasper.ieClassId.
<jasperKeepGenerated> boolean - (no description)
Default value is: true.
User property is: jspc.jasper.keepgenerated.
<jasperMappedFile> boolean - (no description)
Default value is: true.
User property is: jspc.jasper.mappedfile.
<jasperSuppressSmap> boolean - (no description)
Default value is: false.
User property is: jspc.jasper.suppressSmap.
<jasperTrimSpaces> boolean - (no description)
Default value is: false.
User property is: jspc.jasper.trimSpaces.
<jspFileExtensions> String - Deprecated. Use the includes filter instead.
Default value is: jsp,jspx.
User property is: jspc.jspFileExtensions.
<outputDirectory> String - Target directory for the compiled JSP classes.
Default value is: ${project.build.outputDirectory}.
User property is: jspc.outputDirectory.
<printCompilationReport> boolean - Prints a compilation report by listing all the packages and dependencies that were used during processing the JSPs.
Default value is: false.
User property is: jspc.printCompilationReport.
<resourceDirectories> File[] - List of alternative resource directories used during compiling.
<servletPackage> String - When defined, this will set the value for the Constants.JSP_PACKAGE_NAME_PROPERTY_NAME system property of the Jasper compiler, which defines the prefix package under which compiled JSPs will be generated.
User property is: jspc.servletPackage.
<showSuccess> boolean - (no description)
Default value is: false.
User property is: jspc.showSuccess.
<sourceDirectory> File - Location of the JSP source file.
Default value is: ${project.build.scriptSourceDirectory}.
User property is: jspc.sourceDirectory.

Parameter Details

<compilerSourceVM>

The Compiler Source Version of the Java source generated from the JSP files before compiling into classes.
  • Type: java.lang.String
  • Required: No
  • User Property: jspc.compilerSourceVM
  • Default: 1.8

<compilerTargetVM>

The Target Virtual Machine Version to generate class files for.
  • Type: java.lang.String
  • Required: No
  • User Property: jspc.compilerTargetVM
  • Default: 1.8

<excludes>

Excluded JSPs, empty by default
  • Type: java.lang.String[]
  • Required: No

<failOnError>

(no description)
  • Type: boolean
  • Required: No
  • User Property: jspc.failOnError
  • Default: true

<feature>

(no description)
  • Type: org.apache.sling.maven.jspc.JspcMojo$FeatureDependency
  • Required: No

<generateCompilationReport>

Generates a compilation report text file (compilation_report.json) in the ${project.build.outputDirectory}.

The compilation report has the following format:

    {
        "packageProviders": [
            {
                "package": "<a Java package name>",
                "providers": [
                    "<Maven Artifact ID>"
                ]
            }
        ],
        "jspDependencies": [
            {
                "jsp": "src/main/scripts/<a script>.jsp",
                "dependencies": [
                    "<jar file name>:<path to JSP>",
                    "src/main/scripts/<path to file in local project>.jsp"
                ]
            }
        ],
        "unusedDependencies": [
            "<Maven Artifact ID>"
        ]
     }
   


  • Type: boolean
  • Since: 2.3.0
  • Required: No
  • User Property: jspc.generateCompilationReport
  • Default: false

<includes>

Included JSPs, defaults to "**/*.jsp"
  • Type: java.lang.String[]
  • Required: No

<jasperClassDebugInfo>

(no description)
  • Type: boolean
  • Required: No
  • User Property: jspc.jasper.classdebuginfo
  • Default: true

<jasperEnablePooling>

(no description)
  • Type: boolean
  • Required: No
  • User Property: jspc.jasper.enablePooling
  • Default: true

<jasperGenStringAsCharArray>

(no description)
  • Type: boolean
  • Required: No
  • User Property: jspc.jasper.genStringAsCharArray
  • Default: false

<jasperIeClassId>

(no description)
  • Type: java.lang.String
  • Required: No
  • User Property: jspc.jasper.ieClassId
  • Default: clsid:8AD9C840-044E-11D1-B3E9-00805F499D93

<jasperKeepGenerated>

(no description)
  • Type: boolean
  • Required: No
  • User Property: jspc.jasper.keepgenerated
  • Default: true

<jasperMappedFile>

(no description)
  • Type: boolean
  • Required: No
  • User Property: jspc.jasper.mappedfile
  • Default: true

<jasperSuppressSmap>

(no description)
  • Type: boolean
  • Required: No
  • User Property: jspc.jasper.suppressSmap
  • Default: false

<jasperTrimSpaces>

(no description)
  • Type: boolean
  • Required: No
  • User Property: jspc.jasper.trimSpaces
  • Default: false

<jspFileExtensions>

Deprecated. Use the includes filter instead.
Comma separated list of extensions of files to be compiled by the plugin.
  • Type: java.lang.String
  • Required: No
  • User Property: jspc.jspFileExtensions
  • Default: jsp,jspx

<outputDirectory>

Target directory for the compiled JSP classes.
  • Type: java.lang.String
  • Required: No
  • User Property: jspc.outputDirectory
  • Default: ${project.build.outputDirectory}

<printCompilationReport>

Prints a compilation report by listing all the packages and dependencies that were used during processing the JSPs.
  • Type: boolean
  • Required: No
  • User Property: jspc.printCompilationReport
  • Default: false

<resourceDirectories>

List of alternative resource directories used during compiling.
  • Type: java.io.File[]
  • Required: No

<servletPackage>

When defined, this will set the value for the Constants.JSP_PACKAGE_NAME_PROPERTY_NAME system property of the Jasper compiler, which defines the prefix package under which compiled JSPs will be generated.
  • Type: java.lang.String
  • Required: No
  • User Property: jspc.servletPackage

<showSuccess>

(no description)
  • Type: boolean
  • Required: No
  • User Property: jspc.showSuccess
  • Default: false

<sourceDirectory>

Location of the JSP source file.
  • Type: java.io.File
  • Required: No
  • User Property: jspc.sourceDirectory
  • Default: ${project.build.scriptSourceDirectory}