This Question is answered successfully by checking Preferences
/Settings
> Build, Execution, Deployment
> Build tools
> Maven
> Always update snapshots
(checkbox) in IntelliJ IDEA.
➠What exactly does that setting do?
The documentation is unhelpful.
Always update snapshots
Select this checkbox, if you want IntelliJ IDEA to update snapshots on sync.
My guess is that since SNAPSHOT dependencies may be continually worked on, that they may have changes while in development. As for your questions:
- What snapshots?
Any snapshot dependencies you have in your pom.xml
(or equivalent). This would typically (but not necessarily) be anything that you depend on with a version ending in '-SNAPSHOT'.
- In sync with what?
With the repository you initially pulled it from. Maven has its own local cache, ".m2" (and actually, IntelliJ has its own Maven cache as well), so it's asking if it should pull it down from the repo even if you have a local copy.
- Why would I not want to stay in sync?
If you found a "version" of the snapshot version that works, you may just want to use it until the release build is out. It also increases build times to pull down new versions, and uses up bandwidth (although that should probably not be an issue).
- Why is this not checked by default?
Because if an update is suddenly pushed that breaks things, it could be frustrating/unreliable/etc.
However, if you're waiting for a certain feature to be implemented and you need it ASAP, or if you're working on the dependency project and constantly updating it while debugging, then keeping SNAPSHOT dependencies up-to-date may make sense.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With