Apache Sling: viewing bundles by start level

When packaging an Apache Sling application it is useful to see the final list of bundles included in your launchpad grouped by their start levels. This is especially true if the bundle list is configured using sensible defaults, for instance using the default bundle list as a start.

When the launchpad is packaged using the maven-bundle-plugin, the bundles are placed grouped by their start level under target/classes/resources/bundles . The ever-useful tree command allows us to inspect this directory ( I’ve removed some of the bundles to make the output easier to understand )

target/classes/resources/bundles/
├── 0
│   ├── org.apache.sling.scripting.jsp-2.0.14.jar
│   ├── org.apache.sling.scripting.jsp.taglib-2.1.0.jar
│   ├── org.apache.sling.servlets.get-2.1.2.jar
│   ├── org.apache.sling.servlets.post-2.1.0.jar
│   ├── org.apache.sling.servlets.resolver-2.1.0.jar
│   └── org.apache.sling.settings-1.0.2.jar
├── 1
│   └── org.apache.sling.commons.log-2.1.2.jar
├── 10
│   ├── org.apache.felix.configadmin-1.2.8.jar
│   ├── org.apache.felix.eventadmin-1.2.10.jar
│   ├── org.apache.felix.metatype-1.0.4.jar
│   └── org.apache.felix.scr-1.6.0.jar
├── 15
│   ├── commons-discovery-0.5.jar
│   ├── derby-10.5.3.0_1.jar
│   ├── guava-12.0.jar
│   ├── jackrabbit-api-2.1.1.jar
│   ├── jackrabbit-jcr-commons-2.1.1.jar
│   ├── jackrabbit-jcr-rmi-2.1.1.jar
│   └── tika-bundle-0.6.jar
└── 5
    ├── org.apache.sling.extensions.threaddump-0.2.0.jar
    ├── org.apache.sling.extensions.webconsolebranding-1.0.0.jar
    ├── org.apache.sling.extensions.webconsolesecurityprovider-1.0.0.jar
    └── org.apache.sling.jcr.webconsole-1.0.0.jar

Although the directories are not ordered numerically – an option which I have not found in my version of the tree command – the output is easy to understand and offers an overview of the start levels and bundles associated with them.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: