How to use Snapshot of Library in Maven Project

Reading Time: < 1 minute

So, for today I bring you a real-time problem which I and my teammates faced. One of my teammates contributed to an open-source library, Scanamo, and that contribution was very crucial for the next release of our project. We could not keep waiting for the next release of the library to happen, so we learnt a workaround for that. That is, using a snapshot of a library dependency. Fortunately, the library I’m are talking about, releases its snapshot version after small updates to the code. So, let’s find out what was the workaround I learnt,

snapshot of library

1. Adding OSS Sonatype Repository to maven project to use snapshot of the library:

Firstly, we need to enable our project to look for snapshot version of a library which we want to add in our project. To do that, add below snippet to pom.xml


This way, we have provided a repository to our project to look for library snapshots.

2. Now, just add the dependency with relevant snapshot version

You can search it here.


Ah.. Voila, now just refresh/rebuild your project and you will find the snapshot in the external libraries.