zoukankan      html  css  js  c++  java
  • 在项目中使用maven私服

    私服地址

    http://10.250.95.30:8081

    使用方法,

    1. 从私服中下载你需要的maven 插件

      打开maven目录下的conf\settings.xml

      <profiles>加入这一段

    <profile>

    <id>nexus</id>

    <activation>

    <activeByDefault>true</activeByDefault>

    </activation>

    <repositories>

    <repository>

    <id>nexus</id>

    <url>http://10.250.95.30:8081/nexus/content/repositories/central/</url>

    <snapshots>

    <enabled>true</enabled>

    <updatePolicy>daily</updatePolicy>

    <checksumPolicy>warn</checksumPolicy>

    </snapshots>

    <releases>

    <enabled>true</enabled>

    <checksumPolicy>warn</checksumPolicy>

    </releases>

    </repository>

    </repositories>

    <pluginRepositories>

    <pluginRepository>

    <id>nexus</id>

    <url>http://10.250.95.30:8081/nexus/content/repositories/central/</url>

    <snapshots>

    <enabled>false</enabled>

    </snapshots>

    <releases>

    <enabled>true</enabled>

    <checksumPolicy>warn</checksumPolicy>

    </releases>

    </pluginRepository>

    </pluginRepositories>

    <properties>

    <downloadSources>true</downloadSources>

    <downloadJavadocs>false</downloadJavadocs>

    </properties>

    </profile>

    </profiles>

    1. 把你的插件发布到私服中

      发布需要相应的权限

    1,在<servers>中加入:

    <server>

    <id>nexus-release</id>

    <username>admin</username>

    <password>admin123</password>

    </server>

    <server>

    <id>nexus-snapshots</id>

    <username>admin</username>

    <password>admin123</password>

    </server>

    2在你的pom.xml中<distributionManagement>标签中加入

     

    <repository>

    <id>nexus-release</id>

    <url>http://10.250.95.30:8081/nexus/content/repositories/thirdparty</url>

    </repository>

    <snapshotRepository>

    <id>nexus-snapshots</id>

    <url>http://10.250.95.30:8081/nexus/content/repositories/thirdparty/</url>

    </snapshotRepository>

    3当你开发完成后只需输入mvn deploy即可发布到远程仓库

  • 相关阅读:
    oracle之 监听器无法启动的几个原因总结
    Hive之 数据类型
    Hive之 hive的三种使用方式(CLI、HWI、Thrift)
    Hive之 hive架构
    megajson 高性能的json序列化、反序列化工具
    golang json 处理的一些例子代码
    Golang把所有包括底层类库,输出到stderr的内容, 重新定向到一个日志文件里面?
    Golang的 signal
    OAuth 2.0
    golang产生guid
  • 原文地址:https://www.cnblogs.com/lxhomj/p/2592904.html
Copyright © 2011-2022 走看看