Skip to content

Latest commit

 

History

History

samples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

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