我对比了一些maven的私服以后,感觉nexus最好使,把搭建的过程步骤一下吧,我的环境是cent5, tomcat 6
1、下载war包,部署到tomcat中,启动tomcat;
2、访问:http://xxx/nexus-1.1.1/index.html;
3、用admin/admin123登录;
4、修改admin的密码,但是不要修改别的属性和修改别的用户信息
5、进入administration中的repositories,依次修改三个type是proxy的项目,将其Download Remote Indexes修改为true;然后邮件他们,分别re-index一下;
6、将你自己机器上的manven缓存(一般是在C:\Documents and Settings\登录名\.m2下面)全部拷贝到/home/你的用户名/sonatype-work/nexus/storage下面的central和releases各一份;
7、修改你本地的(一般是在C:\Documents and Settings\登录名\.m2下面)setting.xml文件改成下面的:
<settings>
<proxies>
<proxy>
<id>normal</id>
<active>true</active>
<protocol>http</protocol>
<username>deployment</username>
<password>deploy</password>
<host>172.19.0.177:8080/nexus-1.1.1</host>
<port>80</port>
<nonProxyHosts>172.19.0.177:8080/nexus-1.1.1</nonProxyHosts>
</proxy>
</proxies>
<servers>
</servers>
<mirrors>
<mirror>
<id>nexus-public-snapshots</id>
<mirrorOf>public-snapshots</mirrorOf>
<url>http://172.19.0.177:8080/nexus-1.1.1/content/groups/public-snapshots</url>
</mirror>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://172.19.0.177:8080/nexus-1.1.1/content/groups/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>development</id>
<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>
<profile>
<id>public-snapshots</id>
<repositories>
<repository>
<id>public-snapshots</id>
<url>http://public-snapshots</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>public-snapshots</id>
<url>http://public-snapshots</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>development</activeProfile>
</activeProfiles>
</settings>
将172.19.0.177地址修改为你自己的服务器地址
8、在你的项目中的pom.xml中增加一段:
<distributionManagement>
<repository>
<id>repo</id>
<name>public</name>
<url>http://172.19.0.177:8080/nexus-1.1.1/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>Snapshots</id>
<name>Snapshots</name>
<url>http://172.19.0.177:8080/nexus-1.1.1/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
这样一来经过我的测试,如果你在没有局域网的环境中(也就是没办法访问你的私服),只要将pom里面的那段删除就可以了。
分享到:
- 2008-12-29 16:12
- 浏览 1454
- 评论(0)
- 论坛回复 / 浏览 (0 / 9926)
- 查看更多
相关推荐
Maven Nexus 私服搭建 从零开始,资源下载、安装指导、开发配置说明
Windows 下Nexus搭建Maven私服 Windows 下Nexus搭建Maven私服
这个时候,我们不得不为自己的团队搭建属于自己的 Maven 私服,这样既节省了网络带宽也会加速项目搭建的进程。 Nexus 的下载和安装 Nexus 的下载地址是 http://www.sonatype.org/nexus/go。下载完成后,解压缩到...
关于使用Nexus搭建Maven私服的开发文档。新手了解一下。
详细介绍了nexus私服的配置及安装方法
maven使用及Nexus搭建Maven私服
maven maven私服 nexus 私服
nexus maven私服搭建nexus maven私服搭建nexus maven私服搭建nexus maven私服搭建nexus maven私服搭建nexus maven私服搭建
nexus 搭建 maven仓库nexus 搭建 maven仓库nexus 搭建 maven仓库nexus 搭建 maven仓库nexus 搭建 maven仓库
使用Nexus1.8搭建MAVEN私服详细步骤,以及在网页上上传JAR包
Maven nexus搭建,配截图,从建立到调用
提供了基于Nexus搭建Maven私服所需要的一切资源和个人经验,搭建后可maven deploy 上传自己的jar包。别人如何在自己的maven项目中引用我将单独再上传一份。
包含了一个父maven项目和及个子项目,可以作为搭建nexus私服的测试代码
linux下搭建内网maven私服
使用nexus 可以搭建maven私服,如何使用nexus搭建maven 本地服务器呢?
搭建Maven私服,并配置Nexus环境.rar
在CentOS7上用Nexus3搭建Maven私服。 一、需要的环境 CentOS 7里需要安装jdk8和Maven3,具体的安装步骤可以百度一下。 二、需要的包 需要nexus3的安装包,官网上https://www.sonatype.com/download-oss-sonatype...
nexus maven 私服搭建,附带搭建教程。
详细的使用Nexus搭建Maven私服的步骤指导