Using Pax Runner provisioning methods

Using Pax Runner provisioning methods

Unknown macro: {scrollbar}

You can take advantage of any of Pax Runner Provisioning methods by using related scanner options.

Scanning a directory

Directory scanner will scan a directory or a zip file for all files and provision them as bundles. This is making use of Pax Runner Directory Scanner.

Example: all files from a file system directory

        return options(
            provision(
                scanDir( "/home/adreghiciu/bundles" )
            )
        );

Example: all files for a file system directory whose names matches a filter (*.jar)

        return options(
            provision(
                scanDir( "/home/adreghiciu/bundles" ).filter( "*.jar" )
            )
        );

Example: all files from a zip file available on file system

        return options(
            provision(
                scanDir( "/home/adreghiciu/bundles.zip" )
            )
        );

More examples of usage you can find on Pax Runner Directory Scanner (do not prefix the url with scan-dir:)

Scanning a file specifying bundles

File scanner will read and parse a file containing bundle urls and provision them as bundles. This is making use of Pax Runner File Scanner. Please refer to it for file format.

Example: all bundles listed in a text file

        return options(
            provision(
                scanFile( "/home/adreghiciu/test.bundles" )
            )
        );

More examples of usage you can find on Pax Runner File Scanner (do not prefix the url with scan-file:)

Scanning features

Features scanner will determine the bundles to be provisioned out of ServiceMix features. This is making use of Pax Runner Features Scanner. This scanner is only available starting with Pax Exam - 0.5.0.

Example: servicemix-file and servicemix-http version 1.0.0 from a local available features repository

return options(
  provision(
    scanFeatures( "file:apache-servicemix-4.0.0-features.xml", "servicemix-file", "servicemix-http/1.0.0" )
  )
);

Example: servicemix-file and servicemix-http version 1.0.0 from a maven accessed features repository

return options(
  provision(
    scanFeatures( "mvn:org.apache.servicemix/apache-servicemix/4.0.0/xml/features", "servicemix-file", "servicemix-http/1.0.0" )
  )
);

More examples of usage you can find on Pax Runner Featurs Scanner (do not prefix repository url with scan-features: nor use '!/').

Scanning a bundle

        return options(
            provision(
                scanBundle( "home/adreghiciu/mybundle.jar" )
            )
        );