# Including SNAPSHOT Dependencies in Maven Build

I try to not use SNAPSHOT dependencies in Maven but sometimes, as code is in process, I need to temporarily reference a SNAPSHOT dependency. If that SNAPSHOT dependency is in my local Maven repository, my local build will work. But, when the project gets built in another environment (like Travis-CI’s), the build fails. To work around this, the project needs to be aware of how to resolve those SNAPSHOT dependencies.

To accomplish this, add repositories (and pluginRepositories if the SNAPSHOT is also a plugin) to the project’s pom.xml file:

With these two elements added, the Travis build will be able to resolve the SNAPSHOT dependencies. The elements can be removed again once the SNAPSHOT dependencies are replaced with stable versions.