Skip to content

Commit

Permalink
Remove dependency on javax.inject from querydsl. (#1992)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mikereiche authored Oct 17, 2024
1 parent 756a8c5 commit bc0c757
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
17 changes: 1 addition & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,7 @@
<artifactId>querydsl-apt</artifactId>
<version>${querydsl}</version>
<classifier>jakarta</classifier>
<exclusions>
<exclusion>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>test</scope>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down Expand Up @@ -261,9 +249,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<proc>none</proc>
</configuration>
<executions>
<execution>
<id>test-annotation-processing</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment
return ALLOW_OTHER_PROCESSORS_TO_CLAIM_ANNOTATIONS;
}

Configuration conf = createConfiguration(roundEnv);
Configuration conf = createConfiguration(roundEnv);
try {
conf.getTypeMappings();
} catch (NoClassDefFoundError cnfe ){
Expand Down

This file was deleted.

0 comments on commit bc0c757

Please sign in to comment.