zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    Java重命名文件
    三星Samsung 4.4.2该负责人制度,简化名单
    hdu 1203 I NEED A OFFER!
    springMVC整合JAXB
    主流芯片解决方案Ambarella的高清网络摄像机、德州仪器和控制海思
    Objective-C路成魔【18-复制对象】
    QStyleFactory类参考
    QT QSqlQuery QSqlQueryModel
    linux mysql 卸载后重装
    更改Mysql数据库存储位置的具体步骤
  • 原文地址:https://www.cnblogs.com/linding/p/13623976.html
Copyright © 2011-2022 走看看