Eclipse – the difference between “Update snapshots” and “Update dependencies” in m2eclipse

eclipsem2eclipsemaven-2

Assuming you're already using the m2eclipse plugin, if you right-click on a Maven project there is a Maven submenu.

Two of the actions available in this submenu are:

  • Update dependencies
  • Update snapshots

I've found an answer that says that "Update snapshots" is equivalent to using the -U parameter for mvn.

If "update snapshots" is the same as mvn -U what does "update dependencies" do?

Best Answer

Snapshots are dependencies, but used slightly differently. Specific dependency is determined using group, name and version. These attributes can be identical for two different snapshots. Maven uses the latest snapshot based on internal time stamp.

Shapshots are beneficial during development of the project where you don't want to change its version but want your users to use the latest build.

So... "update dependencies" downloads dependencies you don't have, leaving the ones you have intact, "update snapshots" updates your snapshots in place to the latest build.

I hope this helps.