Skip to content

Commit 12dbc1a

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

File tree

4 files changed

+27
-17
lines changed

4 files changed

+27
-17
lines changed

operator-framework/pom.xml

Lines changed: 26 additions & 8 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>
@@ -65,7 +59,6 @@
6559
<dependency>
6660
<groupId>io.fabric8</groupId>
6761
<artifactId>crd-generator-apt</artifactId>
68-
<scope>test</scope>
6962
</dependency>
7063
<dependency>
7164
<groupId>org.apache.logging.log4j</groupId>
@@ -87,4 +80,29 @@
8780
</dependency>
8881
</dependencies>
8982

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