org.mortbay.jetty.jspc.plugin
Class JspcMojo

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

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 jsp2.0 jspc compiler if you are running on a 1.4 or lower jvm. If you are using a 1.5 jvm, then the jsp2.1 compiler will be selected. (this is the same behaviour as the jetty plugin for executing webapps).

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.

Author:
janb

Field Summary
static java.lang.String END_OF_WEBAPP
           
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
JspcMojo()
           
 
Method Summary
 void cleanupSrcs()
          Until Jasper supports the option to generate the srcs in a different dir than the classes, this is the best we can do.
 void compile()
           
 void execute()
           
 void mergeWebXml()
          Take the web fragment and put it inside a copy of the web.xml file from the webAppSourceDirectory.
 
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 Detail

END_OF_WEBAPP

public static final java.lang.String END_OF_WEBAPP
See Also:
Constant Field Values
Constructor Detail

JspcMojo

public JspcMojo()
Method Detail

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 java.lang.Exception
Throws:
java.lang.Exception

cleanupSrcs

public void cleanupSrcs()
                 throws java.lang.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:
java.lang.Exception

mergeWebXml

public void mergeWebXml()
                 throws java.lang.Exception
Take the web fragment and put it inside a copy of the web.xml file from the webAppSourceDirectory. 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:
java.lang.Exception


Copyright © 1995-2009 Mort Bay Consulting. All Rights Reserved.