Skip to content

Commit ea42b98

Browse files
committed
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.
1 parent 4369da0 commit ea42b98

File tree

3 files changed

+2
-18
lines changed

3 files changed

+2
-18
lines changed

pom.xml

+1-16
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,7 @@
4848
<artifactId>querydsl-apt</artifactId>
4949
<version>${querydsl}</version>
5050
<classifier>jakarta</classifier>
51-
<exclusions>
52-
<exclusion>
53-
<groupId>javax.inject</groupId>
54-
<artifactId>javax.inject</artifactId>
55-
</exclusion>
56-
</exclusions>
57-
</dependency>
58-
59-
<dependency>
60-
<groupId>javax.inject</groupId>
61-
<artifactId>javax.inject</artifactId>
62-
<version>1</version>
63-
<scope>test</scope>
51+
<scope>provided</scope>
6452
</dependency>
6553

6654
<dependency>
@@ -262,9 +250,6 @@
262250
<plugin>
263251
<groupId>org.apache.maven.plugins</groupId>
264252
<artifactId>maven-compiler-plugin</artifactId>
265-
<configuration>
266-
<proc>none</proc>
267-
</configuration>
268253
<executions>
269254
<execution>
270255
<id>test-annotation-processing</id>

src/main/java/org/springframework/data/couchbase/repository/support/CouchbaseAnnotationProcessor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment
7979
return ALLOW_OTHER_PROCESSORS_TO_CLAIM_ANNOTATIONS;
8080
}
8181

82-
Configuration conf = createConfiguration(roundEnv);
82+
Configuration conf = createConfiguration(roundEnv);
8383
try {
8484
conf.getTypeMappings();
8585
} catch (NoClassDefFoundError cnfe ){

src/main/resources/META-INF/services/javax.annotation.processing.Processor

-1
This file was deleted.

0 commit comments

Comments
 (0)