Apache Sling Feature Laucher Maven Plugin

Clone this repo:
  1. 05c3a4d Adding sonarqube badges as per SLING-9682 by Dan Klco · 5 weeks ago master
  2. 3b65067 Updating badges for feature-launcher-maven-plugin by Radu Cotescu · 5 weeks ago
  3. ecc0466 [maven-release-plugin] prepare for next development iteration by Robert Munteanu · 3 months ago
  4. 7e864bd [maven-release-plugin] prepare release feature-launcher-maven-plugin-0.1.0 by Robert Munteanu · 3 months ago feature-launcher-maven-plugin-0.1.0
  5. 59c8868 pom.xml: add scm section by Robert Munteanu · 3 months ago

Apache Sling

Build Status Test Status Coverage Sonarcloud Status JavaDoc Maven Central License

This module is part of the Apache Sling project.

This plugin allows starting and stopping feature model applications without blocking the Maven execution. It is intended mainly for usage with integration tests.

Usage

Configure the plugin as follows:

<plugin>
    <groupId>org.apache.sling</groupId>
    <artifactId>feature-launcher-maven-plugin</artifactId>
    <configuration>
        <launches>
            <launch>
                <id>model</id>
                <feature>
                    <groupId>org.apache.sling</groupId>
                    <artifactId>org.apache.sling.starter</artifactId>
                    <version>12-SNAPSHOT</version>
                    <classifier>oak_tar</classifier>
                    <type>slingosgifeature</type>
                </feature>
                <launcherArguments>
                    <frameworkProperties>
                        <org.osgi.service.http.port>8080</org.osgi.service.http.port>
                    </frameworkProperties>
                </launcherArguments>
                <startTimeoutSeconds>180</startTimeoutSeconds>
            </launch>
        </launches>
        <toLaunch>
        </toLaunch>
    </configuration>
    <executions>
        <execution>
            <goals>
                <goal>start</goal>
                <goal>stop</goal>
            </goals>
        </execution>
    </executions>
</plugin>

This will run the Sling Starter using the oak_tar aggregate, setting the HTTP port to 8080 and waiting for up to 180 seconds for the application to start.

The start goal is bound by default to the pre-integration phase and the stop goal to the post-integration-test one.

See the src/it folder for a complete example, including a configuration of the maven-failsafe-plugin.