Automate process for creating environment

I heard of puppet and chef for creating the environment on the fly. But that is on big level.

I was thinking whenever a programmer gets new machine he has to install java, maven etc which are basic tools to start with for any Java/J2EE programmer. And for version of each tools- either it's latest version or as per project structure. Is there any way to automate this file. Just like a bash file (on windows) or something which can install all these basic tools with desired version. Any hint to start with will be great.

Thank you.

If you have a safari subscription - I created a whole video that walks you through how to do this with Chef step-by-step https://learning.oreilly.com/videos/learning-chef-for/9781491959442

Pivotal wrote a whole framework called Sprout to manage their macOS development workstation setup: https://github.com/pivotal-sprout

Nordstrom wrote a development machine bootstrapping framework that you can reuse: https://github.com/Nordstrom/chefdk_bootstrap

For Windows, Steve Murawski has something you can reuse: https://stevenmurawski.com/2016/08/simplified-chef-workstation/

These links may help get you started.