m2eclipse does not respect update policy setting
When updating Maven projects in Eclipse I would like Eclipse to always check for newer Snapshot dependencies in the repository and to download them.
It works for Maven from command line as I have set the updatePolicy to always in my settings.xml. But Eclipse does not respect this setting though I told Eclipse to use my settings.xml.
In Eclipse it works only if I click "Maven -> Update Project" and check the "Force Update of Snapshots/Releases" setting. Unfortunately this cannot be set as default.
Is this an intended behaviour or is it a bug of the m2eclipse plugin that the updatePolicy is not considered?
You can specify in the pom that snapshot dependencies should be updated. For example
<repositories> <repository> <id>myRepo</id> <url>http://hostname/path/to/repos/snapshots</url> <snapshots> <updatePolicy>always</updatePolicy> </snapshots> <releases> <updatePolicy>always</updatePolicy> </releases> </repository> </repositories>
I prefer to specify this kind of thing directly in the pom as opposed to in settings.xml because in the pom it's portable, as opposed to relying on settings.xml being configured correctly on every machine that does builds.
Plus, in your specific scenario, the pom setting is respected in Eclipse m2e.