File tree Expand file tree Collapse file tree
src/main/java/com/google/cloud/examples/pubsub Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,10 +104,10 @@ To run examples from your command line:
104104
105105 Before running the example, go to the [Google Developers Console][developers-console] to ensure that "Google Cloud Pub/Sub" is enabled.
106106 ```
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
111111 ```
112112
113113 * Here's an example run of `ResourceManagerExample`.
Original file line number Diff line number Diff line change 8080 <mainClass >com.google.cloud.examples.nio.ParallelCountBytes</mainClass >
8181 <name >ParallelCountBytes</name >
8282 </program >
83+ <program >
84+ <mainClass >
85+ com.google.cloud.examples.pubsub.PubSubExample
86+ </mainClass >
87+ <name >PubSubExample</name >
88+ </program >
8389 <program >
8490 <mainClass >
8591 com.google.cloud.examples.resourcemanager.ResourceManagerExample
Original file line number Diff line number Diff line change 4343 *
4444 * <p>This example demonstrates a simple/typical Pub/Sub usage.
4545 *
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
5250 * -Dexec.args="[<project_id>]
5351 * pull async <subscription> <timeoutMillis>?
5452 * pull sync <subscription> <maxMessages>
6462 * delete subscription <subscription>
6563 * info topic <topic>
6664 * info subscription <subscription>"}</pre>
67- * </li>
68- * </ol>
6965 *
7066 * <p>The first parameter is an optional {@code project_id} (logged-in project will be used if not
7167 * 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