The issue, I got is Earlier, I was using jdk 1.8.0_31 with certificate installed. I switched to jdk 1.8.0_191 but did not install certificate.
But, my projects were working fine, I realized that their dependencies were downloaded already. So, they would only compile and package those projects. But, this did not work for new maven projects as their dependencies were not downloaded earlier.
Solution::