blob: ca2b37dfad447599eb9b44c30772b057212129f8 [file] [log] [blame]
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1 at 2020-06-22
| 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="20200622" />
<meta http-equiv="Content-Language" content="en" />
<title>Apache Sling Scripting Bundle Maven Plugin &#x2013; scriptingbundle:metadata</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 Scripting Bundle Maven Plugin</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: 2020-06-22<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 0.2.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><a href="index.html" title="Introduction"><span class="none"></span>Introduction</a> </li>
<li><a href="plugin-info.html" title="Goals"><span class="none"></span>Goals</a> </li>
<li><a href="usage.html" title="Usage"><span class="none"></span>Usage</a> </li>
<li class="nav-header">Project Documentation</li>
<li><a href="project-info.html" title="Project Information"><span class="icon-chevron-right"></span>Project Information</a> </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" >
<div class="section">
<h2><a name="scriptingbundle:metadata"></a>scriptingbundle:metadata</h2>
<p><b>Full name</b>:</p>
<p>org.apache.sling:scriptingbundle-maven-plugin:0.2.0:metadata</p>
<p><b>Description</b>:</p>
<div>The <tt>metadata</tt> goal will generate two Maven project
properties, namely
<tt>org.apache.sling.scriptingbundle.maven.plugin.Require-Capability</tt>
and
<tt>org.apache.sling.scriptingbundle.maven.plugin.Provide-Capability</tt>
which can be used to generate the corresponding OSGi bundle headers
for bundles providing scripts executable by a
<tt>ScriptEngine</tt>.</div>
<p><b>Attributes</b>:</p>
<ul>
<li>Requires a Maven project to be executed.</li>
<li>Binds by default to the <a class="externalLink" href="http://maven.apache.org/ref/current/maven-core/lifecycles.html">lifecycle phase</a>: <tt>prepare-package</tt>.</li>
</ul>
<div class="section">
<h3><a name="Optional_Parameters"></a>Optional Parameters</h3>
<table class="table table-striped" border="0">
<tr class="a">
<th>Name</th>
<th>Type</th>
<th>Since</th>
<th>Description</th>
</tr>
<tr class="b">
<td><tt><a href="#excludes">&lt;excludes&gt;</a></tt></td>
<td><tt>String[]</tt></td>
<td><tt>0.2.0</tt></td>
<td>Allows defining a list of excluded files and folders or patterns to
filter which files should be excluded in the analysis for
generating capabilities.
<p>The following list provides the default excluded files and
patterns:</p>
<dl>
<dt>Miscellaneous typical temporary files</dt>
<dd>**/*~, **/#*#, **/.#*, **/%*%, **/._*</dd>
<dt>CVS</dt>
<dd>**/CVS, **/CVS/**, **/.cvsignore</dd>
<dt>Subversion</dt>
<dd>**/.svn, **/.svn/**</dd>
<dt>Bazaar</dt>
<dd>**/.bzr, **/.bzr/**</dd>
<dt>Mac</dt>
<dd>**/.DS_Store</dd>
<dt>Mercurial</dt>
<dd>**/.hg, **/.hg/**</dd>
<dt>git</dt>
<dd>**/.git, **/.git/**</dd>
</dl><br /><b>User property is</b>: <tt>scriptingbundle.excludes</tt>.<br /></td>
</tr>
<tr class="a">
<td><tt><a href="#includes">&lt;includes&gt;</a></tt></td>
<td><tt>String[]</tt></td>
<td><tt>0.2.0</tt></td>
<td>Allows defining a list of included files and folders or patterns to
filter which files should be included in the analysis for
generating capabilities. By default all files are included.<br /><b>Default value is</b>: <tt>**</tt>.<br /><b>User property is</b>: <tt>scriptingbundle.includes</tt>.<br /></td>
</tr>
<tr class="b">
<td><tt><a href="#scriptEngineMappings">&lt;scriptEngineMappings&gt;</a></tt></td>
<td><tt>Map</tt></td>
<td><tt>0.2.0</tt></td>
<td>Allows overriding the default extension to script engine mapping,
in order to correctly generate the
<tt>sling.resourceType;scriptEngine</tt>
<tt>Provide-Capability</tt> attribute value. When configuring
this mapping, please make sure to use the script extension as the
key and one of the Script Engine's name (obtained from
<tt>ScriptEngineFactory.getNames()</tt>) as the value.
<p>The following list represents the default extension to Script
Engine mapping:</p>
<dl>
<dt>ftl</dt>
<dd>freemarker</dd>
<dt>gst</dt>
<dd>gstring</dd>
<dt>html</dt>
<dd>htl</dd>
<dt>java</dt>
<dd>java</dd>
<dt>esp, ecma</dt>
<dd>rhino</dd>
<dt>jsp, jspf, jspx</dt>
<dd>jsp</dd>
</dl><br /></td>
</tr>
<tr class="a">
<td><tt><a href="#searchPaths">&lt;searchPaths&gt;</a></tt></td>
<td><tt>Set</tt></td>
<td><tt>0.2.0</tt></td>
<td>Allows overriding the default search paths (<tt>/apps</tt> and
<tt>/libs</tt>). When scripts are organised in folders which
follow the search path structure, the Mojo will generate two
resource types for each resource type folder. For example:
<div>
<pre>
src/main/scripts/apps/org/apache/sling/example/example.html
</pre></div>
will generate the following two resource types
<div>
<pre>
org/apache/sling/example
/apps/org/apache/sling/example
</pre></div>
However, the following script
<div>
<pre>
src/main/scripts/org/apache/sling/example/example.html
</pre></div>
will generate only one resource type
<div>
<pre>
org/apache/sling/example
</pre></div><br /><b>User property is</b>: <tt>scriptingbundle.searchPaths</tt>.<br /></td>
</tr>
<tr class="b">
<td><tt><a href="#sourceDirectories">&lt;sourceDirectories&gt;</a></tt></td>
<td><tt>Set</tt></td>
<td><tt>0.2.0</tt></td>
<td>Defines where this goal will look for scripts in the project. By
default the <tt>src/main/scripts</tt> and
<tt>src/main/resources/javax.script</tt> folders will be
considered.<br /><b>User property is</b>: <tt>scriptingbundle.sourceDirectories</tt>.<br /></td>
</tr>
</table>
</div>
<div class="section">
<h3><a name="Parameter_Details"></a>Parameter Details</h3>
<div class="section">
<h4><a name="a.3Cexcludes.3E"></a><b><a name="excludes">&lt;excludes&gt;</a></b></h4>
<div>Allows defining a list of excluded files and folders or patterns to
filter which files should be excluded in the analysis for
generating capabilities.
<p>The following list provides the default excluded files and
patterns:</p>
<dl>
<dt>Miscellaneous typical temporary files</dt>
<dd>**/*~, **/#*#, **/.#*, **/%*%, **/._*</dd>
<dt>CVS</dt>
<dd>**/CVS, **/CVS/**, **/.cvsignore</dd>
<dt>Subversion</dt>
<dd>**/.svn, **/.svn/**</dd>
<dt>Bazaar</dt>
<dd>**/.bzr, **/.bzr/**</dd>
<dt>Mac</dt>
<dd>**/.DS_Store</dd>
<dt>Mercurial</dt>
<dd>**/.hg, **/.hg/**</dd>
<dt>git</dt>
<dd>**/.git, **/.git/**</dd>
</dl></div>
<ul>
<li><b>Type</b>: <tt>java.lang.String[]</tt></li>
<li><b>Since</b>: <tt>0.2.0</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>scriptingbundle.excludes</tt></li>
</ul><hr /></div>
<div class="section">
<h4><a name="a.3Cincludes.3E"></a><b><a name="includes">&lt;includes&gt;</a></b></h4>
<div>Allows defining a list of included files and folders or patterns to
filter which files should be included in the analysis for
generating capabilities. By default all files are included.</div>
<ul>
<li><b>Type</b>: <tt>java.lang.String[]</tt></li>
<li><b>Since</b>: <tt>0.2.0</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>scriptingbundle.includes</tt></li>
<li><b>Default</b>: <tt>**</tt></li>
</ul><hr /></div>
<div class="section">
<h4><a name="a.3CscriptEngineMappings.3E"></a><b><a name="scriptEngineMappings">&lt;scriptEngineMappings&gt;</a></b></h4>
<div>Allows overriding the default extension to script engine mapping,
in order to correctly generate the
<tt>sling.resourceType;scriptEngine</tt>
<tt>Provide-Capability</tt> attribute value. When configuring
this mapping, please make sure to use the script extension as the
key and one of the Script Engine's name (obtained from
<tt>ScriptEngineFactory.getNames()</tt>) as the value.
<p>The following list represents the default extension to Script
Engine mapping:</p>
<dl>
<dt>ftl</dt>
<dd>freemarker</dd>
<dt>gst</dt>
<dd>gstring</dd>
<dt>html</dt>
<dd>htl</dd>
<dt>java</dt>
<dd>java</dd>
<dt>esp, ecma</dt>
<dd>rhino</dd>
<dt>jsp, jspf, jspx</dt>
<dd>jsp</dd>
</dl></div>
<ul>
<li><b>Type</b>: <tt>java.util.Map</tt></li>
<li><b>Since</b>: <tt>0.2.0</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
</ul><hr /></div>
<div class="section">
<h4><a name="a.3CsearchPaths.3E"></a><b><a name="searchPaths">&lt;searchPaths&gt;</a></b></h4>
<div>Allows overriding the default search paths (<tt>/apps</tt> and
<tt>/libs</tt>). When scripts are organised in folders which
follow the search path structure, the Mojo will generate two
resource types for each resource type folder. For example:
<div>
<pre>
src/main/scripts/apps/org/apache/sling/example/example.html
</pre></div>
will generate the following two resource types
<div>
<pre>
org/apache/sling/example
/apps/org/apache/sling/example
</pre></div>
However, the following script
<div>
<pre>
src/main/scripts/org/apache/sling/example/example.html
</pre></div>
will generate only one resource type
<div>
<pre>
org/apache/sling/example
</pre></div></div>
<ul>
<li><b>Type</b>: <tt>java.util.Set</tt></li>
<li><b>Since</b>: <tt>0.2.0</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>scriptingbundle.searchPaths</tt></li>
</ul><hr /></div>
<div class="section">
<h4><a name="a.3CsourceDirectories.3E"></a><b><a name="sourceDirectories">&lt;sourceDirectories&gt;</a></b></h4>
<div>Defines where this goal will look for scripts in the project. By
default the <tt>src/main/scripts</tt> and
<tt>src/main/resources/javax.script</tt> folders will be
considered.</div>
<ul>
<li><b>Type</b>: <tt>java.util.Set</tt></li>
<li><b>Since</b>: <tt>0.2.0</tt></li>
<li><b>Required</b>: <tt>No</tt></li>
<li><b>User Property</b>: <tt>scriptingbundle.sourceDirectories</tt></li>
</ul>
</div></div>
</div>
</div>
</div>
</div>
<hr/>
<footer>
<div class="container-fluid">
<div class="row-fluid">
<p>Copyright &copy;2007&#x2013;2020
<a href="https://www.apache.org/">The Apache Software Foundation</a>.
All rights reserved.</p>
</div>
</div>
</footer>
</body>
</html>