Knowage relies on Maven for depedency managament and building process.
You can checkout Knowage source codes at https://github.com/KnowageLabs/Knowage-Server and build all the engines in one shot by executing mvn clean install under knowage-ce-parent.
Obviously, as Knowage uses Maven, you can use Maven features/plugin do extend the building process with you customization. To do so, please refer to Maven documentation