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.
This question is related to
java
eclipse
maven
dependencies
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
mvn -Dschemaname=public liquibase:update
Simple run your project online i.e mvn clean install
. It fetches all the latest dependencies that you mention in your pom.xml and built the project
Source: Stackoverflow.com