If you are a Java developer working on MicroServices then its highly probable that you will be dealing with older services which are written on
JDK 1.7 or older with Maven 2.x and newer services written in JDK 1.8 and Maven 3.x.
In order to work on both the newer and older services, you would need to have all of Maven 2.x, Maven 3.x , JDK 1.8, JDK 1.7 installed on
Even though you have multiple versions installed, you system environment variables can point to only one of the version.
However, you can use the following script to easily switch between different version on same of different terminal window.
1. There are two different version of maven installed in two different locations :