Hi folks,

I've just come across what seems to be some very strange behaviour in Maven.
I'll try to explain as best I can the situation but it's a bit involved. So,
I started out with this set up working which was working perfectly:

maven 3.0.2 installed in d:\development\maven
maven projects installed in c:\users\me\documents\NetBeansProjects
.m2 directory in c:\users\me\.m2
nexus 1.9 used as a proxy for all the external repositories we use.

everything built fine with a "mvn clean install" both from inside NetBeans
and from the command line.

Today I decided to re-home my Documents folder onto the company NAS. So I
right click on the folder select location and change it to h:\documents.
Much file copying later and everything is moved over. Since file compilation
would be too slow over the network I move the NetBeans projects folder onto
D so now I have this:

maven 3.0.2 installed in d:\development\maven
maven projects installed in d:\development\NetBeansProjects
.m2 directory in c:\users\me\.m2
nexus 1.9 used as a proxy for all the external repositories we use.
my documents folder at h:\documents

Now here's where the problems start. When I tried to do a clean and build
maven re-downloaded everything and I got a bunch of warnings about not being
able to find various POM files. This confused the hell out of me since as
far as I could tell nothing do to with maven had changed. Then I noticed
that in my H drive I now had a shiny new .m2 directory. A little head
scratching later and I realized that the warnings were because there was no
settings.xml file in the h:\.m2 directory. Once I'd copied it over
from c:\users\me\.m2 everything built fine.

My question though is why did my maven create a new .m2 folder for me? I can
only assume that it must be using the location of the "my documents" folder
as it's queue for where to put the .m2 folder but surely it should be based
on the root folder of the user account by default. Is it possible to force
use c:\users\me\.m2 again as builds are now much slower since it has to drag
all the jar's over the network each time?

Thanks

Reply via email to