The default layout section of a build script lets you create a hierarchy of directories or archives, combining the project parts declared in the project structure section or brought in (imported) from dependencies, and arbitrary files located on the file system.

The file or files from construct can be used to include arbitrary files:

It is a relatively little known fact that we can also pick a file or directory from a JAR archive by using an archive-relative path. This path consists of the path to an archive and the path within the archive, separated by !/:

This may come useful if you want to extract an archive as part of your build, or combine multiple archives into one. For example, you can combine the runtime dependencies of a solution with the compile output of that solution to create an “uber-JAR” or “fat JAR”.

For example, here is how the MPS robot_Kaja sample could be packaged together with its dependencies in the build script: