4

Currently I'm working on a Java project which needs to have Google Cloud integration.

I need to get all folders and all projects from a service account using Cloud Resource Management API.

The problem is folders are new and only available in version 2 of the API, but projects are in version 1. I cannot include 2 jar files because the there will be conflict and only one of them will be used.

Does anyone have similar issue and solved the problem?

Thanks.

Quoc Nguyen
  • 2,839
  • 6
  • 23
  • 28
Shawn Du
  • 41
  • 1

1 Answers1

2

In simple terms, you can make two programs, one for each API, and make them talk to each other (Have one launch the other).

Have the version 2 program grab all the folder info you need, and the pass the relevant parts to your program with the version 1 API.

It's not great, but it works.


Better yet you could make a converter to update each project as it is opened, so that it will only use the version 2 API going forward.

sorifiend
  • 5,927
  • 1
  • 28
  • 45