`

nexus-2.1.1安装及使用入门

 
阅读更多
1. 安装
地址http://www.sonatype.org/nexus/

解压之后先安装服务,每次开机自动启动
引用
nexus-2.1.1\bin\jsw\windows-x86-32\install-nexus.bat


然后查看日志,应该自动启动
console-nexus.bat


start-nexus.bat,stop-nexus.bat开始停止脚本

2. 所有maven应用都使用nexus的配置
copy一份settings.xml到C:\Documents and Settings\caiwen\.m2
settings.xml中添加mirror
<mirror>
      <id>nexus</id>
      <mirrorOf>*</mirrorOf>   
      <url>http://localhost:8081/nexus/content/groups/public</url>
    </mirror>


添加profile
  	<profile>
      <id>nexus</id>
      <repositories>
        <repository>
            <id>nexus</id>
            <name>nexus</name>
            <url>http://central</url>
            <releases><enabled>true</enabled></releases>
            <snapshots><enabled>true</enabled></snapshots>
        </repository>       
      </repositories>
      <pluginRepositories>
        <pluginRepository>
            <id>nexus</id>
            <name>nexus</name>
            <url>http://central</url>
            <releases><enabled>true</enabled></releases>
            <snapshots><enabled>true</enabled></snapshots>
        </pluginRepository>     
       </pluginRepositories>
    </profile>


激活profile
 <activeProfiles>
    <activeProfile>nexus</activeProfile>
  </activeProfiles>



3. 为了eclipse能够搜索本地仓库,需要enable索引


然后新建一个定时任务,发布索引


这样重启eclipse会更新nexus的索引


4. 上传第三方jar
  • 大小: 65.8 KB
  • 大小: 44.1 KB
  • 大小: 57.9 KB
  • 大小: 32.2 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics