Any command to install all missing files for maven project in .M2 folder?

16
February 13, 2018, at 4:40 PM

My maven project environment was set up few months back in working condition and then I deleted my m2 folder to create a different set up of environment other project. Now, I am trying to access the maven project environment but so many dependency files missing errors are thrown.

Any idea about the command which actually installs or gets the missing files from whole system ?

or any other way ?

Answer 1

From your question, we see either

  1. You have deleted the Maven Source Files
  2. You have deleted the Project dependency files

In first case, delete / uninstall the Maven from your system, and install a fresh package.

In the Second case, nothing to worry, just clean install for the project. Also, you could point the local repository to

<localRepository>c:\Maven\repository</localRepository>

in your POM

Answer 2

If you deleted the maven repo, than you have to uninstall/install it back. Or you have deleted the jars in User/m2/repository/com... than just simply build the project.

READ ALSO
How do I do coordination between multiple application instances?

How do I do coordination between multiple application instances?

Need help in deciding what frameworks I can use in this scenarioI'm exploring Zookeeper, but not completely sure on how to solution this usecase

47
Apache Curator NPE on serviceProvider.start()

Apache Curator NPE on serviceProvider.start()

I'm using Apache Curator discovery version 40

17
Is A New Object Instantiated Every Time This Loop Runs?

Is A New Object Instantiated Every Time This Loop Runs?

I was taking a Java test today and I got this weird question and I feel like I am right, but some of my classmates are saying another answer is rightThere was a basic class, a default constructor that initialized the instances, and some methods

12