windows服务器maven私服搭建
来源:互联网 发布:windows 10企业版激活 编辑:程序博客网 时间:2024/06/05 01:54
Windows系统,通过nexus来搭建maven私服
1.下载地址
https://www.sonatype.com/download-oss-sonatype
2.安装步骤
解压到指定文件夹下
我这里直接点击nexus.exe会闪退,所以在cmd窗口中进行操作
安装:nexus.exe /install卸载:nexus.exe /unistall启动:nexus.exe /start停止:neuxs.exe /stop
3.安装完成并启动后,直接访问:127.0.0.1:8081(默认端口)
用户名:admin 密码:admin123
修改端口,只需找到配置文件
4.访问界面
5.settings.xml设置
(1)从私服中下载jar包
添加一个镜像
<mirror>
<id>maven-public</id>
<mirrorOf>*</mirrorOf>
<url>http://****/repository/maven-public/</url>
</mirror>
<profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>maven-public</id>
<url>http://maven-public</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>maven-releases</id>
<url>http://maven-releases</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>maven-snapshots</id>
<url>http://maven-snapshots</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>maven-public</id>
<url>http://maven-public</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
<pluginRepository>
<id>maven-releases</id>
<url>http://maven-releases</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
<pluginRepository>
<id>maven-snapshots</id>
<url>http://maven-snapshots</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
(2)将jar包deploy到私服上
settings.xml 授权
<servers>
<server>
<id>maven-public</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>maven-releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>maven-snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>
pom.xml文件设置
<distributionManagement>
<repository>
<id>maven-releases</id>
<name>Nexus Release Repository</name>
<url>http://****/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>maven-snapshots</id>
<name>Nexus Snapshot Repository</name>
<url>http://****/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
6.在components中找jar包
7.将下载的jar包发布到私服上
mvn deploy:deploy-file -DgroupId=com.alipay -DartifactId=alipay-sdk -Dversion=1.0 -Dpackaging=jar -Dfile=C:/Users/Desktop/alipay-sdk-java20170307171631.jar -Durl=http://192.168.1.216:8181/repository/maven-releases/ -DrepositoryId=maven-releases
修改相应参数(打包时应放到releases里)
8.批量删除lastUpdate文件
进入仓库目录下
- Windows Maven(nexus) 服务器、私服搭建
- windows服务器maven私服搭建
- Windows 下Nexus搭建Maven服务器
- Windows下Maven私服怎么搭建
- windows环境下maven私服搭建(借助…
- nexus2.x搭建maven私服教程(windows环境)
- Windows平台上Maven私服的搭建
- maven服务器搭建-archiva
- 搭建局域网Maven服务器
- 如何搭建Maven服务器
- 搭建局域网Maven服务器
- maven本地服务器搭建
- maven服务器搭建
- 搭建maven服务器
- nexus搭建maven服务器
- maven服务器搭建
- Maven服务器搭建经验总结
- Windows搭建Maven环境
- NTP注意事项
- 配置YUM源的步骤
- Objective-C 运行时编程指南 之 Declared Properties
- AccessibilityService 一个类似辅助的类
- 微信总结2017/2/20—2017/2/26
- windows服务器maven私服搭建
- error: invalid new-expression of abstract class type 'Rectangle'
- Spring(本质创建对象和组装对象思想)的一些小问题及解答
- acm练习2017 02 26
- 碰撞检测 笔记
- javaScript Date
- 杨辉三角形模板
- UVa 1368 DNA Consensus String
- UVa 10003 Cutting Sticks 超详细题解(区间DP经典)