Class JspcMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.eclipse.jetty.jspc.plugin.JspcMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="jspc", defaultPhase=PROCESS_CLASSES, requiresDependencyResolution=COMPILE_PLUS_RUNTIME, threadSafe=true) public class JspcMojo extends org.apache.maven.plugin.AbstractMojo
This goal will compile jsps for a webapp so that they can be included in a war.

At runtime, the plugin will use the jspc compiler to precompile jsps and tags.

Note that the same java compiler will be used as for on-the-fly compiled jsps, which will be the Eclipse java compiler.

See Usage Guide for instructions on using this plugin.

Runs jspc compiler to produce .java and .class files
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    JettyJspC Add some extra setters to standard JspC class to help configure it for running in maven.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Until Jasper supports the option to generate the srcs in a different dir than the classes, this is the best we can do.
    void
     
    void
     
    void
    Take the web fragment and put it inside a copy of the web.xml.

    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
  • Field Details

  • Constructor Details

    • JspcMojo

      public JspcMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException
    • compile

      public void compile() throws Exception
      Throws:
      Exception
    • cleanupSrcs

      public void cleanupSrcs() throws Exception
      Until Jasper supports the option to generate the srcs in a different dir than the classes, this is the best we can do.
      Throws:
      Exception - if unable to clean srcs
    • mergeWebXml

      public void mergeWebXml() throws Exception
      Take the web fragment and put it inside a copy of the web.xml. You can specify the insertion point by specifying the string in the insertionMarker configuration entry. If you dont specify the insertionMarker, then the fragment will be inserted at the end of the file just before the </webapp>
      Throws:
      Exception - if unable to merge the web xml