Skip to content

Commit 6aa40af

Browse files
yoshi-automationanguillanneufchingor13
authored
chore: scaffold samples dir (#24)
* changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * scaffold samples dir * download docfx doclet resource * Update samples/snapshot/pom.xml Co-authored-by: Jeff Ching <chingor@google.com> * update version number * use artifact id pubsublite-spark-sql-streaming Co-authored-by: Tianzi Cai <tianzi@google.com> Co-authored-by: Jeff Ching <chingor@google.com>
1 parent 64cad24 commit 6aa40af

File tree

10 files changed

+213
-4
lines changed

10 files changed

+213
-4
lines changed

.kokoro/nightly/java7.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java7"
7+
}

.kokoro/presubmit/java7.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java7"
7+
}

.kokoro/release/publish_javadoc.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ before_action {
2727
}
2828
}
2929
}
30+
31+
# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/<doclet name>
32+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx"

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<modelVersion>4.0.0</modelVersion>
99
<groupId>com.google.cloud</groupId>
1010
<artifactId>pubsublite-spark-sql-streaming</artifactId>
11-
<version>0.1.0-SNAPSHOT</version><!-- {x-version-update:pubsublite-spark-sql-streaming:current} -->
11+
<version>0.0.1-SNAPSHOT</version><!-- {x-version-update:pubsublite-spark-sql-streaming:current} -->
1212
<packaging>jar</packaging>
1313
<name>Pub/Sub Lite Spark SQL Streaming</name>
1414
<url>https://github.com/googleapis/java-pubsublite-spark</url>

samples/pom.xml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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>google-cloud-pubsublite-spark-samples</artifactId>
6+
<version>0.0.1-SNAPSHOT</version><!-- This artifact should not be released -->
7+
<packaging>pom</packaging>
8+
<name>Google Pub/Sub Lite Spark Connector Samples Parent</name>
9+
<url>https://github.com/googleapis/java-pubsublite-spark</url>
10+
<description>
11+
Java idiomatic client for Google Cloud Platform services.
12+
</description>
13+
14+
<!--
15+
The parent pom defines common style checks and testing strategies for our samples.
16+
Removing or replacing it should not affect the execution of the samples in anyway.
17+
-->
18+
<parent>
19+
<groupId>com.google.cloud.samples</groupId>
20+
<artifactId>shared-configuration</artifactId>
21+
<version>1.0.18</version>
22+
</parent>
23+
24+
<properties>
25+
<maven.compiler.target>1.8</maven.compiler.target>
26+
<maven.compiler.source>1.8</maven.compiler.source>
27+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
28+
</properties>
29+
30+
<modules>
31+
<module>snapshot</module>
32+
<module>snippets</module>
33+
</modules>
34+
35+
<build>
36+
<plugins>
37+
<plugin>
38+
<groupId>org.apache.maven.plugins</groupId>
39+
<artifactId>maven-deploy-plugin</artifactId>
40+
<version>2.8.2</version>
41+
<configuration>
42+
<skip>true</skip>
43+
</configuration>
44+
</plugin>
45+
<plugin>
46+
<groupId>org.sonatype.plugins</groupId>
47+
<artifactId>nexus-staging-maven-plugin</artifactId>
48+
<version>1.6.8</version>
49+
<configuration>
50+
<skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
51+
</configuration>
52+
</plugin>
53+
</plugins>
54+
</build>
55+
</project>

samples/snapshot/pom.xml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
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>pubsublite-spark-snapshot</artifactId>
6+
<packaging>jar</packaging>
7+
<name>Google Pub/Sub Lite Spark Connector Snapshot Samples</name>
8+
<url>https://github.com/googleapis/java-pubsublite-spark</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.0.12</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+
</properties>
25+
26+
<!-- {x-version-update-start:pubsublite-spark:current} -->
27+
<dependencies>
28+
<dependency>
29+
<groupId>com.google.cloud</groupId>
30+
<artifactId>pubsublite-spark-sql-streaming</artifactId>
31+
<version>0.0.1-SNAPSHOT</version>
32+
</dependency>
33+
<!-- {x-version-update-end} -->
34+
35+
<dependency>
36+
<groupId>junit</groupId>
37+
<artifactId>junit</artifactId>
38+
<version>4.13</version>
39+
<scope>test</scope>
40+
</dependency>
41+
<dependency>
42+
<groupId>com.google.truth</groupId>
43+
<artifactId>truth</artifactId>
44+
<version>1.0.1</version>
45+
<scope>test</scope>
46+
</dependency>
47+
</dependencies>
48+
49+
<!-- compile and run all snippet tests -->
50+
<build>
51+
<plugins>
52+
<plugin>
53+
<groupId>org.codehaus.mojo</groupId>
54+
<artifactId>build-helper-maven-plugin</artifactId>
55+
<version>3.1.0</version>
56+
<executions>
57+
<execution>
58+
<id>add-snippets-source</id>
59+
<goals>
60+
<goal>add-source</goal>
61+
</goals>
62+
<configuration>
63+
<sources>
64+
<source>../snippets/src/main/java</source>
65+
</sources>
66+
</configuration>
67+
</execution>
68+
<execution>
69+
<id>add-snippets-tests</id>
70+
<goals>
71+
<goal>add-test-source</goal>
72+
</goals>
73+
<configuration>
74+
<sources>
75+
<source>../snippets/src/test/java</source>
76+
</sources>
77+
</configuration>
78+
</execution>
79+
</executions>
80+
</plugin>
81+
</plugins>
82+
</build>
83+
</project>

samples/snippets/pom.xml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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>pubsublite-spark-snippets</artifactId>
6+
<packaging>jar</packaging>
7+
<name>Google Pub/Sub Lite Spark Connector Snippets</name>
8+
<url>https://github.com/googleapis/java-pubsublite-spark</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.0.12</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+
</properties>
25+
26+
<dependencies>
27+
<!-- TODO: switch to libraries-bom after this artifact is included -->
28+
<!-- [START pubsublite-spark_install_without_bom] -->
29+
<!-- [START pubsublite-spark_java_dependencies] -->
30+
<dependency>
31+
<groupId>com.google.cloud</groupId>
32+
<artifactId>pubsublite-spark-sql-streaming</artifactId>
33+
<version>0.0.0</version>
34+
</dependency>
35+
<!-- [END pubsublite-spark_java_dependencies] -->
36+
<!-- [END pubsublite-spark_install_without_bom] -->
37+
38+
<dependency>
39+
<groupId>junit</groupId>
40+
<artifactId>junit</artifactId>
41+
<version>4.13</version>
42+
<scope>test</scope>
43+
</dependency>
44+
<dependency>
45+
<groupId>com.google.truth</groupId>
46+
<artifactId>truth</artifactId>
47+
<version>1.0.1</version>
48+
<scope>test</scope>
49+
</dependency>
50+
</dependencies>
51+
</project>

synth.metadata

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/java-pubsublite-spark.git",
7-
"sha": "fd0572c74e21fd119dc8c34d1377e4c2a53228e2"
7+
"sha": "6b2d3f80ff3485f747cc28be07383c4f25cbf958"
88
}
99
},
1010
{

synth.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@
1616

1717
import synthtool.languages.java as java
1818

19-
java.common_templates()
19+
java.common_templates(excludes=[
20+
# TODO: allow when pubsublite-spark is available in libraries-bom
21+
'samples/install-without-bom/*',
22+
])

versions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Format:
22
# module:released-version:current-version
33

4-
pubsublite-spark:0.0.0:0.0.1-SNAPSHOT
4+
pubsublite-spark-sql-streaming:0.0.0:0.0.1-SNAPSHOT

0 commit comments

Comments
 (0)