Depends of what you mean by "build". In developing language build is almost the same as compile. So, your IDE builds the project when you try to run the Startup class. This process builds all the libraries and jar files.
If you mean creating an exe or installer, then this is not covered and is left for developers to figure out on their own. At this site commercial install4j is used to create exe and installer, but it costs money, so probably not an option for most developers and it is not used directly. Our Bamboo system uses install4j to produce installers automatically. I personally don't know how it works exactly. You can search the forums and internet about installers. I know some were using IzPack in the past, maybe Advanced Installer (although it is paid also) r some other options to produce exe or installers for Java projects.