Dir Protocol

In progress!

Pax URL Dir is an OSGi URL handler that allows you to build a bundle on-the-fly out of a local folder's contents and url parameters.
It uses BND similar to Pax URL wrap to calculate the OSGi headers in META-INF/MANIFEST.MF

While it relies on local folders it implements some search algorithms to be independend from the real inner layout of a folder.
For example, in maven2 projects, you classes are located usually at target/test-classes .
Sometimes, you operate from a parent folder, so that the classes you need sit in/target/test-classes.

What you almost always know is:
1. the top most parent folder (project root)
2. the full qualified classname.

By pointing Pax URL Dir to /myhome/superproject/ and org/ops4j/pax/secret/MyTest.class it finds the final root of classes to include which could be /myhome/superproject/supersecret/target/test-classes/

This makes the url independend from real project structure and build tool (see maven2 vs. eclipse ide build)

Syntax ( see #examples )

 

Examples