• maven私服


    一、入门
        1、下载并解压nexus文件
        2、运行nexusin
    exus.exe /run
        3、浏览器输入localhost:8081
        4、登录用户名admin,密码在E:sonatype-work
    exus3admin.password
        5、更改密码
        6、nexus配置文件nexusetc
    exus-default.properties
    二、上传jar包到私服
        1、settings.xml
            <servers>  
                <server>  
                    <id>releases</id>  
                    <username>admin</username>  
                    <password>admin123</password>  
                </server>  
                <server>  
                    <id>snapshots</id>  
                    <username>admin</username>  
                    <password>admin123</password>  
                </server>    
            </servers> 
        2、pom.xml
            <distributionManagement>  
                <repository>  
                    <id>releases</id>
                    <url>http://127.0.0.1:8081/nexus/content/repositories/releases/</url>  
                </repository>  
                <snapshotRepository>  
                    <id>snapshots</id>
                    <url>http://127.0.0.1:8081/nexus/content/repositories/snapshots/</url>  
                </snapshotRepository>
            </distributionManagement>
        3、项目运行mvn deploy命令
    三、从私服下载jar包
        1、settings.xml
            <profiles>  
                <profile>  
                    <id>dev</id>  
                    <repositories>  
                        <repository>  
                            <id>nexus</id>  
                            <url>http://127.0.0.1:8081/nexus/content/groups/public/</url>  
                            <releases>  
                                <enabled>true</enabled>  
                            </releases>  
                            <snapshots>  
                                <enabled>true</enabled>  
                            </snapshots>  
                        </repository>  
                    </repositories>  
                    <pluginRepositories>
                        <pluginRepository>
                            <id>public</id>
                            <name>Public Repositories</name>
                            <url>http://127.0.0.1:8081/nexus/content/groups/public/</url>
                        </pluginRepository>
                    </pluginRepositories>
                </profile>  
            </profiles>  
            <activeProfiles>  
                <activeProfile>dev</activeProfile>  
            </activeProfiles>  
    四、安装第三方jar包到本地仓库
        mvn install:install-file -DgroupId=com.wuxi -DartifactId=practice -Dversion=1.1.1 -Dpackaging=jar -Dfile=jarPath
    五、安装第三方jar包到私服
        1、settings.xml
            <servers>  
                <server>  
                    <id>thirdparty</id>  
                    <username>admin</username>  
                    <password>admin123</password>  
                </server>  
            </servers>
        2、项目运行命令
            mvn deploy:deploy-file -DgroupId=com.wuxi -DartifactId=practice -Dversion=1.1.1 -Dpackaging=jar -Dfile=jarPath -Durl=http://127.0.0.1:8081/nexus/content/repositories/thirdparty/ -DrepositoryId=thirdparty
  • 相关阅读:
    Spring 注解@Component,@Service,@Controller,@Repository
    HttpServlet service方法
    Intellij Idea生成serialVersionUID的方法
    创建数据库池实战
    代理模式
    基于SOA架构的TDD测试驱动开发模式
    服务治理要先于SOA
    简述我的SOA服务治理
    SOA服务类项目开发模式
    oracle容器化docker解决方案
  • 原文地址:https://www.cnblogs.com/linding/p/13623976.html
Copyright © 2020-2023  润新知