Apache Sling Provisioning: Framework for Building Custom Launchpad

0

The Apache Sling provisioning model makes it much easier to create custom distributions of Apache Sling 8 than distributions for Apache Sling 6.

When I build custom versions of Apache Sling for myself, the amount of the Apache Sling source I download and use is small. It is not necessary to download everything. The part I do download is the Launchpad builder (source at Github).

In the source code of the builder is a directory under /src/main called provisioning. That is where the ability to customize Apache Sling for yourself lurks.

Generally is best to download the version of the Launchpad Builder that built the latest stable version of Apache Sling 8. Use the files in the provisioning folder to mix and match bundles and bundle versions for your custom build. In the provisioning folder you will see a handful of .txt files.

Provisioning files

When Maven is used to build Apache Sling, these files are used to define the contents of the sling build.

These specify which version of Launchpad is used and which bundle are included. The provisioning files in the Launchpad Builder folder for Apache Sling will build a basic version of Apache Sling.

The format for these files have been documented at The Apache Sling Provisioning Model and Apache SlingStart [Apache Sling].

Any provisioning model files added to the provisioning folder will be used. The only edits I make to the supplied provisioning files is to change the versions of the bundles or comment out any bundles I don’t want to include. Since it is a basic version of Sling, I have not commented out any bundles in my builds. For bundles I add to my distro, I create my own provisioning file.

After customizing the provisioning files to my liking, I build my personal distro of Apache Sling by running mvn install in the Launchpad Build project folder.

It is easy to fall into the hellish pit of bundle despair if a bundle version I specify causes a cascade of bundle dependency mismatches that I have to sort out. So I generally start out conservatively by using the versions specified in the original provisioning files and slowly add bundles one by one to make sure all my dependencies jibe.

About The Author

Deke departed Southern Alabama as a young man, leaving the humidity and fire ants behind. The fire ants are catching up with him. He works for Adobe. Despite that, his opinions expressed on this site are his own and should never, ever, be attributed or blamed on Adobe. Ask him what he thinks of chiggars sometime. Home Page | GitHub | Adobe Blog | Twitter | LinkedIn