3

By default Maven downloads all the dependencies to ${user.home}/.m2/repository/ dirctory.

I read about the tag LocalRepository which allows us to change the default path. I tried adding this tag add different locations in pom.xml file. But I could not find its exact location in the pom.xml file.

Do I need to put it in settings.xml or pom.xml?

can you please help me to add this tag to correct position in xml file.

<settings> <localRepository> D:\Ravindra\Projects\MavenSpringJar\ </localRepository> </settings>

Is it inside <project>,<dependencies>,<dependency> tag?

Thanks.

Ravindra12jan
  • 331
  • 2
  • 13

1 Answers1

3

The localRepository tag is only allowed within the setttings.xml file but not in the pom.xml file.

khmarbaise
  • 92,914
  • 28
  • 189
  • 235