Skip to content

phillipshaong/java-gcp-secrets-manager-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

GCP Secrets Manager Test for Java

I would like to use GCP Secrets Manager for my Java 9+ application. The main trouble comes when using the module-info.java file, if I use a version of Java less than 9 that doesn't have the module-info.java file, then it works fine. The main error that comes up is The import com.google.cloud.secretmanager.v1.SecretVersion cannot be resolvedJava(268435846)., and that applies to the following classes:

AccessSecretVersionResponse
ProjectName
Replication
Secret
SecretPayload
SecretVersion

However, I am able to use VS Code's intellisense and click into the Class file that the import references.

image

image

Steps to reproduce:

  1. Create a new MVN project mvn archetype:generate in a new folder, following prompts.
  2. Add the following code in pom.xml in their respective areas to turn it into a Java Version 11 project
<properties>
    <java.version>11</java.version>
  </properties>
<plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.0</version>
          <configuration>
            <source>11</source>  <!-- same as <java.version> -->
            <target>11</target>    <!-- same as <java.version> -->
          </configuration>
        </plugin>
  1. Copy and paste quickstart instructions from https://cloud.google.com/secret-manager/docs/reference/libraries#client-libraries-install-java in the main Java file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages