[MNG-7802] Fix behaviour of the maven update policy
- Dominant language
- Java
- Stars
- 5.3k
- Forks
- 3.1k
- Avg merge
- 21h 11m
- Merged PRs (30d)
- 312
Description
**[Guillaume Nodet](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=gnt)** opened **[MNG-7802](https://issues.apache.org/jira/browse/MNG-7802?redirect=false)** and commented
The update policy can be specified using the `-U` (force update) or `-nsu` (no update) options, but those options change the whole repository session policy and override any settings on the repositories.
This means that if `-U` is set, the resolver will attempt to check already downloaded artifacts. This is wrong and the behaviour has been inherited from maven 2.x.
What we really wants (and what's implied by the name of the options and docs) is to check for new artifacts / updates, so this mainly affect _version resolution_ and not {_}artifact resolution{_}.
---
**Issue Links:**
- [MNG-7803](https://issues.apache.org/jira/browse/MNG-7803) Deprecate -U and -nsu and provide correct options reflecting the real behaviour
- [MNG-7801](https://issues.apache.org/jira/browse/MNG-7801) Clean doc for repositories policies
**Remote Links:**
- [GitHub Pull Request #1144
](https://github.com/apache/maven/pull/1144)
Contributor guide
Assessment
This issue has not been assessed yet.