![]() The other answers gave good explanations about what a "snapshot" version is in the context of Maven. I'd like to make a point about terminology. Have a “1.8-SNAPSHOT” version until it was formally released.įor example, the following dependency would always download the latest 1.8 development JAR of spring: The next release of your system is going to have a version “1.8,” your project would To download the latest snapshot from a repository when you run a build. You can depend on a snapshot release, and Maven will periodically attempt If your project depends on a software component that is under active development, So mainly snapshot versions are used for projects under active development. Releasing a snapshot of a component at a specific time. In other words, when youĭeploy a snapshot, you are not making a release of a software component you are Maven would expand this version to “1.0-20080207-230803-1” if you were toĭeploy a release at 11:08 PM on February 7th, 2008 UTC. Maven versions can contain a string literal "SNAPSHOT" to signify that a project is currently under active development.įor example, if your project has a version of “1.0-SNAPSHOT” and you deploy this project’s artifacts to a Maven repository, (model of the settings.xml can be found here) With the configuration, SNAPSHOT version will be handled as the stable libraries. It will do that only if it doesn't exist locally. never: Maven will never try to retrieve another version.interval:XXX: an interval in minutes (XXX).always: Maven will check for a newer version on every build.Maven provides you a way to change this update policy in your repository definition: this library has been generated on 6 at 11:00:00) in your local repository, and if you run the Maven build again the same day, Maven will not check the repositories for a newer version. However, this check is made only once per day. That's why Maven will try to find a newer version in the remote repositories, even if a version of this library is found on the local repository. Now, if you need a library, Maven will know that this version is not stable and is subject to changes. Then, it will copy it into the local repository, to make it available for the next builds.įor example, a foo-1.0.jar library is considered as a stable version, and if Maven finds it in the local repository, it will use this one for the current build. If a stable version is not found there, it will search the remote repositories (defined in settings.xml or pom.xml) to retrieve this dependency. When you build an application, Maven will search for dependencies in the local repository. I just wanted to add some information regarding the behavior of Maven when it finds a SNAPSHOT dependency. The three others answers provide you a good vision of what a -SNAPSHOT version is.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |