I have a maven project that was built on the commandline for eclipse and one of the dependencies is constantly changing. How do I update this dependency on the commandline as I have heard that it is a bad idea to mix m2e plugin and commandline. Furthermore, I tried running mvn eclipse:eclipse
on the command line and it messes up the project in eclipse removing the dependencies folder.
icon in the Maven tool window to open the Maven settings. Select Repositories from options on the left. On the Repositories page, click Update to update Maven repositories. After the update is finished, click OK.
You can right-click on your project then Maven > Update Project..., then select Force Update of Snapshots/Releases checkbox then click OK.
mvn clean install -U
-U
means force update of dependencies.
Also, if you want to import the project into eclipse, I first run:
mvn eclipse:eclipse
then run
mvn eclipse:clean
Seems to work for me, but that's just my pennies worth.
If you just want to re-load/update dependencies (I assume, with constantly changing you mean either SNAPSHOTS or local dependencies you update yourself), you can use
mvn dependency:resolve
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