zoukankan      html  css  js  c++  java
  • docker安装nexus

    零、简介

    • 指定私服的中央地址,
    • 将自己的Maven项目指定到私服地址,
    • 从私服下载中央库的项目索引,
    • 从私服仓库下载依赖组件,
    • 将第三方项目jar上传到私服供其他项目组使用。

    一、docker下载nexus

    docker search nexus

    docker pull nexus...

    二、 启动nexus容器

    docker run -d -p 8081:8081 --name nexus -v /home/docker/nexus/data:/var/nexus-data --restart=always docker.io/sonatype/nexus3

    三、访问主页

    http://192.168.2.5:8081/

    默认用户名与密码:

    1、老版:admin/admin123

    2、新版:find / -name 'admin.password'

    登录后,提示重置密码,修改为admin即可 

       四、增加用户、建立仓库

       五、maven配置

        

       上传nexus私服: 

        <distributionManagement>
            <repository>
                <id>mayikt</id>
                <url>http://192.168.2.5:8081/repository/mayikt-release/</url>
            </repository>
        </distributionManagement>
    
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.0</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>

       从nexus引入:

       <repositories>
            <repository>
                <id>mqyikt</id>
                <url>http://192.168.2.5:8081/repository/mayikt-release/</url>
            </repository>
        </repositories>
  • 相关阅读:
    Linux命令-查看进程
    Linux命令-查看内存
    Linux命令---vim
    oracle分页查询按日期排序失败问题
    oracle使用between and边界问题
    给大家介绍一个自我感觉好用的网站
    想学习一下微服务
    oracle获取年、月、日
    mybatis返回map结果集
    修改表中列
  • 原文地址:https://www.cnblogs.com/flame540/p/13405033.html
Copyright © 2011-2022 走看看