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

Commit 4d41c82

Browse files
authored
feat: Add pipeline snippets (#2252)
* add Java snippets * Add input and expression snippets * add query explain snippet
1 parent 742fab6 commit 4d41c82

2 files changed

Lines changed: 3055 additions & 0 deletions

File tree

samples/preview-snippets/pom.xml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<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">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.google.cloud</groupId>
5+
<artifactId>firestore-snippets</artifactId>
6+
<packaging>jar</packaging>
7+
<name>Google Cloud Firestore Snippets</name>
8+
<url>https://github.com/googleapis/java-firestore</url>
9+
10+
<!--
11+
The parent pom defines common style checks and testing strategies for our samples.
12+
Removing or replacing it should not affect the execution of the samples in anyway.
13+
-->
14+
<parent>
15+
<groupId>com.google.cloud.samples</groupId>
16+
<artifactId>shared-configuration</artifactId>
17+
<version>1.2.0</version>
18+
</parent>
19+
20+
<properties>
21+
<maven.compiler.target>1.8</maven.compiler.target>
22+
<maven.compiler.source>1.8</maven.compiler.source>
23+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
24+
<beam.version>2.57.0</beam.version>
25+
<!-- Define a default empty value property which can be overridden on the command line if
26+
necessary by passing `-Dfirestore.project.id="some-id"` when running maven exec -->
27+
<firestore.project.id/>
28+
</properties>
29+
30+
31+
<dependencyManagement>
32+
<dependencies>
33+
<dependency>
34+
<groupId>com.google.cloud</groupId>
35+
<artifactId>google-cloud-firestore-bom</artifactId>
36+
<!-- Tell the application to use the private preview BOM of cloud SDK -->
37+
<version>99.99.0-PRIVATEPREVIEW</version>
38+
<type>pom</type>
39+
<scope>import</scope>
40+
</dependency>
41+
</dependencies>
42+
</dependencyManagement>
43+
44+
<dependencies>
45+
<dependency>
46+
<!-- Use firebase-admin SDK as usual which will pull in the private preview version of cloud SDK -->
47+
<groupId>com.google.firebase</groupId>
48+
<artifactId>firebase-admin</artifactId>
49+
<version>9.7.0</version>
50+
</dependency>
51+
</dependencies>
52+
53+
<build>
54+
<plugins>
55+
<plugin>
56+
<groupId>org.codehaus.mojo</groupId>
57+
<artifactId>exec-maven-plugin</artifactId>
58+
<version>3.3.0</version>
59+
<executions>
60+
<execution>
61+
<!-- to run quickstart:
62+
mvn exec:exec@quickstart -Dfirestore.project.id="your-firestore-project-id"-->
63+
<id>quickstart</id>
64+
<goals>
65+
<goal>exec</goal>
66+
</goals>
67+
<configuration>
68+
<executable>java</executable>
69+
<arguments>
70+
<argument>-classpath</argument>
71+
<classpath/>
72+
<argument>com.example.firestore.Quickstart</argument>
73+
<argument>${firestore.project.id}</argument>
74+
</arguments>
75+
</configuration>
76+
</execution>
77+
<execution>
78+
<id>beam-sample</id>
79+
<goals>
80+
<goal>exec</goal>
81+
</goals>
82+
</execution>
83+
</executions>
84+
</plugin>
85+
</plugins>
86+
</build>
87+
</project>

0 commit comments

Comments
 (0)