smartaudio 发表于 2008-7-18 22:44:06

mac 安装配置nexus3.0

mac 安装配置nexus3.0今天配置java 环境,安装nexus 百度了好久才安装好,所以特别写下来 分享给同样遇到问题的你。
废话不多说,直接上步骤前置条件 :已经安装了JDK1:下载nexus(http://www.sonatype.com/download-oss-sonatype) 最新版本3.02:解压下载文件,这里我放在了/Users/andy/nexus-3.0.0-03-mac/nexus-3.0.0-03这个目录下配置修改:
1:在Nexus的安装目录找到/bin/nexus
2:使用文本编辑器打开nexus
3:修改nexus 文件 ,设置nexus 安装的根路径 如我的修改:NEXUS_HOME="/Users/andy/nexus-3.0.0-03-mac/nexus-3.0.0-03";
以上三步,配置就完成了,当然还有一些其他的配置,目前用不上,暂时就不修改了,接下来可以启动看看是否成功运行安装目录下/bin下面的Nexus命令,即可启动Nexus:/Users/andy/nexus-3.0.0-03-mac/nexus-3.0.0-03/bin/nexus start
Nexus安装完成以后,成功启动服务以后,打开浏览器,输入:   http://localhost:8081/nexus/如果能成功访问。则说明安装成功了。
到这里neuxs的安装配置就完成了,下面介绍如何在mavne中使用自己的私服。nexus3.0 跟2.0版本操作起来有比较大的区别,一开始也不太会,最后看了官网的介绍,才配置起来
1:打开maven 的安装目录 ,编辑 settings.xml2:配置下载文件保存路径, 这里也可以使用默认的,不用配置 <localRepository>/Users/andy/chen/repository</localRepository>3:配置镜像      <mirrors>         <mirror>          <id>nexus</id>          <mirrorOf>*</mirrorOf>          <url>http://localhost:8081/repository/maven-public/</url>      </mirror>   </mirrors>4:设置中央工厂      <profiles>         <profile>            <id>nexus</id>            <!--Enable snapshots for the built in central repo to direct -->            <!--all requests to nexus via the mirror -->            <repositories>               <repository>                   <id>central</id>                   <url>http://central</url>                   <releases><enabled>true</enabled></releases>                   <snapshots><enabled>true</enabled></snapshots>                </repository>            </repositories>         <pluginRepositories>               <pluginRepository>                  <id>central</id>                  <url>http://central</url>                  <releases><enabled>true</enabled></releases>                  <snapshots><enabled>true</enabled></snapshots>               </pluginRepository>         </pluginRepositories>      </profile>   </profiles>5:激活设置    <activeProfiles>       <!--make the profile active all the time -->       <activeProfile>nexus</activeProfile>   </activeProfiles>
这样 maven+ nexus 已经设置完成了,只需要在eclipse 中添加maven 设置就OK 了。

yinpin666 发表于 2008-7-18 22:48:09

mac 安装配置nexus3.0 !:victory:
页: [1]
查看完整版本: mac 安装配置nexus3.0