安装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
executable can be used to manage the repository manager as a service with thenexus
.exe
/
, start
/
, stop
/
,restart
/
and force-reload
/
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中即可