Have found that almost always need to specify -U in maven commands. Is there a way to do this with the MAVEN_OPTS environment variable?
Asked
Active
Viewed 433 times
1
-
Possible duplicate of [Maven automatic SNAPSHOT update](http://stackoverflow.com/questions/2358965/maven-automatic-snapshot-update) – A_Di-Matteo Jul 22 '16 at 11:10
-
check the linked post, you are most probably looking for the `always` for `updatePolicy` – A_Di-Matteo Jul 22 '16 at 11:11
-
The -U options is primarily for SNAPSHOT versions. This can be better handled with the update policy as @A_Di-Matteo already mentioned. – khmarbaise Jul 22 '16 at 13:46
-
1-U is also for missing release versions, which is the case I am interested in – Solubris Jul 22 '16 at 15:47
1 Answers
0
You can configure your local settings (usually in ~/.m2/settings.xml) following the reference page in http://maven.apache.org/ref/3.3.9/maven-settings/settings.html
The option to be set is updatePolicy
updatePolicy: The frequency for downloading updates - can be "always", "daily" (default), "interval:XXX" (in minutes) or "never" (only if it doesn't exist locally).

Tomazini
- 106
- 2