For either STS or Eclipse for a project based in Maven, when in the pom.xml file a new dependency is added, normally I do:
- select project -> right click ->
Maven
->Update Project...
All go well.
I did do a research about to accomplish the same goal through a command. I found the following:
According with that can be used mvn dependency:resolve
.
If I do this through Run Configurations
to create a Maven Build
item, well through either dependency:resolve
or dependency:resolve -U
in many machines for different projects many times it fails, it indicating that the new dependencies can't be resolved.
Notes:
- Bandwidth is ok.
- I have never had this problem through
Maven
->Update Project...
. It works fine. The new dependencies are downloaded. - In the
Goals
field, themvn
term must be not used, it is used or included implicitly, otherwise arises an error.
So I am assuming that dependency:resolve
really does not represent Maven
-> Update Project...
So what is the correct command?