Fork me on GitHub

Plugin Documentation

Goals available for this plugin:

Goal Description
slingfeature:aggregate-features Aggregate multiple features into a single one.
slingfeature:analyse-features Analyse the feature.
slingfeature:apis-jar Generates the APIs JARs for the selected feature files.
slingfeature:apply-default-config This mojo applies default configurations to selected features.
slingfeature:attach-featurearchives Create a feature model archive and attach it. An archive is created for each feature of this project
slingfeature:attach-features Attach the feature as a project artifact.
slingfeature:collect-artifacts No description.
slingfeature:embed-features Embed the features in the resources
slingfeature:extract-extension No description.
slingfeature:features-diff Compares different versions of the same Feature Model.
slingfeature:help Display help information on slingfeature-maven-plugin.
Call mvn slingfeature:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.
slingfeature:include-artifact This goal creates a Feature Model file that includes the Module Artifact as bundle (or extension) so that the Artifact can be added through a FM into a FM project. The FM file can be found in the 'build directory'/slingfeature-tmp folder. After a FM file is created successfully this file will be installed in the local Maven Repository as 'slingosgifeature' file under the Module's Maven Id location (group, artifact, version). This file can then later be used inside the 'aggregate-features' goal with: <includeArtifact> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.test.feature</artifactId> <version>1.0.0</version> <classifier>my-test-classifier</classifier> <type>slingosgifeature</type> </includeArtifact> It also can add dependencies to the FM file if its scope is provided (normally that would be 'compile'). In addition a bundle start order can be set for these included dependency bundles. Finally any FM files inside the Source FM folder are embedded into the FM file. This allows to add extension files like 'repoinit' etc to be added to provide them with the module.
slingfeature:info Extract information from a feature This mojo does not require a project, it can be run by just pointing it at a feature file. When run from within a project, the normal feature selection mechanism can be used. This mojo supports
  • Extracting the exported packages per feature and writing them to a file
  • Detecting duplicates across features and writing a report
slingfeature:launch-features Launches the given Feature File
slingfeature:repository Create a Maven repository structure from the referenced artifacts in the features.
slingfeature:update-feature-versions Update the bundles/artifact versions

System Requirements

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

Maven 2.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>slingfeature-maven-plugin</artifactId>
          <version>1.7.2</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.apache.sling</groupId>
        <artifactId>slingfeature-maven-plugin</artifactId>
        <version>1.7.2</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

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