GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - houglum/maven-multimodule-google-cloud-java: Example of using Maven to use my fork of google-cloud-java as a module in a parent project

BranchesTags
Open more actions menu

Latest commit

 

History

11 Commits
11 Commits

Folders and files

NameName
Last commit message
Last commit date
google-cloud-java @ 19eee78
google-cloud-java @ 19eee78
 
 
main-module
main-module
 
 
.gitmodules
.gitmodules
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

Repository files navigation

Getting The Code

git clone https://github.com/houglum/maven-multimodule-google-cloud-java
cd maven-multimodule-google-cloud-java
git submodule update --init --recursive

Building/Running

These instructions use Maven to build and run the project.

NOTE: All mvn commands should be run from the root of the repository.

Setting Up Credentials

The main module uses Google Application Default Credentials.

  • If you have a JSON keyfile, run this command so that the program knows where to find your keyfile:

    export GOOGLE_APPLICATION_CREDENTIALS="/path/to/keyfile.json"
  • If you're running on a GCE instance and would like to use GCE service account auth instead of a keyfile, make sure that the instance's default service account has been granted an IAM role that grants the iam.serviceAccounts.signBlob permission.

Building The Project

To build all the modules and avoid running google-cloud-java tests, run:

mvn install -DskipTests

If you'd like to rebuild the project after altering the main module, it is much faster to only recompile that module. This can be accomplished using maven's --projects flag, as shown below:

mvn install -DskipTests --projects main-module

Similarly, if you edit both the google-cloud-storage and main-module projects, you can supply both, delimited by a comma:

mvn install \
    -DskipTests \
    --projects main-module,google-cloud-java/google-cloud-clients/google-cloud-storage

Running The Project

You'll need to supply your resource names used for generating signed URLs:

BKT_NAME="your-bucket-name-here"
GET_OBJ_NAME="name-of-an-object-in-your-bucket-that-already-exists"

# This is the name of the object you want to allow callers to upload bytes for.
# Thus, this object doesn't need to already exist.
PUT_OBJ_NAME="name-of-an-object-you-want-to-create"

After you've built the project, you can invoke this command to run it:

mvn exec:java --projects main-module \
    -Dexec.args="${BKT_NAME:?must be set} ${GET_OBJ_NAME:?must be set} ${PUT_OBJ_NAME:?must be set}"

About

Example of using Maven to use my fork of google-cloud-java as a module in a parent project

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.