Composite provisioning - Advanced
Advanced usage
If the standard features of composite scanner are not enough here are some advanced things toy can do:
Using placeholders
If you are in need to use system properties in your provision specs the the composite files you can do so by using ${property.name}, where the property name is the name of the system property to be replaced as for example user.home. Here is an example of such a file:
scan-bundle:file:${user.home}/my-repository/foo.jar
in this example the ${user.home} will be replaced in my case with /Users/adreghiciu so the actual provisioning spec will be scan-bundle:file:/Users/adreghiciu/my-repository/foo.jar
There are also two special placeholders that you can use that are easier to explain via examples:
this.relative— If you have the following composite file:bar.composite
scan-bundle:${this.relative}foo.jarand you access the file via:
scan-composite:http://www.somewhere.org/repository/bar.composite the placeholder will be replaced with http://www.somewhere.org/repository resulting inscan-bundle:http://www.somewhere.org/repository/foo.jarscan-composite:file:/Users/adreghiciu/repository/bar.compositethe placeholder will be replaced withfile:/Users/adreghiciu/repository/resulting inscan-bundle:/Users/adreghiciu/repository/foo.jar
this.absolute— If you have the following composite file:bar.composite
scan-bundle:${this.absolute}foo.jarand you access the file via:
scan-composite:http://www.somewhere.org/repository/bar.composite the placeholder will be replaced with http://www.somewhere.org/ resulting inscan-bundle:http://www.somewhere.org/foo.jarscan-composite:file:/Users/adreghiciu/my-repository/bar.compositethe placeholder will be replaced withfile:/resulting inscan-bundle:/foo.jar
Relative URLs
Sometimes you do not want to hardcode absolute urls in your composite file but