blob: 00a7c175e84fe062b6f7e8c1dff581ece1ae88e3 [file] [log] [blame]
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.7.1 at 2017-06-12
| Rendered using Apache Maven Fluido Skin 1.6
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20170612" />
<meta http-equiv="Content-Language" content="en" />
<title>Apache Sling Maven Plugin for Compiling JSP Sources into Bundles &#x2013; JspC Maven Plugin</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.6.min.css" />
<link rel="stylesheet" href="./css/site.css" />
<link rel="stylesheet" href="./css/print.css" media="print" />
<script type="text/javascript" src="./js/apache-maven-fluido-1.6.min.js"></script>
</head>
<body class="topBarDisabled">
<div class="container-fluid">
<div id="banner">
<div class="pull-left"><div id="bannerLeft"><h2>Apache Sling Maven Plugin for Compiling JSP Sources into Bundles</h2>
</div>
</div>
<div class="pull-right"></div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2017-06-12<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 2.1.0</li>
</ul>
</div>
<div class="row-fluid">
<div id="leftColumn" class="span2">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">Overview</li>
<li class="active"><a href="#"><span class="none"></span>Introduction</a>
</li>
<li><a href="plugin-info.html" title="Goals"><span class="none"></span>Goals</a> </li>
<li class="nav-header">Project Documentation</li>
<li><a href="project-info.html" title="Project Information"><span class="icon-chevron-down"></span>Project Information</a>
<ul class="nav nav-list">
<li><a href="dependencies.html" title="Dependencies"><span class="none"></span>Dependencies</a> </li>
<li><a href="dependency-info.html" title="Dependency Information"><span class="none"></span>Dependency Information</a> </li>
<li><a href="dependency-management.html" title="Dependency Management"><span class="none"></span>Dependency Management</a> </li>
<li><a href="distribution-management.html" title="Distribution Management"><span class="none"></span>Distribution Management</a> </li>
<li class="active"><a href="#"><span class="none"></span>About</a>
</li>
<li><a href="issue-tracking.html" title="Issue Management"><span class="none"></span>Issue Management</a> </li>
<li><a href="license.html" title="Licenses"><span class="none"></span>Licenses</a> </li>
<li><a href="mail-lists.html" title="Mailing Lists"><span class="none"></span>Mailing Lists</a> </li>
<li><a href="plugin-management.html" title="Plugin Management"><span class="none"></span>Plugin Management</a> </li>
<li><a href="plugins.html" title="Plugins"><span class="none"></span>Plugins</a> </li>
<li><a href="team-list.html" title="Team"><span class="none"></span>Team</a> </li>
<li><a href="source-repository.html" title="Source Code Management"><span class="none"></span>Source Code Management</a> </li>
<li><a href="project-summary.html" title="Summary"><span class="none"></span>Summary</a> </li>
</ul>
</li>
<li><a href="project-reports.html" title="Project Reports"><span class="icon-chevron-right"></span>Project Reports</a> </li>
</ul>
<hr />
<div id="poweredBy">
<div class="clear"></div>
<div class="clear"></div>
<div class="clear"></div>
<div class="clear"></div>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
</div>
</div>
</div>
<div id="bodyColumn" class="span10" >
<h1>JspC Maven Plugin</h1>
<p>Compiles JSP scripts into class files and generates Declarative Service Descriptors to register the compiled JSPs as services.</p>
<p>See <a href="plugin-info.html">Goals</a> for a list of supported goals.</p>
<div class="section">
<h2><a name="Overview"></a>Overview</h2>
<p>The Maven JspC Plugin provides a single goal <tt>jspc</tt> which is by default executed in the <tt>compile</tt> phase of the Maven build process. This goal takes all JSP source files from a configured location (<tt>src/main/scripts</tt> by default) and compiles them into classes in a configurable location (<tt>target/jspc-plugin-generated</tt> by default). In addition, for each compiled JSP a Declarative Services descriptor is generated and written to a descriptor file (<tt>OSGI-INF/jspServiceComponents.xml</tt> in the output location). This descriptor will then be read by the Service Component Runtime of the deployment OSGi framework to register all contained JSP as <tt>javax.servlet.Servlet</tt> services.</p></div>
<div class="section">
<h2><a name="Usage"></a>Usage</h2>
<p>To use the Maven JspC Plugin define the following elements in the <tt>&lt;plugins&gt;</tt> section of the POM:</p>
<div class="source">
<div class="source"><pre class="prettyprint">&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;
&lt;project&gt;
....
&lt;build&gt;
....
&lt;plugins&gt;
....
&lt;plugin&gt;
&lt;groupId&gt;org.apache.sling&lt;/groupId&gt;
&lt;artifactId&gt;jspc-maven-plugin&lt;/artifactId&gt;
&lt;executions&gt;
&lt;execution&gt;
&lt;id&gt;compile-jsp&lt;/id&gt;
&lt;goals&gt;
&lt;goal&gt;jspc&lt;/goal&gt;
&lt;/goals&gt;
&lt;/execution&gt;
&lt;/executions&gt;
&lt;/plugin&gt;
....
&lt;plugins&gt;
....
&lt;build&gt;
....
&lt;project&gt;
</pre></div></div></div>
<div class="section">
<h2><a name="Notes"></a>Notes</h2>
<p>The generated JSP classes as well as the Declarative Services descriptor are automatically copied to the generated bundle jar file if the Maven Bundle Plugin (from the Apache Felix) project is used to build the project package.</p></div>
</div>
</div>
</div>
<hr/>
<footer>
<div class="container-fluid">
<div class="row-fluid">
<p>Copyright &copy;2007&#x2013;2017
<a href="https://www.apache.org/">The Apache Software Foundation</a>.
All rights reserved.</p>
</div>
</div>
</footer>
</body>
</html>