---
title: "maven 添加 本地 jar"
author: "cjx186"
date: "2013-09-10T23:31:01Z"
tags: []
categories: ["操作系统"]
slug: "maven-jar"
draft: false
lastmod: "2013-09-10T23:33:40Z"
id: 1940368
url: "https://xml.iteye.com/blog/1940368"
---

先在pom.xml中添加一个资源：

```xml
<repositories>
    <repository>
        <id>project.repo</id>
        <name>Local dependencies for project</name>
        <!-- <url>file://${project.basedir}/lib</url> -->
        <url>file:${project.basedir}/repo</url>
    </repository>
</repositories>
```

再在添加一个依赖：
```xml
    <dependency> 
        <groupId>com.sina</groupId> 
        <artifactId>sae-local</artifactId>
        <version>1.1.0</version>
    </dependency> 
```