Plugin Documentation

Goals available for this plugin:

Goal Description
sling:deploy Deploy a JAR representing an OSGi Bundle. This method posts the bundle built by maven to an OSGi Bundle Repository accepting the bundle. The plugin uses a multipart/format-data POST request to just post the file to the URL configured in the obr property.
sling:deploy-file Deploy a JAR representing an OSGi Bundle. This method posts the bundle built by maven to an OSGi Bundle Repository accepting the bundle. The plugin uses a multipart/format-data POST request to just post the file to the URL configured in the obr property.
sling:generate-adapter-metadata Build Adapter Metadata from Annotated Classes
sling:help Display help information on maven-sling-plugin.
Call mvn sling:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.
sling:install Install an OSGi bundle to a running Sling instance.
sling:install-file Install an OSGi bundle to a running Sling instance.
sling:uninstall Uninstall an OSGi bundle from a running Sling instance.
sling:validate Plugin to validate resources: - validate json files

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven 3.0.0
JDK 1.7
Memory No minimum requirement.
Disk Space No minimum requirement.

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.sling</groupId>
          <artifactId>maven-sling-plugin</artifactId>
          <version>2.1.10</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.apache.sling</groupId>
        <artifactId>maven-sling-plugin</artifactId>
        <version>2.1.10</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"