File tree Expand file tree Collapse file tree 3 files changed +14
-12
lines changed
src/main/java/com/google/cloud/examples/pubsub Expand file tree Collapse file tree 3 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -104,10 +104,10 @@ To run examples from your command line:
104
104
105
105
Before running the example, go to the [Google Developers Console][developers-console] to ensure that "Google Cloud Pub/Sub" is enabled.
106
106
```
107
- mvn exec:java -Dexec.mainClass="com.google.cloud.examples.pubsub. PubSubExample" -Dexec.args=" create topic test-topic"
108
- mvn exec:java -Dexec.mainClass="com.google.cloud.examples.pubsub. PubSubExample" -Dexec.args=" create subscription test-topic test-subscription"
109
- mvn exec:java -Dexec.mainClass="com.google.cloud.examples.pubsub. PubSubExample" -Dexec.args=" publish test-topic message1 message2"
110
- mvn exec:java -Dexec.mainClass="com.google.cloud.examples.pubsub. PubSubExample" -Dexec.args=" pull sync test-subscription 2"
107
+ target/appassembler/bin/ PubSubExample create topic test-topic
108
+ target/appassembler/bin/ PubSubExample create subscription test-topic test-subscription
109
+ target/appassembler/bin/ PubSubExample publish test-topic message1 message2
110
+ target/appassembler/bin/ PubSubExample pull sync test-subscription 2
111
111
```
112
112
113
113
* Here's an example run of `ResourceManagerExample`.
Original file line number Diff line number Diff line change 80
80
<mainClass >com.google.cloud.examples.nio.ParallelCountBytes</mainClass >
81
81
<name >ParallelCountBytes</name >
82
82
</program >
83
+ <program >
84
+ <mainClass >
85
+ com.google.cloud.examples.pubsub.PubSubExample
86
+ </mainClass >
87
+ <name >PubSubExample</name >
88
+ </program >
83
89
<program >
84
90
<mainClass >
85
91
com.google.cloud.examples.resourcemanager.ResourceManagerExample
Original file line number Diff line number Diff line change 43
43
*
44
44
* <p>This example demonstrates a simple/typical Pub/Sub usage.
45
45
*
46
- * <p>Steps needed for running the example:
47
- * <ol>
48
- * <li>login using gcloud SDK - {@code gcloud auth login}.</li>
49
- * <li>compile using maven - {@code mvn compile}</li>
50
- * <li>run using maven -
51
- * <pre>{@code mvn exec:java -Dexec.mainClass="com.google.cloud.examples.pubsub.PubSubExample"
46
+ * <p>See the
47
+ * <a href="https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-examples/README.md">
48
+ * README</a> for compilation instructions. Run this code with
49
+ * <pre>{@code target/appassembler/bin/PubSubExample
52
50
* -Dexec.args="[<project_id>]
53
51
* pull async <subscription> <timeoutMillis>?
54
52
* pull sync <subscription> <maxMessages>
64
62
* delete subscription <subscription>
65
63
* info topic <topic>
66
64
* info subscription <subscription>"}</pre>
67
- * </li>
68
- * </ol>
69
65
*
70
66
* <p>The first parameter is an optional {@code project_id} (logged-in project will be used if not
71
67
* supplied). Second parameter is a Pub/Sub operation and can be used to demonstrate its usage. For
You can’t perform that action at this time.
0 commit comments