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

Pivotal wrote a whole framework called Sprout to manage their macOS development workstation setup:

Nordstrom wrote a development machine bootstrapping framework that you can reuse:

For Windows, Steve Murawski has something you can reuse:

These links may help get you started.