---
title: "maven localRepository"
author: "fengpy2009"
date: "2012-03-27T10:42:30Z"
tags: []
categories: ["编程语言"]
slug: "maven-localrepository"
draft: false
lastmod: "2012-03-27T10:42:30Z"
id: 1464788
url: "https://fengpy2009.iteye.com/blog/1464788"
---

Find the following “**localRepository**” pattern, and define your new Maven local repository inside the “**&lt;localRepository&gt;**” element like this :

```
<settings>
  <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ~/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
 
<localRepository>D:/maven_repo</localRepository>
```