Reputation: 5399
I'm having problems generating the querydsl metamodel (i.e. the Q-classes) for an Entity comming from a jar included in the dependencies for my project.
The class (BaseEntity) is an abstract baseclass for most of my entities (annotated with @MappedSuperclass) and for project reasons and dependencies to other projects this baseclass has to be in a separate jar.
When I now include this jar as a dependency for the project which contains my non-abstract entities and try to generate the metamodel (using the com.mysema.maven:apt-maven-plugin) it doesn't recognize the BaseEntity and complains with "Cannot find symbol" QBaseEntity.
I kindof solved this by making maven unpack the source file (i.e. BaseEntity.java) into an additional source folder of the dependent project but this is kind of ugly as I have to always remember to change the version number in case of releases and also have the source dependency in my pom and it's also not very intuitive.
So my question(s) is/are:
Any help is greatly appreciated, thanks
Upvotes: 3
Views: 1591
Reputation: 1
You should add -info.java
file
in your package
@QueryEntities(value = {BaseEntity.class})
package xxxx.xxxx.xxx;
import com.querydsl.core.annotations.QueryEntities;
import xxx.xxxx.BaseEntity;
Upvotes: -1
Reputation: 22180
You can use the QueryEntities annotation to refer to BaseEntity
from the main source project. A package level annotation is advisable.
Upvotes: 2