From 1893bb3f55567ad88e850469ad5624928ab5db48 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Tue, 26 Jan 2021 13:15:55 -0800 Subject: [PATCH] fix: verify gs filesystem is available --- google-cloud-nio/pom.xml | 11 ----------- .../java.nio.file.spi.FileSystemProvider | 16 ++++++++++++++++ .../contrib/nio/CloudStorageOptionsTest.java | 2 ++ pom.xml | 1 - 4 files changed, 18 insertions(+), 12 deletions(-) create mode 100644 google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider diff --git a/google-cloud-nio/pom.xml b/google-cloud-nio/pom.xml index 96de04a4..afcaf1d5 100644 --- a/google-cloud-nio/pom.xml +++ b/google-cloud-nio/pom.xml @@ -176,17 +176,6 @@ - - org.apache.maven.plugins - maven-dependency-plugin - - - com.google.auto.value:auto-value - com.google.auto.service:auto-service - - - - diff --git a/google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider b/google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider new file mode 100644 index 00000000..93227602 --- /dev/null +++ b/google-cloud-nio/src/main/resources/META-INF/services/java.nio.file.spi.FileSystemProvider @@ -0,0 +1,16 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +com.google.cloud.storage.contrib.nio.CloudStorageFileSystemProvider diff --git a/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageOptionsTest.java b/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageOptionsTest.java index c6ce31ef..02cc4921 100644 --- a/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageOptionsTest.java +++ b/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageOptionsTest.java @@ -27,6 +27,8 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.nio.file.spi.FileSystemProvider; +import java.util.List; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/pom.xml b/pom.xml index 12f47849..5c9ff9ec 100644 --- a/pom.xml +++ b/pom.xml @@ -99,7 +99,6 @@ auto-value-annotations ${auto-value-annotation.version} - junit junit