you should use the sling provisioning file format together with the slingstart maven plugin [1]. these are very powerful tools and allows you to quickly build your own set of sling bundles together with your own application bundles and all required OSGi configuration and sling run modes by describing it in a text file and building either a standalone jar or WAR file out of it. the launchpad itself is build exactly this way. unfortunately there is no overall documentation how to do this the best way besides the documentation of the individual parts like [1]. and if you start building your own Launchpad with only the bundles you need you of course need to know which bundles you need - which may be a difficult task for someone new to sling regarding the great number of OSGi bundles.
the sling Launchpad itself is a good starting point for this. if you want to use all bundles includes you can directly reference the provisioning feature file and add your bundles [2]. but in most cases you will use only a subset, and then you can start copying the definition file of the Launchpad [3] and remove everything you do not need. a good source for inspiration are also integration tests projects which often make use of the provisioning file format as well to setup a sling instance for testing, either based on the sling Launchpad as in [4], or by using a minimal set of bundles like [5]. stefan [1] https://sling.apache.org/documentation/development/slingstart.html [2] http://repo1.maven.org/maven2/org/apache/sling/org.apache.sling.launchpad/8/org.apache.sling.launchpad-8-slingfeature.txt [3] https://github.com/apache/sling/tree/trunk/launchpad/builder/src/main/provisioning [4] https://github.com/apache/sling/tree/trunk/bundles/extensions/caconfig/integration-tests [5] https://github.com/wcm-io-caravan/caravan-tooling/tree/develop/integration-test/minimal-launchpad >-----Original Message----- >From: lancedolan [mailto:lance.do...@gmail.com] >Sent: Thursday, January 12, 2017 4:18 AM >To: users@sling.apache.org >Subject: Re: How to change run mode in Sling8 > >I guess downloading and copying the source for the software I want to >use >and just using that as the basis for my own custom version of that >software >just feels like a bad development practice. Like, how do I upgrade to >future >versions of Sling? By respecting the Sling war as a deployable artifact, >I >could just swap in future version in our provisioning scripts. I feel >like >there are other examples of how that's awkward as well, but it's late >and >I'm getting foggy hah. > >If the war file provided as a release isn't intended to be more than an >example, copying and modifying the source is the way Sling is intended >to be >used by the developers, then fair enough. > >This sounds like valuable information for beginning developers that find >https://sling.apache.org. It's easy to get lost. > > > > > >-- >View this message in context: http://apache- >sling.73963.n3.nabble.com/How-to-change-run-mode-in-Sling8- >tp4069494p4069533.html >Sent from the Sling - Users mailing list archive at Nabble.com.