I am trying to integrate an existing project in maven with query dsl I have added the dependencies as below `
<dependency>
<groupId>com.mysema.querydsl</groupId>
<artifactId>querydsl-apt</artifactId>
<version>2.5.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mysema.querydsl</groupId>
<artifactId>querydsl-jpa</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.1</version>
</dependency>`
and also configured the above as per the documentation and did Maven Clean it is build successfully but It fails when I do Maven Install error above
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>maven-apt-plugin</artifactId>
<version>1.0.3</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources/java</outputDirectory>
<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
When I do Maven Install - BUILD FAILURE and cant resolve the dependency for query DSL isn't maven supposed to do this on its own.
[WARNING] The POM for com.mysema.querydsl:querydsl-apt:jar:2.5.0 is missing, no dependency information available
[WARNING] The POM for com.mysema.querydsl:querydsl-jpa:jar:2.5.0 is missing, no dependency information available
[INFO] BUILD FAILURE
what am I missing?
maven-apt-plugin
is nowapt-maven-plugin
. – Maihem<pluginManagement>
tags and the q classes were generated. I did have to add<dependency><groupId>org.hibernate.javax.persistence</groupId><artifactId>hibernate-jpa-2.1-api</artifactId><version>1.0.0.Final</version></dependency>>
so I could annotate my entity with@Entity
. – Maihem