1、maven私服setting.xml的配置

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  5. <localRepository>d:\repositories</localRepository>
  6.  
  7. <pluginGroups></pluginGroups>
  8.  
  9. <proxies></proxies>
  10.  
  11. <servers>
  12. <server>
  13. <id>nexus-releases</id>
  14. <username>admin</username>
  15. <password>admin123</password>
  16. </server>
  17.  
  18. <server>
  19. <id>nexus-snapshots</id>
  20. <username>admin</username>
  21. <password>admin123</password>
  22. </server>
  23. </servers>
  24.  
  25. <mirrors></mirrors>
  26.  
  27. <profiles>
  28. <profile>
  29. <id>center</id>
  30. <repositories>
  31. <repository>
  32. <id>nexus</id>
  33. <name>nexus</name>
  34. <url>http://192.168.1.147:8081/nexus/content/groups/public/</url>
  35. <releases>
  36. <enabled>true</enabled>
  37. </releases>
  38. <snapshots>
  39. <enabled>true</enabled>
  40. </snapshots>
  41. </repository>
  42. </repositories>
  43.  
  44. <pluginRepositories>
  45. <pluginRepository>
  46. <id>nexus</id>
  47. <name>nexus</name>
  48. <url>http://192.168.1.147:8081/nexus/content/groups/public/</url>
  49. <releases>
  50. <enabled>true</enabled>
  51. </releases>
  52. <snapshots>
  53. <enabled>true</enabled>
  54. </snapshots>
  55. </pluginRepository>
  56. </pluginRepositories>
  57. </profile>
  58.  
  59. </profiles>
  60.  
  61. <activeProfiles>
  62. <activeProfile>center</activeProfile>
  63. </activeProfiles>
  64. </settings>

2、maven项目的pom.xml配置

  1. </dependencies>
  2.  
  3. <distributionManagement>
  4. <repository>
  5. <id>nexus-releases</id>
  6. <name>Nexus Release Repository</name>
  7. <url>http://192.168.1.147:8081/nexus/content/repositories/releases/</url>
  8. </repository>
  9. <snapshotRepository>
  10. <id>nexus-snapshots</id>
  11. <name>Nexus Snapshot Repository</name>
  12. <url>http://192.168.1.147:8081/nexus/content/repositories/snapshots/</url>
  13. </snapshotRepository>
  14. </distributionManagement>
  15.  
  16. <build>

 注意:id取值来自私服上repositories对应的name列

 注意:id取值来自私服上repositories对应的name列

 注意:id取值来自私服上repositories对应的name列

打包发布到私服:deploy

maven私服配置的更多相关文章

  1. Maven 私服配置 转

    1.配置Nexus为maven的私服 第一种方式:在项目的POM中如下配置 <repositories>     <repository>         <id> ...

  2. maven 私服 配置 转

    3 . Nexus预置的仓库 点击左侧 Repositories 链接,查看 Nexus 内置的仓库: Nexus 的仓库分为这么几类: hosted 宿主仓库:主要用于部署无法从公共仓库获取的构件( ...

  3. Maven私服配置Setting和Pom文件

    上一遍博客已经在linux服务器上,搭建好nexus私服了 现在就需要配置setting.xml和pom.xml来使nexus作为maven的私服.setting.xml文件在conf下面,pom.x ...

  4. maven私服-配置本地私服环境之jar包下载环境搭建

    我们前面已经搭建好环境了,就是maven里没有代码,如何导入jar包管理jar包 maven-public仓库组:已有 maven-central代理仓库:从直接代理maven中央仓库,修改为代理阿里 ...

  5. 搭建Maven私服

    最近从SVN下载的代码,在本地构建时出现了诸多问题,部分依赖下载超时,就想起在局域网搭建Maven私服,废话不说了,在测试服务器上建的已经成功,就随便找台机子再练习一遍顺道写个日志.1.前往http: ...

  6. 发布本地项目和源码到maven私服中

    有时候我们会使用第三方包到我们的项目中,但是想看源码的时候,需要下载源码查看,十分麻烦. 不如把源码上传到maven私服中,这样查看源码的时候就可以直接从mvaen nexus下载直接查看了. 方法如 ...

  7. Maven 私服你应该不陌生吧,可你会用 Artifactory 搭建吗?

    JFrog Artifactory 是一个 Artifacts 仓库管理平台,它支持所有的主流打包格式.构建工具和持续集成(CI)服务器.它将所有二进制内容保存在一个单一位置并提供一个接口,这使得用户 ...

  8. 【Maven】---Nexus私服配置Setting和Pom

    maven---nexus私服配置setting和pom 上一遍博客已经在linux服务器上,搭建好nexus私服了,博客地址:Linux搭建Nexus3.X私服 现在就需要配置setting.xml ...

  9. Maven中阿里云私服配置

    在国内maven仓库连接速度太慢 ,虽然对于很多互联网企业和大中型软件公司,建个镜像是分分钟的事.但对于个人开发者确实是个问题.解决办法可以用阿里云的MAVEN私服.有两种方法: 1.在$MAVEN_ ...

随机推荐

  1. day15(mysql之零碎知识)

    数据完整性 实体完整性 实体: 表中一行(一行记录)代替一个实体 实体完整性的作用: 标识每一行数据不重复. 约束类型: 主键约束, 唯一约束,自动增长列. 主键约束: 标识该列唯一,非空. 注:   ...

  2. HDU4081 Qin Shi Huang's National Road System 2017-05-10 23:16 41人阅读 评论(0) 收藏

    Qin Shi Huang's National Road System                                                                 ...

  3. 机器学习---K最近邻(k-Nearest Neighbour,KNN)分类算法

    K最近邻(k-Nearest Neighbour,KNN)分类算法 1.K最近邻(k-Nearest Neighbour,KNN) K最近邻(k-Nearest Neighbour,KNN)分类算法, ...

  4. ajax和SSH请求中乱码的一些解决方法

    乱码的原因无非就是两端的编码方式不同. ajax方的编码 ajax无论是get还是post,都可以在content-type中设置charset为utf-8,或者beforesend中在sethead ...

  5. EBS 中查看LOV中的查询语句

    http://blog.csdn.net/shishun123/article/details/6874824 一直有实施顾问询问我XXForm的XX LOV是什么逻辑,取数SQL是什么来着,以前比较 ...

  6. 编译Bootstrap,定制自己的模板

    完全不懂LESS,也懒的去学习它,凭多年的经验,感觉也不用专门花时间去学习了.反正它应该是很成熟的,能执行即可.我用的是WIN7,为了定制颜色等各种特性,需要重新编译Bootstrap.在网上到处中, ...

  7. 深入理解Aspnet Core之Identity(3)

    主题 账户管理一个比较常见的功能就是密码强度策略,Identity已经内置了一个通用的可配置的策略,我们一般情况下可以直接拿来用即可.本篇我会介绍一些Identity内置的密码策略类:Password ...

  8. 利用MVC5+EF6搭建博客系统

    https://www.cnblogs.com/wyt007/p/7880137.html

  9. pageadmin CMS网站制作教程:模板中的站点数据调用

    pageadmin CMS网站建设教程:模板中的站点数据调用 1.获取当前站点Id,返回int数字 Html.CurrentSiteId() 2.获取当前站点url地址,返回string字符串 Htm ...

  10. Android Google Analytics

    基础知识: 一个统计条目包含两类,一种是 screen,另一种是 event. Screen 包括 screen name. Event 包括  category,action,label 和 val ...