nexus repo manager quickstart
nexus 官网
nexus quickstart
nexus 下载地址
nexus docker
as a proxy server for maven and npm builds.
follow each secion to:
- install nexus repo manager 3
- run it locally
- proxy a basic maven
我是后端,我就不管 npm
requirements
- jdk8
- maven
part1 install and start it
- create an installation directory
- download the most recent repository manager
nexus 下不下来,我安装的是 docker 镜像
docker run -d -p 8081:8081 --name nexus -e INSTALL4J_ADD_VM_PARAMS="-Xms1g -Xmx1g" sonatype/nexus3
docker logs -f nexus
docker exec -it nexus bash
我的阿里云 ecs 内存比较小, 配置一下
需要进入 container , cat /nexus-data/admin.password , 复制密码
4. wait until log “Started sonatype nexus”
5. type http://ecs:8081/
6. click sign in
7. complete the step-by-step modal to update your password and set anonymous access3. wait until log “Started sonatype nexus”
8. type http://ecs:8081/
9. click sign in
10. complete the step-by-step modal to update your password and set anonymous access3. wait until log “Started sonatype nexus”
11. type http://ecs:8081/
12. click sign in
13. complete the step-by-step modal to update your password and set anonymous access
我的是: admin admin123
part2 proxying maven components
- find this file in .m2/settings.xml
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://localhost:8081/repository/maven-public/</url>
</mirror>
</mirrors>
- click repositories
- click create repository and choose the maven2(proxy)
http://maven.aliyun.com/nexus/content/groups/public/