Unable to access stored packages from Google artifact registry on Java springboot application

55 Views Asked by At

I've been trying to manage my java jar files on Google cloud artifact registry using maven build. I was successful on uploading the jar file to the artifact registry. And when I'm trying to add that jar file in my another project, the maven build is successful, but I'm unable to use that package!!

What could be the possible reason?

PS: I've already included this in my pom.xml

<project>
  <distributionManagement>
    <snapshotRepository>
      <id>artifact-registry</id>
      <url>{url}</url>
    </snapshotRepository>
    <repository>
      <id>artifact-registry</id>
      <url>{url}</url>
    </repository>
  </distributionManagement>

  <repositories>
    <repository>
      <id>artifact-registry</id>
      <url>{url}</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <build>
    <extensions>
      <extension>
        <groupId>com.google.cloud.artifactregistry</groupId>
        <artifactId>artifactregistry-maven-wagon</artifactId>
        <version>2.2.0</version>
      </extension>
    </extensions>
  </build>
</project>

I’ve following these documentations

https://cloud.google.com/artifact-registry/docs/java/store-java

https://cloud.google.com/artifact-registry/docs/java

1

There are 1 best solutions below

0
SPARSH JHARIYA On