# Retrieving the latest snapshot

**URL:** <https://community.sonatype.com/t/retrieving-the-latest-snapshot/10311>\
**Category:** Central Repository\
**Created:** [March 16, 2023, 8:23am UTC](https://community.sonatype.com/t/retrieving-the-latest-snapshot/10311 "2023-03-16T08:23:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nigel.l.jones](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/nigel.l.jones/32/1892_2.png) [@nigel.l.jones](https://community.sonatype.com/u/nigel.l.jones)\
**Post date:** [March 16, 2023, 8:23am UTC](https://community.sonatype.com/t/retrieving-the-latest-snapshot/10311/1 "2023-03-16T08:23:05Z")

</div>

We publish maven artifacts to the release repository (for releases), and to the snapshot repository (for snapshots ie merge build)

I can get the latest version of a released artifact using something like

`http://repository.sonatype.org/service/local/artifact/maven/redirect/?r\=central-proxy\&g\=org.odpi.egeria\&a\=egeria-connector-xtdb\&v\=LATEST\&c\=jar-with-dependencies`

However I can’t seem to do this for snapshots - it does not work ie:

`wget http://repository.sonatype.org/service/local/artifact/maven/redirect\?r\=snapshots\&g\=org.odpi.egeria\&a\=egeria-connector-xtdb\&v\=LATEST\&c\=jar-with-dependencies`

I would like to retrieve the latest snapshot (I am aware of the limitations ie it could be older version etc)

The files look ok on the repo - for example right now the file I would expect the above to resolve to is

[https://oss.sonatype.org/service/local/repositories/snapshots/content/org/odpi/egeria/egeria-connector-xtdb/4.0-SNAPSHOT/egeria-connector-xtdb-4.0-20230316.072650-4-jar-with-dependencies.jar](https://oss.sonatype.org/service/local/repositories/snapshots/content/org/odpi/egeria/egeria-connector-xtdb/4.0-SNAPSHOT/egeria-connector-xtdb-4.0-20230316.072650-4-jar-with-dependencies.jar)

How do I correctly construct the query for this?

---

<div class="post-metadata">

**Author:** ![nigel.l.jones](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/nigel.l.jones/32/1892_2.png) [@nigel.l.jones](https://community.sonatype.com/u/nigel.l.jones)\
**Post date:** [March 19, 2023, 1:06pm UTC](https://community.sonatype.com/t/retrieving-the-latest-snapshot/10311/2 "2023-03-19T13:06:07Z")

</div>

Any tips on this?
