Return-Path: X-Original-To: apmail-sling-commits-archive@www.apache.org Delivered-To: apmail-sling-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2D068198BA for ; Thu, 21 Apr 2016 07:11:23 +0000 (UTC) Received: (qmail 45723 invoked by uid 500); 21 Apr 2016 07:11:23 -0000 Delivered-To: apmail-sling-commits-archive@sling.apache.org Received: (qmail 45664 invoked by uid 500); 21 Apr 2016 07:11:22 -0000 Mailing-List: contact commits-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list commits@sling.apache.org Received: (qmail 45655 invoked by uid 99); 21 Apr 2016 07:11:22 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Apr 2016 07:11:22 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 723911A09CD for ; Thu, 21 Apr 2016 07:11:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.999 X-Spam-Level: X-Spam-Status: No, score=0.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id M8UXpywwrokp for ; Thu, 21 Apr 2016 07:11:20 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTP id 78CD65FBC9 for ; Thu, 21 Apr 2016 07:11:19 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5E3F4E0317 for ; Thu, 21 Apr 2016 07:11:18 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 493743A01D7 for ; Thu, 21 Apr 2016 07:11:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1740244 - /sling/site/trunk/content/documentation/development/slingstart.mdtext Date: Thu, 21 Apr 2016 07:11:18 -0000 To: commits@sling.apache.org From: kwin@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160421071118.493743A01D7@svn01-us-west.apache.org> Author: kwin Date: Thu Apr 21 07:11:17 2016 New Revision: 1740244 URL: http://svn.apache.org/viewvc?rev=1740244&view=rev Log: SLING-4677 add documentation around starting/stopping servers with slingstart-maven-plugin and debug options Modified: sling/site/trunk/content/documentation/development/slingstart.mdtext Modified: sling/site/trunk/content/documentation/development/slingstart.mdtext URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/development/slingstart.mdtext?rev=1740244&r1=1740243&r2=1740244&view=diff ============================================================================== --- sling/site/trunk/content/documentation/development/slingstart.mdtext (original) +++ sling/site/trunk/content/documentation/development/slingstart.mdtext Thu Apr 21 07:11:17 2016 @@ -1,5 +1,7 @@ Title: The Apache Sling Provisioning Model and Apache SlingStart +[TOC] + The Apache Sling provisioning model is a model to describe OSGi based application. It can also be used to define a partial application aka feature (or subsystem in OSGi terms). The model is describing an instance, it is not directly related to any particular tooling or packaging/provisioning vehicle. @@ -192,7 +194,7 @@ Notice that this definition only support ## Slingstart and Slingfeature projects -The slingstart Maven plugin introduces two new packaging types: +The slingstart-maven-plugin introduces two new packaging types: * slingstart : This type requires a model at src/main/provisioning. It reads all text files in that directory and merges them in alphabetical order. The resulting artifact is a runnable jar. The assembled model is also attached to the project artifacts. * slingfeature : This type requires a model at src/main/provisioning. It reads all text files in that directory and merges them in alphabetical order and creates a merged model which is the final artifact of this project. @@ -277,13 +279,28 @@ When the merge directive is used, the co If a merged configuration redefines a property that already exists, it overwrites it, so the last configuration supplied in a merge wins. +## slingstart-maven-plugin + +### Starting a server + +Use the goal with name `start` to start one or multiple servers. The goal is bound by default to the [`pre-integration-test` lifecycle phase](https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference). + +#### Debugging + +Since version 1.2.0 of this plugin it is possible to easily start a Sling server in debug mode ([SLING-4677](https://issues.apache.org/jira/browse/SLING-4677)). For that you either configure the property `debug` inside you server configuration in the pom.xml accordingly or by using the parameter `Dlaunchpad.debug`. Both values can either be `true` (in which case the [JDWT options](http://docs.oracle.com/javase/7/docs/technotes/guides/jpda/conninv.html#Invocation) `-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000` are appended to the VM options) or just some arbitrary string defining JDWT options. +In case both are used the parameter `Dlaunchpad.debug` takes precedence. + +### Stopping a server + +Use the goal with name `stop` to stop one or multiple servers. The goal is bound by default to the [`post-integration-test` lifecycle phase](https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference). + ## Known Issues ### Support of configuration formats The provisioning model supports two formats to define configurations, properties and the format of the Apache Felix ConfigAdmin implementation. -Starting with version 1.2.0 of the provisioning model and version 1.2.0 of the slingstart maven plugin, the implementation uses the latest format from Apache Felix, version 1.8.6 (or higher) of the ConfigAdmin. This requires you to use version 3.6.6 (or higher) of the OSGi installer core bundle to handle these configurations. +Starting with version 1.2.0 of the provisioning model and version 1.2.0 of the slingstart-maven-plugin, the implementation uses the latest format from Apache Felix, version 1.8.6 (or higher) of the ConfigAdmin. This requires you to use version 3.6.6 (or higher) of the OSGi installer core bundle to handle these configurations. If you want to stick with the old format from config admin, you can configure the maven plugin as follows: