This is an irritating error that pops up once in a while , jotting down some steps which help:
Writing answer from eclipse perspective as base logic will remain the same whether done by Intellij or command line
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target>
In some instances, you will start seeing error as we tried force update saying , failure to transfer X dependency from Y path , resolutions will not be reattempted , bla bla bla
In such case quickly fix it by cd to .m2/repository folder and run following command :
for /r %i in (*.lastUpdated) do del %i