blob: ddbb15e92240cd3a00599b9cff86db3f8673f316 [file] [log] [blame]
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.11.1 from org.apache.maven.plugins:maven-plugin-plugin:3.6.4:report at 2022-08-21
| Rendered using Apache Maven Fluido Skin 1.11.1
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="generator" content="Apache Maven Doxia Site Renderer 1.11.1" />
<title>Apache Sling Maven Plugin &#x2013; Plugin Documentation</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.11.1.min.css" />
<link rel="stylesheet" href="./css/site.css" />
<link rel="stylesheet" href="./css/print.css" media="print" />
<script src="./js/apache-maven-fluido-1.11.1.min.js"></script>
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.apache.org";
_paq.push(['setTrackerUrl', u+'/matomo.php']);
_paq.push(['setSiteId', '6']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'/matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
<style>.github-fork-ribbon:before { background-color: gray; }</style>
</head>
<body class="topBarDisabled">
<a class="github-fork-ribbon right-top" href="https://github.com/apache/sling-maven-plugin" data-ribbon="Fork me on GitHub" title="Fork me on GitHub">Fork me on GitHub</a>
<div class="container-fluid">
<header>
<div id="banner">
<div class="pull-left"><a href="https://sling.apache.org/" id="bannerLeft"><img src="https://sling.apache.org/res/logos/sling.svg" alt="Apache Sling" style="width: 123px; height: 63px;" /></a></div>
<div class="pull-right"><a href="https://apache.org/" id="bannerRight"><img src="https://sling.apache.org/res/logos/apache.png" alt="Apache" style="" /></a></div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li class=""><a href="https://sling.apache.org/" class="externalLink" title="Apache Sling">Apache Sling</a><span class="divider">/</span></li>
<li class=""><a href="https://sling.apache.org/components/" class="externalLink" title="Maven Plugins">Maven Plugins</a><span class="divider">/</span></li>
<li class=""><a href="index.html" title="Apache Sling Maven Plugin">Apache Sling Maven Plugin</a><span class="divider">/</span></li>
<li class="active ">Plugin Documentation</li>
<li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 2022-08-21</li>
<li id="projectVersion" class="pull-right">Version: 3.0.2</li>
</ul>
</div>
</header>
<div class="row-fluid">
<header id="leftColumn" class="span2">
<nav 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="bundle-installation.html" title="Bundle Installation"><span class="none"></span>Bundle Installation</a></li>
<li class="active"><a><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-right"></span>Project Information</a></li>
<li><a href="project-reports.html" title="Project Reports"><span class="icon-chevron-down"></span>Project Reports</a>
<ul class="nav nav-list">
<li><a href="apidocs/index.html" title="Javadoc"><span class="none"></span>Javadoc</a></li>
<li><a href="surefire-report.html" title="Surefire Report"><span class="none"></span>Surefire Report</a></li>
<li><a href="jira-report.html" title="JIRA Report"><span class="none"></span>JIRA Report</a></li>
<li class="active"><a><span class="none"></span>Plugin Documentation</a></li>
</ul></li>
</ul>
</nav>
<div class="well sidebar-nav">
<div id="poweredBy">
<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>
</header>
<main id="bodyColumn" class="span10" >
<section>
<h2><a name="Plugin_Documentation"></a>Plugin Documentation</h2><a name="Plugin_Documentation"></a>
<p>Goals available for this plugin:</p>
<table border="0" class="table table-striped">
<tr class="a">
<th>Goal</th>
<th>Description</th></tr>
<tr class="b">
<td align="left"><a href="./deploy-mojo.html">sling:deploy</a></td>
<td><strong>Deprecated.</strong> Use the OBR goals from the <a
href="https://felix.apache.org/documentation/_attachments/components/bundle-plugin/index.html">maven-bundle-plugin</a>
instead.</td></tr>
<tr class="a">
<td align="left"><a href="./deploy-file-mojo.html">sling:deploy-file</a></td>
<td><strong>Deprecated.</strong> Use the OBR goals from the <a
href="https://felix.apache.org/documentation/_attachments/components/bundle-plugin/index.html">maven-bundle-plugin</a>
instead.</td></tr>
<tr class="b">
<td align="left"><a href="./fsmount-mojo.html">sling:fsmount</a></td>
<td>Create OSGi configurations for the <a
href="https://sling.apache.org/documentation/bundles/accessing-filesystem-resources-extensions-fsresource.html">Apache
Sling File System Resource Provider</a>. In case a bundle file is
supplied via <code>AbstractFsMountMojo.bundleFileName</code> the
configuration for its <a
href="https://sling.apache.org/documentation/bundles/content-loading-jcr-contentloader.html#initial-content-loading">initial
content</a> is created. Otherwise it tries to detect a FileVault
content package layout starting at
<code>AbstractFsMountMojo.fileVaultJcrRootFile</code> or the
project's resource directories and potentially creates a
configuration for each path in the package's
<code>filter.xml</code>.</td></tr>
<tr class="a">
<td align="left"><a href="./fsunmount-mojo.html">sling:fsunmount</a></td>
<td>Remove OSGi configurations for the <a
href="https://sling.apache.org/documentation/bundles/accessing-filesystem-resources-extensions-fsresource.html">Apache
Sling File System Resource Provider</a>. In case a bundle file is
supplied via <code>AbstractFsMountMojo.bundleFileName</code> the
configuration for its <a
href="https://sling.apache.org/documentation/bundles/content-loading-jcr-contentloader.html#initial-content-loading">initial
content</a> is created. Otherwise it tries to detect a FileVault
content package layout starting at
<code>AbstractFsMountMojo.fileVaultJcrRootFile</code> or the
project's resource directories and potentially creates a
configuration for each path in the package's
<code>filter.xml</code>.</td></tr>
<tr class="b">
<td align="left"><a href="./generate-adapter-metadata-mojo.html">sling:generate-adapter-metadata</a></td>
<td>Build <a
href="http://sling.apache.org/documentation/the-sling-engine/adapters.html#implementing-adaptable">adapter
metadata (JSON)</a> for the Web Console Plugin at
<code>/system/console/status-adapters</code> and
<code>/system/console/adapters</code> from classes annotated with
<a
href="https://github.com/apache/sling-adapter-annotations">adapter
annotations</a>.</td></tr>
<tr class="a">
<td align="left"><a href="./help-mojo.html">sling:help</a></td>
<td>Display help information on sling-maven-plugin.<br />
Call <code>mvn sling:help -Ddetail=true
-Dgoal=&lt;goal-name&gt;</code> to display parameter details.</td></tr>
<tr class="b">
<td align="left"><a href="./install-mojo.html">sling:install</a></td>
<td>Install the project's artifact to a running Sling instance (in case
it is an OSGi bundle). It uses the first valid OSGi bundle file for
deployment from the primary artifact and all secondary ones. For
details refer to <a href="bundle-installation.html">Bundle
Installation</a>. To install an arbitrary bundle not attached to
the current Maven project use goal <a
href="install-file-mojo.html">install-file</a>.</td></tr>
<tr class="a">
<td align="left"><a href="./install-file-mojo.html">sling:install-file</a></td>
<td>Install an OSGi bundle from a given file path or Maven coordinates
(resolved from the repository) to a running Sling instance. One of
the following parameter sets are used to determine the bundle to
install (evaluated in the given order):
<ul>
<li><code>groupId</code>, <code>artifactId</code>,
<code>version</code>, and optionally <code>classifier</code> and
<code>packaging</code></li>
<li><code>artifact</code></li>
<li><code>bundleFileName</code></li>
</ul>
To install a bundle which has been built from the current Maven
project rather use goal <a href="install-mojo.html">install</a>.
For details refer to <a href="bundle-installation.html">Bundle
Installation</a>.</td></tr>
<tr class="b">
<td align="left"><a href="./uninstall-mojo.html">sling:uninstall</a></td>
<td>Uninstall an OSGi bundle from a running Sling instance. For details
refer to <a href="bundle-installation.html">Bundle
Uninstallation</a>.</td></tr>
<tr class="a">
<td align="left"><a href="./validate-mojo.html">sling:validate</a></td>
<td>Validate all JSON files of a project. It only ensures they are
well-formed but not that they are valid against a certain schema.</td></tr></table><section>
<h3><a name="System_Requirements"></a>System Requirements</h3><a name="System_Requirements"></a>
<p>The following specifies the minimum requirements to run this Maven plugin:</p>
<table border="0" class="table table-striped">
<tr class="a">
<td align="left">Maven</td>
<td>3.3.1</td></tr>
<tr class="b">
<td align="left">JDK</td>
<td>8</td></tr>
<tr class="a">
<td align="left">Memory</td>
<td>No minimum requirement.</td></tr>
<tr class="b">
<td align="left">Disk Space</td>
<td>No minimum requirement.</td></tr></table></section><section>
<h3><a name="Usage"></a>Usage</h3><a name="Usage"></a>
<p>You should specify the version in your project's plugin configuration:</p>
<div class="source"><pre class="prettyprint linenums">&lt;project&gt;
...
&lt;build&gt;
&lt;!-- To define the plugin version in your parent POM --&gt;
&lt;pluginManagement&gt;
&lt;plugins&gt;
&lt;plugin&gt;
&lt;groupId&gt;org.apache.sling&lt;/groupId&gt;
&lt;artifactId&gt;sling-maven-plugin&lt;/artifactId&gt;
&lt;version&gt;3.0.2&lt;/version&gt;
&lt;/plugin&gt;
...
&lt;/plugins&gt;
&lt;/pluginManagement&gt;
&lt;!-- To use the plugin goals in your POM or parent POM --&gt;
&lt;plugins&gt;
&lt;plugin&gt;
&lt;groupId&gt;org.apache.sling&lt;/groupId&gt;
&lt;artifactId&gt;sling-maven-plugin&lt;/artifactId&gt;
&lt;version&gt;3.0.2&lt;/version&gt;
&lt;/plugin&gt;
...
&lt;/plugins&gt;
&lt;/build&gt;
...
&lt;/project&gt;
</pre></div>
<p>For more information, see <a class="externalLink" href="http://maven.apache.org/guides/mini/guide-configuring-plugins.html">&quot;Guide to Configuring Plug-ins&quot;</a></p></section></section>
</main>
</div>
</div>
<hr/>
<footer>
<div class="container-fluid">
<div class="row-fluid">
<p>&#169; 2022
<a href="https://www.apache.org/">The Apache Software Foundation</a> &vert; <a href="https://privacy.apache.org/policies/privacy-policy-public.html">Privacy Policy</a>
</p>
</div>
</div>
</footer>
<script>
if(anchors) {
anchors.add();
}
</script>
</body>
</html>