Specify a File Bundle
You have created a
jvm_app target definition for bundling a Scala or Java project and you want to include assets such as config files or shell scripts in the bundle.
bundles list to your
jvm_app target definition (more info on
jvm_app definitions can be found in Define a Scala or Java Bundle Target).
Here is an example
jvm_app definition that shows different possibilities for defining file bundles (and explains them below):
jvm_app(name='bundle', bundle(fileset=rglobs('src/main/resources/*')), # 1 bundle(fileset=globs('config/*') - globs('*.xml'), # 2 bundle(relative_to='src', fileset=globs('src/scripts/*.sh')) # 3 )
rglobsdefinition will recursively include all files in the
src/main/resourcesdirectory, including all sub-directories. More info can be found in Use globs and rglobs to group files.
- All files in the
configdirectory are included except any
.shfiles in the
src/scriptsdirectory will be included. The
relative_toeffectively strips away the specified directory, in this case
src, which means that all files in
src/scriptswould end up in the root of the bundle. If you specified
relative_to='src/scripts'instead, for example, all files would end up in the root directory.