---
title: "nexus服务搭建"
author: "cjx186"
date: "2010-02-22T01:18:41Z"
tags: []
categories: ["企业架构"]
slug: "nexus"
draft: false
lastmod: "2010-02-22T01:19:39Z"
id: 599806
url: "https://xml.iteye.com/blog/599806"
---

1.[下载Nexus](http://nexus.sonatype.org/downloads/)
2.解压即可 配置文件($nexus_path/conf/plexus.properties):
```xml

application-port=8081
application-host=0.0.0.0
runtime=${basedir}/runtime
apps=${runtime}/apps
nexus-work=${basedir}/../sonatype-work/nexus
webapp=${runtime}/apps/nexus/webapp
webapp-context-path=/nexus
security-xml-file=${nexus-work}/conf/security.xml
application-conf=${nexus-work}/conf

# If this file is present, it will be used to configure Jetty.
jetty.xml=${basedir}/conf/jetty.xml
```
端口如有冲突可以改一下,在第一行.其它的默认就行.
3.访问 <http://127.0.0.1:8081/nexus/>
<span style="color:darkblue">  user:      admin
  password:  admin123</span>
4.自定义库配置
网上除了maven官方之外还有很多站点提供maven依赖库的下载,需要注意如果有提示包下载失败,一定要先手动考贝日志中打印的路径到IE验证是否能拿到包信息.
首先进入到Repositories视图然后点Add button,得到如附件所示(添加一个新仓库的示例)

```java
http://www.ibiblio.org/maven/mule/dependencies/maven2/
```


![](http://dl.iteye.com/upload/attachment/207601/10c98a3c-222a-3380-bf70-3e26f0fc7a39.jpg)

5.参考文章
maven 权威指南：十六章 仓库管理
<http://www.sonatype.com/books/maven-book/reference_zh/repository-manager.html>