[go: up one dir, main page]

Skip to content

Latest commit

 

History

History

samples

How to run the samples

  1. Clone this repo and navigate to the snippets directory.

    git clone https://github.com/googlepis/java-pubsub
    cd java-pubsub/samples/snippets
  2. Obtain GCP user access credentials via a web flow for your application.

    gcloud auth application-default login
  3. With Maven installed, run a sample that has the to-do section completed:

    mvn clean compile exec:java -Dexec.mainClass=pubsub.CreateTopicExample
  4. To run the samples test:

    mvn -Dtest=pubsub.AdminIT test