我们知道,每一个公司都会有自己的工具包或公共包。这样的包就能够上传到公司的maven私服,就不用每一个人都去同步开发包了。

那么,怎么把本地项目打包并公布到私服呢?依照例如以下步骤就能够轻松完毕。

1.  在setting.xml文件里添加例如以下内容:

 <servers>
<server>
<!-- 公布的位置在POM中配置。以ID为关联,有非常多公用的信息须要配置在POM文件中,最佳实践是定义一个公司级别的root pom -->
<id>nexus</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>nexus-snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>thirdparty</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>

2. 在项目的pom.xml文件里添加例如以下内容

  <distributionManagement>
<repository>
<id>nexus</id>
<name>local private nexus</name>
<url>http://192.168.xx.xx:8081/nexus/content/groups/public</url>
</repository>
<snapshotRepository>
<id>nexus-snapshots</id>
<name>local private nexus snapshots</name>
<url>http://192.168.xx.xx:8081/nexus/content/groups/public-snapshots</url>
</snapshotRepository>
</distributionManagement> 
<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);"> </span>

3.  在项目的 maven bulider中的Goals输入例如以下内容

deploy:deploy-file -DgroupId=com.ivifi.tools -DartifactId=ivifi.tools -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=D:\git\tools\visn.tools\target\ivifi.tools-1.0-SNAPSHOT.jar  -Durl=http://192.168.xx.xx:8081/nexus/content/repositories/thirdparty/ -DrepositoryId=thirdparty

eclipse中maven插件上传项目jar包到私服的更多相关文章

  1. maven插件上传本地jar包到maven中央仓库

    settings配置(如果设置后有问题,可以重启idea,保证重新加载settings文件): <!-- 上传jar包到maven中央仓库配置start --> <server> ...

  2. eclipse中使用git上传项目

    eclipse中使用git上传项目 先需要上传到本地仓库 先找到此选项打钩 再如下 再添加的属性则可以自动填充邮箱和密码 之后 右键选择import 点击找到git 选中 下一步  如果没有找到git ...

  3. maven上传本地jar包到私服

    场景 1. 本地jar包上传到私服 思路: 1. maven的settting.xml配置私服的帐号密码 2. pom.xml配置上传的地址 3. 执行 mvn deploy 部署jar包到私服 步骤 ...

  4. Eclipse添加git插件上传项目到github

    前提: 在Github已经注册成功自己的账号 新建一个仓库 创建成功后记住url: 首先像安装Pydev一样 点击help的Install New Software 点击Add后添加链接http:// ...

  5. Nexus-在项目中使用Maven私服,Deploy到私服、上传第三方jar包、在项目中使用私服jar包

    场景 Ubuntu Server 上使用Docker Compose 部署Nexus(图文教程): https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/ ...

  6. Maven入门:使用Nexus搭建Maven私服及上传下载jar包

    一. 私服搭建及配置 1 . 私服简介 私服是架设在局域网的一种特殊的远程仓库,目的是代理远程仓库及部署第三方构件.有了私服之后,当 Maven 需要下载构件时,直接请求私服,私服上存在则下载到本地仓 ...

  7. Eclipse中导入github上的项目

    Eclipse中导入github上的项目 转载至: http://blog.csdn.net/hil2000/article/details/8566456 1.首先在github.com上申请一个账 ...

  8. 使用IDEA的Git插件上传项目教程

    如何使用IDEA的Git插件上传项目 一.在https://www.cnblogs.com/zyx110/p/10799387.html中下载 二.注册码云账号 搜索gitee码云插件并安装

  9. eclipse导出maven工程的可执行jar包

    一.eclipse导出maven工程的可执行jar包 建立两个maven工程 ZKServer 和ZKClient 注意:用maven进行开发管理的话,默认的打出来的jar包是不能运行的,需要在pom ...

随机推荐

  1. 光线步进——RayMarching入门

    入门实现 先用RayMarching描绘一个球体,最后在进行光照计算参考:https://www.shadertoy.com/view/llt3R4 模拟摄像机射线float3 rayDirectio ...

  2. flask_第一个程序

    安装flask sudo pip3 install flask falsk最小应用 from flask import Flask app = Flask(__name__) @app.route(' ...

  3. Gear Pump: Why Install A Pressure Reducing Valve?

    When the     Gear Pump Manufacturers    prompts to install a gear pump, the following points should ...

  4. 自定义分隔符|/i|/x|/xs|需要转译

    小骆驼 第八章 用正则表达式进行匹配 #!/usr/bin/envperl use strict; use warnings; $_ ="#adchbehnyhme3534f\nvdh5ej ...

  5. 谈谈你对java的理解

    这个题目是考察多个方面 但是要回答出关键点: 1.平台无关性 2.GC 3.语言特性.泛型.反射.lamda 4.面向对象 5.类库 6.异常处理

  6. 彻底卸载WIN10 OneDrive

    彻底卸载WIN10 OneDrive @ECHO OFF %SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall RD "%UserProfil ...

  7. <Spring Data JPA>二 Spring Data Jpa

    1.pom依赖 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="htt ...

  8. 基于 NodeJs 打造 Web 在线聊天室

    Socket.IO 简介与基础环境搭建 任务时间:10min ~ 20min 关于 Socket.IO Socket.IO 可以实现在浏览器和服务器之间实时双向通信,本节课程将详细介绍 Socket. ...

  9. python 监控oracle 数据库

    import cx_Oracle import os db = cx_Oracle.connect('**********') print "Show Oracle Version: &qu ...

  10. google的三篇论文

    文章:MapReduce/GFS/BigTable三大技术资料 文章:Google File System(中文翻译) 文章:MapReduce:超大机群上的简单数据处理 文章:Google's Bi ...