Maven私服搭建——WINDOWS篇

安装Nexus windows版

官方安装文档

https://help.sonatype.com/repomanager3/installation/installation-methods

截取windows安装说明:

Windows

The zip archive can be unpacked using the Windows compression utility or a third party utility such as 7zip. Nexus Repository Manager should not be installed in the Program Files directory to avoid problems with Windows file registry virtualization. If you plan to run the repository manager as a specific user you can install it into the AppData\Local directory of that users home directory. Otherwise simply use e.g., C:\nexus or something similar, ensuring that the user running the application has full access. The Nexus Repository Manager executable nexus.exe can be found inside the bin directory and can be run as an application using the following command:

nexus.exe /run

Starting the repository manager with the run command will leave it running in the current shell and display the log output. The application can be accessed once the the log shows the message "Started Sonatype Nexus". The running application can be stopped using CTRL+C at the appropriate console.

The nexus.exe executable can be used to manage the repository manager as a service with the

 /start/stop/restart, /force-reload and /status commands.

 

官网下载window版,解压后如下图

配置path环境变量

进入命令窗口cmd,运行nexus.exe /run,成功启动!

验证成功 :输入localhost:8081 访问如下,首次登录密码随机,在\sonatype-work\nexus3\admin.password里

第一次登录需要填写admin密码。   这里密码是benbaba,next就结束了,后两个tap是告诉你成功了欢迎使用,没有用。

上传jar包,选择maven-release

选择jar包,填写groupid,artifactid,version,勾选generate a pom XXXX,然后upload。勾选的那个是上传的时候带着pom依赖,否则只上传jar,pom依赖上传后,当引用该jar包时,会自动引用pom中的其他依赖jar包,保证引用jar包的正确性。

 

使用,点击浏览maven,可找到该jar包的maven依赖,放入pom中即可

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值