Mykhaylo Adamovych
Mykhaylo Adamovych

Reputation: 20976

maven repository and dependencies download

I've used standard maven command mvn clean install and according to logs (in the same console window) dependencies were loaded and artifacts were installed to my dedicated directory for maven repository P:\.m2\repository. Maven build process succeeded. I'm using maven 2.2.1

Here is the problem. Repository directory is empty. What I'm missing?

Thanks.

Upvotes: 0

Views: 3916

Answers (4)

kinda_raffy
kinda_raffy

Reputation: 93

If you have deleted your .m2/ folder and need to recreate it, ensure you assign the proper permissions.

chmod -R 755 ~/.m2

Upvotes: 0

A.R.K.S
A.R.K.S

Reputation: 1802

I think you are using something like gitbash and its stripping off the backslashes in your repo value. run maven install with -X. check if you have a directory called P:\.m2repository

Upvotes: 0

Aaron Digulla
Aaron Digulla

Reputation: 328780

Some reasons:

  1. Someone deleted the folder (or it's content)
  2. Maven installed the files in a different place

I suggest to run mvn again with the option -X. Running mvn clean -X should be enough to see the paths which it uses to locate dependencies (install will download many more files but we need to see only one).

Note: P:\ sounds like a network drive. Even if this is your home folder (i.e. not shared with other people), this isn't a very good idea since it will cause a lot of network traffic and make your builds slow and brittle (in case of network problems).

Upvotes: 2

dyrkin
dyrkin

Reputation: 544

Did you change the repository location in your m2_install_dir/conf/settings.xml? If not, try to locate your files in something like: C:\Documents & Settings\your_username.m2 or C:\Users\your_username.m2

Upvotes: 1

Related Questions