I have some test-classes using Querydsl for my unit tests.
Querydsl normally generates a query type class but if the classes are in the test directory the class will not be generated.
As soon as I put the files in the src/main and compile with maven it works fine.
Because I use the classes only in my tests I don't want to put these files in this directory. Can someone help me with that ?
My directory structure
src/main/java
src/main/resources
src/test/java/
src/test/resources
As I said putting the files in this directory "src/main/java" the query type class will be generated, but putting the files in this directory src/test/java/ the type class will not be generated.
Maven APT plugin which generates the query types used by Querydsl
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.1.3</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-test-sources/java</outputDirectory>
<processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.querydsl</groupId>
<artifactId>querydsl-apt</artifactId>
<version>4.1.0</version>
</dependency>
</dependencies>
</plugin>