Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Jetty/Feature/Jetty Jspc Maven Plugin"

< Jetty‎ | Feature
(New page: == Jetty Jspc Maven Plugin == This plugin will help you pre-compile your jsps and works in conjunction with the maven war plugin to put them inside an assembled war. === Configuration ==...)
 
(Configuration)
Line 4: Line 4:
  
 
=== Configuration ===
 
=== Configuration ===
 +
 
Here's the basic setup required to put the jspc plugin into your build:
 
Here's the basic setup required to put the jspc plugin into your build:
<nowiki>
+
{{{
 
&lt;plugin&gt;
 
&lt;plugin&gt;
 
   &lt;groupId&gt;org.mortbay.jetty</groupId&gt;
 
   &lt;groupId&gt;org.mortbay.jetty</groupId&gt;
Line 21: Line 22:
 
   &lt;/executions&gt;
 
   &lt;/executions&gt;
 
  &lt;/plugin&gt;
 
  &lt;/plugin&gt;
</nowiki>
+
}}}
  
The configurable parameters are:
+
The configurable parameters are
  
webXmlFragment default-value="${basedir}/target/webfrag.xml"
+
{|
packageRoot default-value="jsp"
+
!Parameter Name !! Default Value !! Meaning
webAppSourceDirectory default-value="${basedir}/src/main/webapp"
+
|webXmlFragment||"${basedir}/target/webfrag.xml"||xxx
webXml default-value="${basedir}/src/main/webapp/WEB-INF/web.xml"
+
|-
includes default-value="**\/*.jsp, **\/*.jspx"
+
|packageRoot ||"jsp"||xxx
excludes default_value="**\/.svn\/**"
+
|-
classesDirectory default-value="${project.build.outputDirectory}"
+
|webAppSourceDirectory ||"${basedir}/src/main/webapp"||xx
generatedClasses default-value="${project.build.outputDirectory}"
+
|-
keepSources default-value=false
+
|webXml||"${basedir}/src/main/webapp/WEB-INF/web.xml"||xx
validateXml default-value=false
+
|-
suppressSmap default-value=true
+
|includes||"**\/*.jsp, **\/*.jspx"||xx
ignoreJspFragmentErrors default-value=false
+
|-
schemaResourcePrefix default-value=
+
|excludes||"**\/.svn\/**"||xx
insertionMarker default-value=
+
|-
verbose default-value=false
+
|classesDirectory||"${project.build.outputDirectory}"||x
mergeFragment default-value=true
+
|-
 +
|generatedClasses||"${project.build.outputDirectory}"||x
 +
|-
 +
|keepSources||false||xx
 +
|-
 +
|validateXml||false||x
 +
|-
 +
|suppressSmap||true||x
 +
|-
 +
|ignoreJspFragmentErrors||false||x
 +
|-
 +
|schemaResourcePrefix|| ||x
 +
|-
 +
|insertionMarker|| || x
 +
|-
 +
|verbose||false||x
 +
|-
 +
|mergeFragment||true||x
 +
|}
  
 
Taking all the default settings, here's how to configure the war plugin to use the generated web.xml that includes all of the jsp servlet declarations:
 
Taking all the default settings, here's how to configure the war plugin to use the generated web.xml that includes all of the jsp servlet declarations:
  
<nowiki>
+
{{{
 
<plugin>
 
<plugin>
 
   <groupId>org.apache.maven.plugins</groupId>
 
   <groupId>org.apache.maven.plugins</groupId>
Line 52: Line 71:
 
   </configuration>
 
   </configuration>
 
</plugin>
 
</plugin>
</nowiki>
+
}}}
  
 
=== Precompiling Jsps with Overlayed Wars ===
 
=== Precompiling Jsps with Overlayed Wars ===

Revision as of 03:38, 23 September 2009

Jetty Jspc Maven Plugin

This plugin will help you pre-compile your jsps and works in conjunction with the maven war plugin to put them inside an assembled war.


Configuration

Here's the basic setup required to put the jspc plugin into your build: {{{ <plugin>

 <groupId>org.mortbay.jetty</groupId>
  <artifactId>jetty-jspc-maven-plugin</artifactId>
  <version>7.0.0</version>
  <executions>
    <execution>
      <id>jspc</id>
      <goals>
        <goal>jspc</goal>
      </goals>
      <configuration>
      </configuration>
    </execution>
  </executions>
</plugin>

}}}

The configurable parameters are

Parameter Name Default Value Meaning webXmlFragment "${basedir}/target/webfrag.xml" xxx
packageRoot "jsp" xxx
webAppSourceDirectory "${basedir}/src/main/webapp" xx
webXml "${basedir}/src/main/webapp/WEB-INF/web.xml" xx
includes "**\/*.jsp, **\/*.jspx" xx
excludes "**\/.svn\/**" xx
classesDirectory "${project.build.outputDirectory}" x
generatedClasses "${project.build.outputDirectory}" x
keepSources false xx
validateXml false x
suppressSmap true x
ignoreJspFragmentErrors false x
schemaResourcePrefix x
insertionMarker x
verbose false x
mergeFragment true x

Taking all the default settings, here's how to configure the war plugin to use the generated web.xml that includes all of the jsp servlet declarations:

{{{ <plugin>

 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-war-plugin</artifactId>
 <configuration>
   <webXml>${basedir}/target/web.xml</webXml>
 </configuration>

</plugin> }}}

Precompiling Jsps with Overlayed Wars

Back to the top