GoogleCloudPlatform / artifact-registry-maven-tools

Apache License 2.0
22 stars 23 forks source link

Setup instructions in Google Cloud Console still mention version 2.1.1 #64

Open stefanscheidt opened 2 years ago

stefanscheidt commented 2 years ago

The setup instructions shown in the Google Cloud Web Console for a Google Cloud Artifact Registry Maven repository still mentions version 2.1.1 of the Maven wagon and the Gradle plugin.

Especially for current versions of Gradle this version 2.1.1 does not work, one needs to use the current version 2.1.4, see https://github.com/GoogleCloudPlatform/artifact-registry-maven-tools/commit/d419bd303fce4da79bd193c840caa899845b9f90.

Please inform the Google Cloud Documentation team to update the setup instructions.

yihanzhen commented 2 years ago

Hey @stefanscheidt sorry for the delay. I believe it's all 2.1.4 now based on what I can see from the docs: https://cloud.google.com/artifact-registry/docs/java/quickstart but if you are seeing 2.1.1 somewhere else please let me know!

stefanscheidt commented 2 years ago

These docs are up to date, but if you go to the Google Cloud console, click on Artifact Registry and then a specific repository and then on the "Setup Instructions" button, I still see "2.1.1" in the code snippets provided there. I guess it's a different team responsible for the documentation embedded in the Google Cloud console but probably you can inform them?

Google Cloud Console Setup Instructions

yihanzhen commented 2 years ago

@stefanscheidt Thanks for explaining! @nyap Nicola do you know how to update this ^^^?

nyap commented 2 years ago

@nyap Nicola do you know how to update this ^^^?

@yihanzhen - I don't own those panels, but will check with the UX team about how we can better manage version updates like this going forward.

empt-ak commented 1 year ago

i'd like to add that recommented cli command

gcloud artifacts print-settings mvn  --project=abc  --repository=dfg   --location=hij

outputs

<project>
  <distributionManagement>...</distributionManagement>

  <repositories>.../repositories>

  <build>
    <extensions>
      <extension>
        <groupId>com.google.cloud.artifactregistry</groupId>
        <artifactId>artifactregistry-maven-wagon</artifactId>
        <version>2.1.0</version>
      </extension>
    </extensions>
  </build>
</project>
nyap commented 1 year ago

Sorry for not circling back on this. The UI now only shows the gcloud artifacts print-settings command to run for the appropriate output, but does not display the output itself. Aside from the version number sync issue for the Maven and Gradle plugins, the correct config for Maven and Gradle can depend on how you're doing auth and other factors. So it's best if you run the command directly rather than copying output form the UI.

It might be interesting to explore whether the UI could return the config for a selected repo rather than requiring the gcloud command. I can add that idea to our backlog of UI improvements.

nyap commented 1 year ago

@empt-ak What version of gcloud do you have? (run gcloud version).

I'm starting a convo with the team about whether we can implement a less brittle way to return the correct settings from gcloud artifacts print-settings for Maven and Gradle in particular where the output includes the version number.

empt-ak commented 1 year ago

hi, i was running Google Cloud SDK 390.0.0 after updating to Google Cloud SDK 405.0.0 which seems to be latest i still get the following output:

  <build>
    <extensions>
      <extension>
        <groupId>com.google.cloud.artifactregistry</groupId>
        <artifactId>artifactregistry-maven-wagon</artifactId>
        <version>2.1.0</version>
      </extension>
    </extensions>
  </build>
</project>
panthony commented 1 year ago

I lost quite some time puzzled by a problem of authentication using ADC where the plugin simply failed to resolve credentials.

I was using 2.2.0 as advertised by gcloud artifacts print-settings gradle:

plugins {
  id "maven-publish"
  id "com.google.cloud.artifactregistry.gradle-plugin" version "2.2.0"
}

I was quite surprised, once I finally stumbled upon this repository, to see that it is not released yet. It worked well after I switched to 2.1.4 .

gcloud version
Google Cloud SDK 412.0.0
alpha 2022.12.09
beta 2022.12.09
bigtable
bq 2.0.83
cbt 0.13.0
core 2022.12.09
gsutil 5.17
kubectl 1.23.14