When I add this code below in my pom.xml to support Querydsl
I had done everything suggested above but to no avail. Finally, because I was setting up a new computer, I realized I didn't have a JAVA_HOME variable set up.
So all I did was to add the JAVA_HOME variable to my system variables and set that to a JDK path: C:\Program Files\Java\jdk1.8.0_172
And voila - mvn generate-resources started working again.