Skip to content

Commit b4fd2c5

Browse files
committed
refactor (#1327): Remove autoservice
1 parent 15135eb commit b4fd2c5

File tree

4 files changed

+27
-16
lines changed

4 files changed

+27
-16
lines changed

operator-framework/pom.xml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@
2626
<groupId>org.slf4j</groupId>
2727
<artifactId>slf4j-api</artifactId>
2828
</dependency>
29-
<dependency>
30-
<groupId>com.google.auto.service</groupId>
31-
<artifactId>auto-service</artifactId>
32-
<scope>compile</scope>
33-
</dependency>
34-
3529
<dependency>
3630
<groupId>com.squareup</groupId>
3731
<artifactId>javapoet</artifactId>
@@ -87,4 +81,29 @@
8781
</dependency>
8882
</dependencies>
8983

90-
</project>
84+
<build>
85+
<plugins>
86+
<plugin>
87+
<artifactId>maven-compiler-plugin</artifactId>
88+
<version>${maven-compiler-plugin.version}</version>
89+
<executions>
90+
<!-- During compilation we need to disable annotation processors (at least the ControllerConfigurationAnnotationProcessor).
91+
However, this is needed to compile the tests so let's disable apt just for the compile phase -->
92+
<execution>
93+
<id>default-compile</id>
94+
<phase>compile</phase>
95+
<goals>
96+
<goal>compile</goal>
97+
</goals>
98+
<configuration>
99+
<compilerArgs>
100+
<arg>-proc:none</arg>
101+
</compilerArgs>
102+
</configuration>
103+
</execution>
104+
</executions>
105+
</plugin>
106+
</plugins>
107+
</build>
108+
109+
</project>

operator-framework/src/main/java/io/javaoperatorsdk/operator/config/runtime/ControllerConfigurationAnnotationProcessor.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import javax.annotation.processing.AbstractProcessor;
66
import javax.annotation.processing.ProcessingEnvironment;
7-
import javax.annotation.processing.Processor;
87
import javax.annotation.processing.RoundEnvironment;
98
import javax.annotation.processing.SupportedAnnotationTypes;
109
import javax.annotation.processing.SupportedSourceVersion;
@@ -21,14 +20,12 @@
2120
import io.fabric8.kubernetes.client.CustomResource;
2221
import io.javaoperatorsdk.operator.api.reconciler.Reconciler;
2322

24-
import com.google.auto.service.AutoService;
2523
import com.squareup.javapoet.TypeName;
2624

2725
import static io.javaoperatorsdk.operator.config.runtime.RuntimeControllerMetadata.RECONCILERS_RESOURCE_PATH;
2826

2927
@SupportedAnnotationTypes("io.javaoperatorsdk.operator.api.reconciler.ControllerConfiguration")
3028
@SupportedSourceVersion(SourceVersion.RELEASE_11)
31-
@AutoService(Processor.class)
3229
public class ControllerConfigurationAnnotationProcessor extends AbstractProcessor {
3330

3431
private static final Logger log =
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
io.javaoperatorsdk.operator.config.runtime.ControllerConfigurationAnnotationProcessor

pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
<log4j.version>2.18.0</log4j.version>
4949
<mokito.version>4.6.1</mokito.version>
5050
<commons-lang3.version>3.12.0</commons-lang3.version>
51-
<auto-service.version>1.0.1</auto-service.version>
5251
<compile-testing.version>0.19</compile-testing.version>
5352
<javapoet.version>1.13.0</javapoet.version>
5453
<assertj.version>3.23.1</assertj.version>
@@ -106,11 +105,6 @@
106105
<artifactId>commons-lang3</artifactId>
107106
<version>${commons-lang3.version}</version>
108107
</dependency>
109-
<dependency>
110-
<groupId>com.google.auto.service</groupId>
111-
<artifactId>auto-service</artifactId>
112-
<version>${auto-service.version}</version>
113-
</dependency>
114108
<dependency>
115109
<groupId>com.google.testing.compile</groupId>
116110
<artifactId>compile-testing</artifactId>

0 commit comments

Comments
 (0)