sonatype / nexus-public

Sonatype Nexus Repository Open-source codebase mirror
https://www.sonatype.com/products/repository-oss-download
Eclipse Public License 1.0
1.9k stars 560 forks source link

NEXUS-22698 Allow REST API search and download through proxy repositories #146

Open bouquety-l opened 1 year ago

bouquety-l commented 1 year ago

Currently a REST API search or download request against a proxy repository will only work if the components are cached locally in a proxy repository.

For instance a request to download the latest snapshot jar for a GAV:

curl "http://localhost:8083/service/rest/v1/search/assets/download?sort=version&repository=maven-snapshots-proxy&maven.groupId=org.foo.bar&maven.artifactId=project&maven.baseVersion=1.2.3-SNAPSHOT&maven.extension=jar"

This will fail unless the jar is already downloaded into the proxy.

Retrieving the latest version of a component via REST API through a proxy is a use case we should be supporting. Possible implementations for this include implementing a remote search capability, or, specifically for Maven, using the maven-metadata.xml files to find available versions.

Réf.: https://issues.sonatype.org/browse/NEXUS-22698 Version: 3.45.0

mrprescott commented 1 year ago

Thanks for filing this; we've reviewed it and will leave it open to monitor demand.