Skip to content
This repository was archived by the owner on Apr 2, 2026. It is now read-only.

Commit a5023f1

Browse files
elharoFrank Natividad
andauthored
fix: move autovalue to annotation processor path (#179)
* move autovalue to annotation processor path * only one parallel job * fix: verify gs filesystem is available * fix: remove max-parallel config in workflow * fix: lint * fix: revert plugin ignore removal * autovalue 1.7.4 * debug: test provider config is loaded before tests run * address feedback * add EnableAutoValue.txt * mockito for Java 7 * add auto-value-annotations to project deps * add retries to tests * revert retry in build.sh Co-authored-by: Frank Natividad <franknatividad@google.com>
1 parent 6cdc367 commit a5023f1

5 files changed

Lines changed: 22 additions & 74 deletions

File tree

google-cloud-nio/EnableAutoValue.txt

Whitespace-only changes.

google-cloud-nio/pom.xml

Lines changed: 6 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -42,26 +42,14 @@
4242
<groupId>com.google.http-client</groupId>
4343
<artifactId>google-http-client</artifactId>
4444
</dependency>
45-
<dependency>
46-
<groupId>javax.inject</groupId>
47-
<artifactId>javax.inject</artifactId>
48-
<version>1</version>
49-
</dependency>
50-
<dependency>
51-
<groupId>com.google.auto.service</groupId>
52-
<artifactId>auto-service</artifactId>
53-
<version>1.0-rc3</version>
54-
<optional>true</optional>
55-
<scope>provided</scope> <!-- to leave out of the all-deps jar -->
56-
</dependency>
5745
<dependency>
5846
<groupId>com.google.auto.value</groupId>
59-
<artifactId>auto-value</artifactId>
60-
<scope>provided</scope> <!-- to leave out of the all-deps jar -->
47+
<artifactId>auto-value-annotations</artifactId>
6148
</dependency>
6249
<dependency>
63-
<groupId>com.google.auto.value</groupId>
64-
<artifactId>auto-value-annotations</artifactId>
50+
<groupId>javax.inject</groupId>
51+
<artifactId>javax.inject</artifactId>
52+
<version>1</version>
6553
</dependency>
6654
<dependency>
6755
<groupId>com.google.code.findbugs</groupId>
@@ -86,7 +74,7 @@
8674
<dependency>
8775
<groupId>org.mockito</groupId>
8876
<artifactId>mockito-core</artifactId>
89-
<version>3.7.0</version>
77+
<version>2.28.2</version>
9078
<scope>test</scope>
9179
</dependency><dependency>
9280
<groupId>org.hamcrest</groupId>
@@ -95,6 +83,7 @@
9583
<scope>test</scope>
9684
</dependency>
9785
</dependencies>
86+
9887
<build>
9988
<plugins>
10089
<plugin>
@@ -104,16 +93,6 @@
10493
<skip>false</skip>
10594
</configuration>
10695
</plugin>
107-
<plugin>
108-
<artifactId>maven-compiler-plugin</artifactId>
109-
<version>3.8.1</version>
110-
<configuration>
111-
<source>1.7</source>
112-
<target>1.7</target>
113-
<encoding>UTF-8</encoding>
114-
<compilerArgument>-Xlint:unchecked</compilerArgument>
115-
</configuration>
116-
</plugin>
11796
<!-- shade the jar so we can demo adding the NIO jar to add functionality. -->
11897
<plugin>
11998
<groupId>org.apache.maven.plugins</groupId>
@@ -173,17 +152,6 @@
173152
</execution>
174153
</executions>
175154
</plugin>
176-
<plugin>
177-
<groupId>org.apache.maven.plugins</groupId>
178-
<artifactId>maven-dependency-plugin</artifactId>
179-
<configuration>
180-
<ignoredUnusedDeclaredDependencies>
181-
<ignoredUnusedDeclaredDependency>com.google.auto.value:auto-value</ignoredUnusedDeclaredDependency>
182-
<ignoredUnusedDeclaredDependency>com.google.auto.service:auto-service</ignoredUnusedDeclaredDependency>
183-
</ignoredUnusedDeclaredDependencies>
184-
</configuration>
185-
</plugin>
186-
187155
</plugins>
188156
</build>
189157
</project>

google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProvider.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import static com.google.common.base.Strings.isNullOrEmpty;
2222

2323
import com.google.api.gax.paging.Page;
24-
import com.google.auto.service.AutoService;
2524
import com.google.cloud.storage.Acl;
2625
import com.google.cloud.storage.Blob;
2726
import com.google.cloud.storage.BlobId;
@@ -86,7 +85,6 @@
8685
*/
8786
@Singleton
8887
@ThreadSafe
89-
@AutoService(FileSystemProvider.class)
9088
public final class CloudStorageFileSystemProvider extends FileSystemProvider {
9189

9290
private Storage storage;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2021 Google LLC
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
#
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
14+
com.google.cloud.storage.contrib.nio.CloudStorageFileSystemProvider

pom.xml

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,10 @@
9696
</dependency>
9797
<dependency>
9898
<groupId>com.google.auto.value</groupId>
99-
<artifactId>auto-value</artifactId>
100-
<scope>provided</scope> <!-- to leave out of the all-deps jar -->
101-
<version>${auto-value-annotation.version}</version>
102-
</dependency>
103-
<dependency>
104-
<groupId>com.google.auto.value</groupId>
10599
<artifactId>auto-value-annotations</artifactId>
100+
<scope>provided</scope> <!-- to leave out of the all-deps jar -->
106101
<version>${auto-value-annotation.version}</version>
107102
</dependency>
108-
109103
<dependency>
110104
<groupId>junit</groupId>
111105
<artifactId>junit</artifactId>
@@ -120,21 +114,7 @@
120114
</dependency>
121115
</dependencies>
122116
</dependencyManagement>
123-
<build>
124-
<pluginManagement>
125-
<plugins>
126-
<plugin>
127-
<groupId>org.apache.maven.plugins</groupId>
128-
<artifactId>maven-dependency-plugin</artifactId>
129-
<configuration>
130-
<ignoredUnusedDeclaredDependencies>
131-
<ignoredDependency>com.google.auto.value:auto-value-annotations</ignoredDependency>
132-
</ignoredUnusedDeclaredDependencies>
133-
</configuration>
134-
</plugin>
135-
</plugins>
136-
</pluginManagement>
137-
</build>
117+
138118
<modules>
139119
<module>google-cloud-nio</module>
140120
<module>google-cloud-nio-retrofit</module>
@@ -207,18 +187,6 @@
207187
</links>
208188
</configuration>
209189
</plugin>
210-
<plugin>
211-
<artifactId>maven-compiler-plugin</artifactId>
212-
<configuration>
213-
<annotationProcessorPaths>
214-
<path>
215-
<groupId>com.google.auto.value</groupId>
216-
<artifactId>auto-value</artifactId>
217-
<version>${auto-value.version}</version>
218-
</path>
219-
</annotationProcessorPaths>
220-
</configuration>
221-
</plugin>
222190
</plugins>
223191
</reporting>
224192

0 commit comments

Comments
 (0)