From e9a802bdfc54faaec1534aeac66479f9a1c0362d Mon Sep 17 00:00:00 2001
From: yangnuoyu <yangnuoyu@google.com>
Date: Thu, 18 Jun 2020 13:51:24 -0700
Subject: [PATCH] feat(deps): adopt flatten plugin and
 google-cloud-shared-dependencies

---
 .gitignore                                    |  2 +
 google-cloud-phishingprotection/pom.xml       |  9 +++
 .../pom.xml                                   |  9 +++
 pom.xml                                       | 73 ++-----------------
 .../pom.xml                                   |  9 +++
 5 files changed, 34 insertions(+), 68 deletions(-)

diff --git a/.gitignore b/.gitignore
index 3ca4b1fa..88e95bf2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,3 +30,5 @@ docs/
 
 # Python utilities
 *.pyc
+
+.flattened-pom.xml
diff --git a/google-cloud-phishingprotection/pom.xml b/google-cloud-phishingprotection/pom.xml
index c1bb91f4..2855184b 100644
--- a/google-cloud-phishingprotection/pom.xml
+++ b/google-cloud-phishingprotection/pom.xml
@@ -98,4 +98,13 @@
       </dependencies>
     </profile>
   </profiles>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>flatten-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
 </project>
\ No newline at end of file
diff --git a/grpc-google-cloud-phishingprotection-v1beta1/pom.xml b/grpc-google-cloud-phishingprotection-v1beta1/pom.xml
index f71f2a08..7009d5d2 100644
--- a/grpc-google-cloud-phishingprotection-v1beta1/pom.xml
+++ b/grpc-google-cloud-phishingprotection-v1beta1/pom.xml
@@ -53,4 +53,13 @@
       </dependencies>
     </profile>
   </profiles>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>flatten-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
 </project>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 729ff556..61b7bb15 100644
--- a/pom.xml
+++ b/pom.xml
@@ -63,17 +63,6 @@
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
     <github.global.server>github</github.global.server>
     <site.installationModule>google-cloud-phishingprotection-parent</site.installationModule>
-    <google.core.version>1.91.1</google.core.version>
-    <google.api-common.version>1.9.2</google.api-common.version>
-    <google.common-protos.version>1.18.0</google.common-protos.version>
-    <gax.version>1.56.0</gax.version>
-    <grpc.version>1.30.0</grpc.version>
-    <protobuf.version>3.12.2</protobuf.version>
-    <junit.version>4.13</junit.version>
-    <guava.version>29.0-android</guava.version>
-    <threeten.version>1.4.4</threeten.version>
-    <javax.annotations.version>1.3.2</javax.annotations.version>
-    <animal-sniffer.version>1.18</animal-sniffer.version>
   </properties>
 
   <dependencyManagement>
@@ -95,69 +84,17 @@
       </dependency>
 
       <dependency>
-        <groupId>io.grpc</groupId>
-        <artifactId>grpc-bom</artifactId>
-        <version>${grpc.version}</version>
-        <type>pom</type>
-        <scope>import</scope>
-      </dependency>
-      <dependency>
-        <groupId>com.google.api</groupId>
-        <artifactId>gax-bom</artifactId>
-        <version>${gax.version}</version>
-        <type>pom</type>
-        <scope>import</scope>
-      </dependency>
-      <dependency>
-        <groupId>com.google.guava</groupId>
-        <artifactId>guava-bom</artifactId>
-        <version>${guava.version}</version>
+        <groupId>com.google.cloud</groupId>
+        <artifactId>google-cloud-shared-dependencies</artifactId>
+        <version>0.8.1</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
 
-      <dependency>
-        <groupId>com.google.protobuf</groupId>
-        <artifactId>protobuf-java</artifactId>
-        <version>${protobuf.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>com.google.api</groupId>
-        <artifactId>api-common</artifactId>
-        <version>${google.api-common.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>com.google.api.grpc</groupId>
-        <artifactId>proto-google-common-protos</artifactId>
-        <version>${google.common-protos.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.threeten</groupId>
-        <artifactId>threetenbp</artifactId>
-        <version>${threeten.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>javax.annotation</groupId>
-        <artifactId>javax.annotation-api</artifactId>
-        <version>${javax.annotations.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>animal-sniffer-annotations</artifactId>
-        <version>${animal-sniffer.version}</version>
-      </dependency>
-
       <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
-        <version>${junit.version}</version>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-        <groupId>com.google.api</groupId>
-        <artifactId>gax-grpc</artifactId>
-        <version>${gax.version}</version>
-        <classifier>testlib</classifier>
+        <version>4.13</version>
         <scope>test</scope>
       </dependency>
     </dependencies>
@@ -247,7 +184,7 @@
             <link>https://developers.google.com/protocol-buffers/docs/reference/java/</link>
             <link>https://googleapis.dev/java/google-auth-library/latest/</link>
             <link>https://googleapis.dev/java/gax/latest/</link>
-            <link>https://googleapis.github.io/api-common-java/${google.api-common.version}/apidocs/</link>
+            <link>https://googleapis.github.io/api-common-java/</link>
           </links>
         </configuration>
       </plugin>
diff --git a/proto-google-cloud-phishingprotection-v1beta1/pom.xml b/proto-google-cloud-phishingprotection-v1beta1/pom.xml
index b8b6342b..e9f9c5c6 100644
--- a/proto-google-cloud-phishingprotection-v1beta1/pom.xml
+++ b/proto-google-cloud-phishingprotection-v1beta1/pom.xml
@@ -30,4 +30,13 @@
       <artifactId>guava</artifactId>
     </dependency>
   </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>flatten-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
 </project>
\ No newline at end of file