Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Plugin fails with QueryDSL 4 #53

Open
jvence opened this issue Dec 15, 2016 · 4 comments
Open

Plugin fails with QueryDSL 4 #53

jvence opened this issue Dec 15, 2016 · 4 comments

Comments

@jvence
Copy link

jvence commented Dec 15, 2016

Plugin was working perfectly until we upgraded QuertDsl to version 4 (which is now standard on Spring Boot) and everything breaks.

@Shredder121
Copy link
Member

everything breaks

Could you be a bit more specific?
Or maybe add a reproduction project so we can see for ourselves what goes wrong?

@jbrokamp
Copy link

jbrokamp commented Mar 27, 2017

What @jvence is most likely referring to is, when upgrading your application from spring-boot 1.3 (or before) to 1.4 or higher. This breaks correct generation of the query classes, who still refer to an older version of querydsl (pre-4).

If will probably suffice to update the plugin configuration to the new path of the JPAAnnotationProcessor. Which is at com.querydsl.apt.jpa.JPAAnnotationProcessor since querydsl 4.

@Shredder121, you should update the processor configuration for querydsl 4 in the readme, or add a note of some sort:

<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-sources/java</outputDirectory>
                <processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
            </configuration>
        </execution>
    </executions>
</plugin>

@Shredder121
Copy link
Member

Ah, that's something we can work with! Thanks.

@karibe
Copy link

karibe commented Jan 3, 2018

I had similar problem after adjusting my configuration with official recomendations
It could't find javax.inject and small modification helped:

<plugin>
	<groupId>com.mysema.maven</groupId>
	<artifactId>apt-maven-plugin</artifactId>
	<version>${apt-maven-plugin.version}</version>
	<executions>
		<execution>
			<goals>
				<goal>process</goal>
			</goals>
			<configuration>
				<outputDirectory>target/generated-sources/apt</outputDirectory>
				<processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
			</configuration>
		</execution>
	</executions>
	<dependencies>
		<dependency>
			<groupId>javax.inject</groupId>
			<artifactId>javax.inject</artifactId>
			<version>1</version>
		</dependency>
	</dependencies>
</plugin>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants