org.apache.sling.maven.jspc
Class JspcMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.sling.maven.jspc.JspcMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, Options

public class JspcMojo
extends org.apache.maven.plugin.AbstractMojo
implements Options

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.


Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
JspcMojo()
           
 
Method Summary
 void execute()
           
 boolean genStringAsCharArray()
          Are Text strings to be generated as char arrays?
 Map<String,TreeNode> getCache()
           
 int getCheckInterval()
           
 boolean getClassDebugInfo()
          Should we include debug information in compiled class?
 String getClassPath()
          What classpath should I use while compiling the servlets generated from JSP files?
 String getCompiler()
          Compiler to use.
 String getCompilerClassName()
          Java compiler class to use.
 String getCompilerSourceVM()
          Compiler source VM, e.g.
 String getCompilerTargetVM()
          The compiler target VM, e.g.
 boolean getDevelopment()
           
 boolean getDisplaySourceFragment()
          Should we include a source fragment in exception messages, which could be displayed to the developer ?
 boolean getErrorOnUseBeanInvalidClassAttribute()
          Returns true if Jasper issues a compilation error instead of a runtime Instantiation error if the class attribute specified in useBean action is invalid.
 boolean getFork()
          boolean flag to tell Ant whether to fork JSP page compilations.
 String getIeClassId()
          Class ID for use in the plugin tag when the browser is IE.
 String getJavaEncoding()
          Java platform encoding to generate the JSP page servlet.
 ClassLoader getJspClassLoader()
          The classloader to use when compiling servlets generated from JSP files and to load the servlets.
 JspConfig getJspConfig()
          Obtain JSP configuration informantion specified in web.xml.
 boolean getKeepGenerated()
          Are we keeping generated code around?
 boolean getMappedFile()
          Are we supporting HTML mapped servlets?
 int getModificationTestInterval()
           
 String getScratchDir()
          What is my scratch dir?
 boolean getSendErrorToClient()
          Should errors be sent to client or thrown into stderr?
 TagPluginManager getTagPluginManager()
          Obtain a Tag Plugin Manager
 TldLocationsCache getTldLocationsCache()
          The cache for the location of the TLD's for the various tag libraries 'exposed' by the web application.
 boolean getTrimSpaces()
          Should white spaces between directives or actions be trimmed?
 boolean isCaching()
           
 boolean isPoolingEnabled()
          Returns true if tag handler pooling is enabled, false otherwise.
 boolean isSmapDumped()
          Indicates whether SMAP info for JSR45 debugging should be dumped to a file.
 boolean isSmapSuppressed()
          Is the generation of SMAP info for JSR45 debugging suppressed?
 boolean isXpoweredBy()
          Is generation of X-Powered-By response header enabled/disabled?
 void scanFiles(File base)
          Locate all jsp files in the webapp.
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JspcMojo

public JspcMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Specified by:
execute in interface org.apache.maven.plugin.Mojo
Throws:
org.apache.maven.plugin.MojoExecutionException

scanFiles

public void scanFiles(File base)
Locate all jsp files in the webapp. Used if no explicit jsps are specified.


genStringAsCharArray

public boolean genStringAsCharArray()
Description copied from interface: Options
Are Text strings to be generated as char arrays?

Specified by:
genStringAsCharArray in interface Options

isCaching

public boolean isCaching()

getCache

public Map<String,TreeNode> getCache()

getCheckInterval

public int getCheckInterval()

getClassDebugInfo

public boolean getClassDebugInfo()
Description copied from interface: Options
Should we include debug information in compiled class?

Specified by:
getClassDebugInfo in interface Options

getClassPath

public String getClassPath()
Description copied from interface: Options
What classpath should I use while compiling the servlets generated from JSP files?

Specified by:
getClassPath in interface Options

getCompiler

public String getCompiler()
Description copied from interface: Options
Compiler to use.

Specified by:
getCompiler in interface Options

getCompilerClassName

public String getCompilerClassName()
Description copied from interface: Options
Java compiler class to use.

Specified by:
getCompilerClassName in interface Options

getCompilerSourceVM

public String getCompilerSourceVM()
Description copied from interface: Options
Compiler source VM, e.g. 1.3, 1.4, or 1.5.

Specified by:
getCompilerSourceVM in interface Options

getCompilerTargetVM

public String getCompilerTargetVM()
Description copied from interface: Options
The compiler target VM, e.g. 1.1, 1.2, 1.3, 1.4, or 1.5.

Specified by:
getCompilerTargetVM in interface Options

getDevelopment

public boolean getDevelopment()

getErrorOnUseBeanInvalidClassAttribute

public boolean getErrorOnUseBeanInvalidClassAttribute()
Description copied from interface: Options
Returns true if Jasper issues a compilation error instead of a runtime Instantiation error if the class attribute specified in useBean action is invalid.

Specified by:
getErrorOnUseBeanInvalidClassAttribute in interface Options

getFork

public boolean getFork()
Description copied from interface: Options
boolean flag to tell Ant whether to fork JSP page compilations.

Specified by:
getFork in interface Options

getIeClassId

public String getIeClassId()
Description copied from interface: Options
Class ID for use in the plugin tag when the browser is IE.

Specified by:
getIeClassId in interface Options

getJavaEncoding

public String getJavaEncoding()
Description copied from interface: Options
Java platform encoding to generate the JSP page servlet.

Specified by:
getJavaEncoding in interface Options

getJspClassLoader

public ClassLoader getJspClassLoader()
Description copied from interface: Options
The classloader to use when compiling servlets generated from JSP files and to load the servlets.

If this method returns null the JasperLoader class is used.

Specified by:
getJspClassLoader in interface Options
Returns:
The ClassLoader to use for compilation and JSP loading or null to use the JasperLoader.

getJspConfig

public JspConfig getJspConfig()
Description copied from interface: Options
Obtain JSP configuration informantion specified in web.xml.

Specified by:
getJspConfig in interface Options

getKeepGenerated

public boolean getKeepGenerated()
Description copied from interface: Options
Are we keeping generated code around?

Specified by:
getKeepGenerated in interface Options

getMappedFile

public boolean getMappedFile()
Description copied from interface: Options
Are we supporting HTML mapped servlets?

Specified by:
getMappedFile in interface Options

getModificationTestInterval

public int getModificationTestInterval()

getScratchDir

public String getScratchDir()
Description copied from interface: Options
What is my scratch dir?

Specified by:
getScratchDir in interface Options

getSendErrorToClient

public boolean getSendErrorToClient()
Description copied from interface: Options
Should errors be sent to client or thrown into stderr?

Specified by:
getSendErrorToClient in interface Options

getTagPluginManager

public TagPluginManager getTagPluginManager()
Description copied from interface: Options
Obtain a Tag Plugin Manager

Specified by:
getTagPluginManager in interface Options

getTldLocationsCache

public TldLocationsCache getTldLocationsCache()
Description copied from interface: Options
The cache for the location of the TLD's for the various tag libraries 'exposed' by the web application. A tag library is 'exposed' either explicitely in web.xml or implicitely via the uri tag in the TLD of a taglib deployed in a jar file (WEB-INF/lib).

Specified by:
getTldLocationsCache in interface Options
Returns:
the instance of the TldLocationsCache for the web-application.

getTrimSpaces

public boolean getTrimSpaces()
Description copied from interface: Options
Should white spaces between directives or actions be trimmed?

Specified by:
getTrimSpaces in interface Options

isPoolingEnabled

public boolean isPoolingEnabled()
Description copied from interface: Options
Returns true if tag handler pooling is enabled, false otherwise.

Specified by:
isPoolingEnabled in interface Options

isSmapDumped

public boolean isSmapDumped()
Description copied from interface: Options
Indicates whether SMAP info for JSR45 debugging should be dumped to a file. Ignored is suppressSmap() is true

Specified by:
isSmapDumped in interface Options

isSmapSuppressed

public boolean isSmapSuppressed()
Description copied from interface: Options
Is the generation of SMAP info for JSR45 debugging suppressed?

Specified by:
isSmapSuppressed in interface Options

isXpoweredBy

public boolean isXpoweredBy()
Description copied from interface: Options
Is generation of X-Powered-By response header enabled/disabled?

Specified by:
isXpoweredBy in interface Options

getDisplaySourceFragment

public boolean getDisplaySourceFragment()
Description copied from interface: Options
Should we include a source fragment in exception messages, which could be displayed to the developer ?

Specified by:
getDisplaySourceFragment in interface Options


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.