Skip to content

Commit c601662

Browse files
committed
Rework annotation processing and dependencies in IT tests
Even if included only for annotations, don't mark dependencies as provided or optional, following best practices: they can be needed by static analysis tools downstream (like ErrorProne). Move annotation processor to annotationProcessorPaths in maven-compiler-plugin. By simplicity, include it in all modules in E2E test, even if not needed everywhere.
1 parent 620ef6f commit c601662

File tree

5 files changed

+21
-56
lines changed

5 files changed

+21
-56
lines changed

src/it/e2e/e2e-client/pom.xml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,9 @@
3232
<artifactId>guava-gwt</artifactId>
3333
<scope>provided</scope>
3434
</dependency>
35-
<dependency>
36-
<groupId>com.google.auto.value</groupId>
37-
<artifactId>auto-value</artifactId>
38-
<!-- This is only need at compile-time, there's no runtime dependency -->
39-
<scope>provided</scope>
40-
<optional>true</optional>
41-
</dependency>
4235
<dependency>
4336
<groupId>com.google.auto.value</groupId>
4437
<artifactId>auto-value-annotations</artifactId>
45-
<!-- This is only need at compile-time, there's no runtime dependency -->
46-
<scope>provided</scope>
47-
<optional>true</optional>
4838
</dependency>
4939
</dependencies>
5040

src/it/e2e/e2e-model/pom.xml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,10 @@
2020
<dependency>
2121
<groupId>com.google.guava</groupId>
2222
<artifactId>guava</artifactId>
23-
<!-- We only use it for annotations, so we only need it at compile-time -->
24-
<scope>provided</scope>
25-
<optional>true</optional>
26-
</dependency>
27-
<dependency>
28-
<groupId>com.google.auto.value</groupId>
29-
<artifactId>auto-value</artifactId>
30-
<!-- This is only need at compile-time, there's no runtime dependency -->
31-
<scope>provided</scope>
32-
<optional>true</optional>
3323
</dependency>
3424
<dependency>
3525
<groupId>com.google.auto.value</groupId>
3626
<artifactId>auto-value-annotations</artifactId>
37-
<!-- This is only need at compile-time, there's no runtime dependency -->
38-
<scope>provided</scope>
39-
<optional>true</optional>
4027
</dependency>
4128
</dependencies>
4229
<build>

src/it/e2e/pom.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@
3333
<version>2.5</version>
3434
<scope>provided</scope>
3535
</dependency>
36-
<dependency>
37-
<groupId>com.google.auto.value</groupId>
38-
<artifactId>auto-value</artifactId>
39-
<version>1.9</version>
40-
</dependency>
4136
<dependency>
4237
<groupId>com.google.auto.value</groupId>
4338
<artifactId>auto-value-annotations</artifactId>
@@ -66,6 +61,13 @@
6661
<configuration>
6762
<source>1.7</source>
6863
<target>1.7</target>
64+
<annotationProcessorPaths>
65+
<path>
66+
<groupId>com.google.auto.value</groupId>
67+
<artifactId>auto-value</artifactId>
68+
<version>1.9</version>
69+
</path>
70+
</annotationProcessorPaths>
6971
</configuration>
7072
</plugin>
7173
<plugin>

src/it/gwt-app/pom.xml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,11 @@
3131
<groupId>com.google.guava</groupId>
3232
<artifactId>guava-gwt</artifactId>
3333
<version>31.1-jre</version>
34-
<!-- We only use it for annotations, so we only need it at compile-time -->
35-
<scope>provided</scope>
36-
<optional>true</optional>
37-
</dependency>
38-
<dependency>
39-
<groupId>com.google.auto.value</groupId>
40-
<artifactId>auto-value</artifactId>
41-
<version>1.9</version>
42-
<!-- This is only need at compile-time, there's no runtime dependency -->
43-
<scope>provided</scope>
44-
<optional>true</optional>
4534
</dependency>
4635
<dependency>
4736
<groupId>com.google.auto.value</groupId>
4837
<artifactId>auto-value-annotations</artifactId>
4938
<version>1.9</version>
50-
<!-- This is only need at compile-time, there's no runtime dependency -->
51-
<scope>provided</scope>
52-
<optional>true</optional>
5339
</dependency>
5440
<dependency>
5541
<groupId>junit</groupId>
@@ -85,6 +71,13 @@
8571
<configuration>
8672
<source>1.7</source>
8773
<target>1.7</target>
74+
<annotationProcessorPaths>
75+
<path>
76+
<groupId>com.google.auto.value</groupId>
77+
<artifactId>auto-value</artifactId>
78+
<version>1.9</version>
79+
</path>
80+
</annotationProcessorPaths>
8881
</configuration>
8982
</plugin>
9083
</plugins>

src/it/gwt-lib/pom.xml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,11 @@
3131
<groupId>com.google.guava</groupId>
3232
<artifactId>guava-gwt</artifactId>
3333
<version>31.1-jre</version>
34-
<!-- We only use it for annotations, so we only need it at compile-time -->
35-
<scope>provided</scope>
36-
<optional>true</optional>
37-
</dependency>
38-
<dependency>
39-
<groupId>com.google.auto.value</groupId>
40-
<artifactId>auto-value</artifactId>
41-
<version>1.9</version>
42-
<!-- This is only need at compile-time, there's no runtime dependency -->
43-
<scope>provided</scope>
44-
<optional>true</optional>
4534
</dependency>
4635
<dependency>
4736
<groupId>com.google.auto.value</groupId>
4837
<artifactId>auto-value-annotations</artifactId>
4938
<version>1.9</version>
50-
<!-- This is only need at compile-time, there's no runtime dependency -->
51-
<scope>provided</scope>
52-
<optional>true</optional>
5339
</dependency>
5440
<dependency>
5541
<groupId>junit</groupId>
@@ -82,6 +68,13 @@
8268
<configuration>
8369
<source>1.7</source>
8470
<target>1.7</target>
71+
<annotationProcessorPaths>
72+
<path>
73+
<groupId>com.google.auto.value</groupId>
74+
<artifactId>auto-value</artifactId>
75+
<version>1.9</version>
76+
</path>
77+
</annotationProcessorPaths>
8578
</configuration>
8679
</plugin>
8780
</plugins>

0 commit comments

Comments
 (0)