Remove dependency on javax.inject from querydsl. (#1992)

To use querydsl, the spring application will need to add a dependency

    <dependency>
        <groupId>com.querydsl</groupId>
        <artifactId>querydsl-apt</artifactId>
        <version>${querydsl}</version>
        <classifier>jakarta</classifier>
        <scope>provided</scope>
    </dependency>

And explicitly specify CouchbasseAnnotationProcessor

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <executions>
            <execution>
                <id>annotation-processing</id>
                <phase>generate-sources</phase>
                <goals>
                    <goal>compile</goal>
                </goals>
                <configuration>
                    <proc>only</proc>
                    <annotationProcessors>
                        <annotationProcessor>org.springframework.data.couchbase.repository.support.CouchbaseAnnotationProcessor</annotationProcessor>
                    </annotationProcessors>
                    <generatedTestSourcesDirectory>target/generated-test-sources</generatedTestSourcesDirectory>
                    <compilerArgs>
                        <arg>-Aquerydsl.logInfo=true</arg>
                    </compilerArgs>
                </configuration>
            </execution>
        </executions>
    </plugin>

Closes #1989.
This commit is contained in:
Michael Reiche
2024-10-17 10:17:08 -07:00
committed by GitHub
parent 756a8c5ae9
commit bc0c757df3
3 changed files with 2 additions and 18 deletions

View File

@@ -79,7 +79,7 @@ public class CouchbaseAnnotationProcessor extends AbstractQuerydslProcessor {
return ALLOW_OTHER_PROCESSORS_TO_CLAIM_ANNOTATIONS;
}
Configuration conf = createConfiguration(roundEnv);
Configuration conf = createConfiguration(roundEnv);
try {
conf.getTypeMappings();
} catch (NoClassDefFoundError cnfe ){

View File

@@ -1 +0,0 @@
org.springframework.data.couchbase.repository.support.CouchbaseAnnotationProcessor