Maven dependency update on commandline

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.

Answers


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`

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


Need Your Help

How does an extern "C" declaration work?

c++ c extern-c

I'm taking a programming languages course and we're talking about the extern "C" declaration.

Garbage Collection and Threads

java clr memory-management blocking garbage-collection

AFAIK when a GC is doing its thing the VM blocks all running threads -- or at least when it is compacting the heap. Is this the case in modern implementions of the CLR and the JVM (Production vers...