you need plugin, try this:
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>maven-apt-plugin</artifactId>
<version>1.0.4</version>
<executions>
<execution>
<id>process-common-model</id>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<sourceDirectory>${project.build.directory}/{yourSourceDir}</sourceDirectory>
</configuration>
</execution>
</executions>
<configuration>
<outputDirectory>target/generated-sources/querydsl</outputDirectory>
<processors>
<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
</processors>
<options>
<querydsl.entityAccessors>true</querydsl.entityAccessors>
<querydsl.createDefaultVariable>true</querydsl.createDefaultVariable>
<querydsl.packageSuffix>.qdsl</querydsl.packageSuffix>
</options>
</configuration>
</plugin>
I copied this from my project. just added it to your pom
and have a try.
There are additional options in the code above, if you just wanna a simple one, focus on the querydsl reference
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…