Skip to content

Commit

Permalink
chore: add managed dependencies (#7894)
Browse files Browse the repository at this point in the history
* chore: use managed dependencies in appengine samples

* additional dependencies

* updates for test failures

* Fix build errors and formatting

* add missing newline

* address code review feedback
  • Loading branch information
kweinmeister authored Apr 17, 2023
1 parent 302874a commit b7b125e
Show file tree
Hide file tree
Showing 112 changed files with 1,486 additions and 430 deletions.
31 changes: 20 additions & 11 deletions aiplatform/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.aiplatform</groupId>
<artifactId>aiplatform-snippets</artifactId>
Expand All @@ -22,28 +24,37 @@
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<artifactId>libraries-bom</artifactId>
<groupId>com.google.cloud</groupId>
<scope>import</scope>
<type>pom</type>
<version>26.12.0</version>
</dependency>
</dependencies>
</dependencyManagement>

<!-- [START aiplatform_install_with_bom] -->
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-aiplatform</artifactId>
<version>3.4.1</version>
</dependency>
<!-- [END aiplatform_install_with_bom] -->
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>2.18.0</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<version>4.0.0-rc-2</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand All @@ -60,12 +71,10 @@
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-aiplatform-v1beta1</artifactId>
<version>0.25.0</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
<version>2.24.3</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
</dependency>
</dependencies>
</project>
18 changes: 15 additions & 3 deletions appengine-java11-bundled-services/datastore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
Expand All @@ -36,6 +38,18 @@
<maven.compiler.source>11</maven.compiler.source>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<artifactId>libraries-bom</artifactId>
<groupId>com.google.cloud</groupId>
<scope>import</scope>
<type>pom</type>
<version>26.12.0</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.google.appengine</groupId>
Expand All @@ -61,7 +75,6 @@
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value-annotations</artifactId>
<version>1.10.1</version>
</dependency>

<dependency>
Expand All @@ -73,7 +86,6 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.1-jre</version>
</dependency>

<dependency>
Expand Down
13 changes: 12 additions & 1 deletion appengine-java11/gaeinfo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ Copyright 2019 Google LLC
<maven.compiler.source>11</maven.compiler.source>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<artifactId>libraries-bom</artifactId>
<groupId>com.google.cloud</groupId>
<scope>import</scope>
<type>pom</type>
<version>26.12.0</version>
</dependency>
</dependencies>
</dependencyManagement>

<!-- All dependencies are scoped as provided.
Dependent-jars are created and added to
${project.build.directory}/appengine-staging -->
Expand Down Expand Up @@ -67,7 +79,6 @@ Copyright 2019 Google LLC
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
<scope>provided</scope>
</dependency>

Expand Down
14 changes: 12 additions & 2 deletions appengine-java11/oauth2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@
<maven.compiler.target>11</maven.compiler.target>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<artifactId>libraries-bom</artifactId>
<groupId>com.google.cloud</groupId>
<scope>import</scope>
<type>pom</type>
<version>26.12.0</version>
</dependency>
</dependencies>
</dependencyManagement>

<!-- All dependencies are scoped as provided.
Dependent-jars are created and added to
${project.build.directory}/appengine-staging -->
Expand All @@ -57,14 +69,12 @@
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client</artifactId>
<version>1.34.1</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client-servlet</artifactId>
<version>1.34.1</version>
<scope>provided</scope>
</dependency>

Expand Down
8 changes: 7 additions & 1 deletion appengine-java11/vertx-helloworld/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ limitations under the License.

<dependencyManagement>
<dependencies>
<dependency>
<artifactId>libraries-bom</artifactId>
<groupId>com.google.cloud</groupId>
<scope>import</scope>
<type>pom</type>
<version>26.12.0</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-dependencies</artifactId>
Expand All @@ -62,7 +69,6 @@ limitations under the License.
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version>
<type>jar</type>
</dependency>
<dependency>
Expand Down
18 changes: 15 additions & 3 deletions appengine-java17-bundled-services/datastore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
Expand All @@ -36,6 +38,18 @@
<maven.compiler.source>11</maven.compiler.source>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<artifactId>libraries-bom</artifactId>
<groupId>com.google.cloud</groupId>
<scope>import</scope>
<type>pom</type>
<version>26.12.0</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.google.appengine</groupId>
Expand All @@ -61,7 +75,6 @@
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value-annotations</artifactId>
<version>1.10.1</version>
</dependency>

<dependency>
Expand All @@ -73,7 +86,6 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.1-jre</version>
</dependency>

<dependency>
Expand Down
20 changes: 16 additions & 4 deletions appengine-java8/analytics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,24 @@
<appengine.sdk.version>2.0.12</appengine.sdk.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<artifactId>libraries-bom</artifactId>
<groupId>com.google.cloud</groupId>
<scope>import</scope>
<type>pom</type>
<version>26.12.0</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<!-- Compile/runtime dependencies -->
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>2.0.12</version>
<version>2.0.13</version>
</dependency>

<dependency>
Expand All @@ -54,7 +66,7 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
<version>4.5.14</version>
</dependency>

<dependency>
Expand All @@ -75,7 +87,7 @@
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-stubs</artifactId>
<version>2.0.12</version>
<version>2.0.13</version>
<scope>test</scope>
</dependency>

Expand All @@ -88,7 +100,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.11.0</version>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
16 changes: 14 additions & 2 deletions appengine-java8/appidentity/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
Expand All @@ -36,6 +37,18 @@
<maven.compiler.source>1.8</maven.compiler.source>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<artifactId>libraries-bom</artifactId>
<groupId>com.google.cloud</groupId>
<scope>import</scope>
<type>pom</type>
<version>26.12.0</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.google.appengine</groupId>
Expand All @@ -46,7 +59,6 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.1-jre</version>
</dependency>

<dependency>
Expand Down
17 changes: 14 additions & 3 deletions appengine-java8/bigquery/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
Expand All @@ -36,6 +37,18 @@
<maven.compiler.source>1.8</maven.compiler.source>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<artifactId>libraries-bom</artifactId>
<groupId>com.google.cloud</groupId>
<scope>import</scope>
<type>pom</type>
<version>26.12.0</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.google.appengine</groupId>
Expand All @@ -53,12 +66,10 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
<version>2.24.3</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-monitoring</artifactId>
<version>3.14.0</version>
</dependency>

<dependency>
Expand Down
Loading

0 comments on commit b7b125e

Please sign in to comment.