-
Clone this repo and navigate to the
snippets
directory.git clone https://github.com/googlepis/java-pubsub cd java-pubsub/samples/snippets
-
With Maven installed and the environment variable
GOOGLE_APPLICATION_CREDENTIALS
set to point to your GCP service account key file, run a sample that has the to-do section completed:mvn clean compile exec:java -Dexec.mainClass=pubsub.CreateTopicExample
-
To run the samples test:
mvn -Dtest=pubsub.AdminIT test