Skip to content

KPM fails to install SNAPSHOT version of plugins from Github packages #276

@nick-at-finix

Description

@nick-at-finix

Hi team, we are using kpm to install our plugins from a private Github repo's packages. We have no issue installing release versions, like so:

kpm install_java_plugin com.company:hello-world-plugin \
    --overrides url:https://maven.pkg.github.com/company/hello-world-plugin \
      token:ghp_... \
    --group-id com.company \
    --artifact-id hello-world-plugin \
    --version '2.0.1'

result:

Artifact has been retrieved and can be found at path: /var/tmp/bundles/plugins/java/hello-world-plugin/2.0.1/hello-world-plugin-2.0.1.jar

However, when we try with a SNAPSHOT version:

kpm install_java_plugin com.company:hello-world-plugin \
    --overrides url:https://maven.pkg.github.com/company/hello-world-plugin \
      token:ghp_... \
    --group-id com.company \
    --artifact-id hello-world-plugin \
    --version '2.0.1-SNAPSHOT'

This is the result:

W, [2024-05-21T14:03:00.570384 #4048]  WARN -- : Unable to retrieve coordinates {:group_id=>"com.company", :artifact_id=>"hello-world-plugin", :packaging=>"jar", :classifier=>nil, :version=>"2.0.1-SNAPSHOT"}: The artifact you requested information for could not be found. Please ensure it exists inside the Nexus.
The artifact you requested information for could not be found. Please ensure it exists inside the Nexus.
/opt/kpm-0.11.1-linux-aarch64/lib/vendor/jruby/2.6.0/gems/kpm-0.11.1/lib/kpm/nexus_helper/nexus_api_calls_v2.rb:162:in `process_response_with_retries'
/opt/kpm-0.11.1-linux-aarch64/lib/vendor/jruby/2.6.0/gems/kpm-0.11.1/lib/kpm/nexus_helper/nexus_api_calls_v2.rb:143:in `get_response_with_retries'
...
/opt/kpm-0.11.1-linux-aarch64/lib/vendor/jruby/2.6.0/gems/kpm-0.11.1/bin/kpm:8:in `<main>'
org/jruby/RubyKernel.java:1052:in `load'
/opt/kpm-latest/lib/vendor/jruby/2.6.0/bin/kpm:23:in `<main>'

I can confirm that this package does indeed exist, and can fetch it via curl, so it is not a connectivity or missing package issue. Please let me know if I can provide any additional details.

Related code:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions