Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to force maven to update local repo

I compiled a jar file in one project so it can be consumed in the 2nd one. I can see the jar file in .m2 folder. But in the 2nd project it complains about artifact not found. I guess I have to force maven to update indices/cache something but don't know what exactly. Any tip, thanks.

Update: thanks for all good suggestions. Turns out that the maven plugin (of IntelliJ) in the second project doesn't update its index. I use command line it compiled ok.

like image 837
EyeQ Tech Avatar asked Mar 28 '13 02:03

EyeQ Tech


People also ask

How do I force Maven to redownload dependencies?

In Maven, you can use Apache Maven Dependency Plugin, goal dependency:purge-local-repository to remove the project dependencies from the local repository, and re-download it again.

How do I force a Maven project to update in Eclipse?

Update Maven settings in Eclipse. Right-click your project and select Maven Update Project and update your project.


1 Answers

try using -U (aka --update-snapshots) when you run maven

And make sure the dependency definition is correct

like image 128
EdH Avatar answered Oct 02 '22 17:10

EdH