zoukankan      html  css  js  c++  java
  • centeros 安装maven 私服

    1:下载nexus: 下载maven:

    2:解压缩 配置maven环境变量 cd /etc/profile

    MAVEN_HOME=/usr/maven
    export MAVEN_HOME
    export PATH=${PATH}:${MAVEN_HOME}/bin

    3:解压缩nexus 

    /usr/nexus/etc 中 cat nexus-default.properties查看nexus端口 默认8081

    application-port=8081
    application-host=0.0.0.0
    nexus-args=${jetty.etc}/jetty.xml,${jetty.etc}/jetty-http.xml,${jetty.etc}/jetty-requestlog.xml
    nexus-context-path=/

    4启动nexus

     ./bin/nexus start

    5 http://192.168.221.129:8081/nexus 访问nexus

    登录 默认admin admin123

    看提示创建用户 创建完成后退出 测试刚创建的用户是否能登录成功

     选择

    创建仓库

    至此nexus仓库创建完成

    在本地maven seting.xml中编辑:

     本地项目pom.xml中配置

    <!-- 发布本地项目到maven私服 -->
    <distributionManagement>
    <repository>
    <id>jxdtest</id>
    <name>jxdtest</name>
    <url>http://192.168.221.129:8081/repository/jxdtest/</url>
    </repository>
    </distributionManagement>
    <!-- 从私服下载jar包到本地 -->
    <repositories>
    <repository>
    <id>jxdtest</id><!-- 私服仓库名称 -->
    <name>jxdtest</name>
    <url>http://192.168.221.129:8081/repository/jxdtest</url>
    <snapshots>
    <enabled>false</enabled>
    </snapshots>
    </repository>
    </repositories>

    用clean deploy测试可以吧jar发布到私服上,没报错则成功

  • 相关阅读:
    10 vue中 v-model ,计算机demo
    linear-gradient
    flexible.js
    九宫格抽奖原理
    js匿名函数与闭包作用
    HTML5实现九宫格布局
    scrollLeft/scrollTop/scrollHeight
    通过media媒体查询设置ie7/8样式、使用media判断各机型、手淘flexible.js
    右击事件oncontentmenu
    js/jquery判断一个对象是否为空
  • 原文地址:https://www.cnblogs.com/coderdxj/p/9120644.html
Copyright © 2011-2022 走看看