I have install maven in my machine. I have properly set the class-path and maven home folder. Every time I execute mvn clean install, it gives me exception. I h
mvn clean install
It might be that you are forgetting to specify the settings which was the case with me.
Try:
mvn clean install -s settings_file.xml