When I add this code below in my pom.xml to support Querydsl
If you build by shell commond like mvn install. Then run this command in the shell or cmd window: echo $CLASSPATH. This command shows your classpath.
If you are using Eclipse, open Window > Preferences > Java > Installed JREs, make sure your installed JREs are of jdk root location. For me, it is C:\Java\jdk1.7.0_51
Hope it helps.