如何将本地jar批量同步将jar 安装到nexuss私服

Maven:将Jar安装到本地仓库和Jar上传到私服 - 简书
Maven:将Jar安装到本地仓库和Jar上传到私服
1、依赖如下:
&dependency&
&groupId&org.quartz-scheduler.internal&/groupId&
&artifactId&quartz-terracotta-bootstrap&/artifactId&
&version&2.2.2-SNAPSHOT&/version&
&/dependency&
将Jar包安装到本地仓库命令:
mvn install:install-file -Dfile=D:\quartz-terracotta-bootstrap-2.2.2-SNAPSHOT.jar -DgroupId=org.quartz-scheduler.internal -DartifactId=quartz-terracotta-bootstrap -Dversion=2.2.2-SNAPSHOT -Dpackaging=jar
-DgroupId和DartifactId构成了该jar包在pom.xml的坐标, 对应依赖的DgroupId和DartifactId
-Dfile表示需要上传的jar包的绝对路径
-Dpackaging 为安装文件的种类
2. 上传Jar到私服
mvn deploy:deploy-file -DgroupId=org.terracotta.toolkit -DartifactId=terracotta-toolkit-api-internal -Dversion=1.12 -Dpackaging=jar -Dfile=D:\terracotta-toolkit-api-internal-1.12.jar -Durl= -DrepositoryId=thirdparty
-DgroupId和DartifactId构成了该jar包在pom.xml的坐标, 对应依赖的DgroupId和DartifactId
-Dfile表示需要上传的jar包的绝对路径
-Durl私服上仓库的url精确地址(打开nexus左侧repositories菜单,可以看到该路径)
-DrepositoryId服务器的表示id,在nexus的configuration可以看到
爱生活,爱coding
|-1-更新内容[6.从仓库解析依赖的机制(重要)] 1Maven仓库作用 仓库用来存储所有项目使用到构件,在maven项目需要依赖时就从该仓库中获取需要的依赖添加到classpath供其使用。 1.1需求背景 非maven项目如果要使用依赖,在其项目目录下有一个lib文件...
首先私服是一种衍生出来的特殊的Maven远程仓库,构建私服的好处请看3.5私服 可以帮助大家建立私服的仓库管理软件:Apache基金会的Archiva,JFrog的Artifactory,Sonatype的Nexus,其中Nexus最流行。 1Nexus简介 Nexus的诞...
命令格式: mvn install:install-file -DgroupId= -DartifactId= -Dversion= -Dfile= -Dpackaging=jar -DgeneratePom=true 示例: mvn install:install-fil...
对于官方仓库没有的jar包,maven向本地仓库导入jar包用如下命令 Cmd代码 mvninstall:install-file -DgroupId=包名 -DartifactId=项目名 -Dversion=版本号 -Dpackaging=jar -Dfile=jar文...
之前IJPay Jar是上传到JitPack,但是有很多同学反馈说Jar无法下载。为了响应群众的号召,这次需要向中央仓库提交jar, 我们可以利用Sonatype OSSRH把Jar等资源提交给Maven的中央仓库。 Sonatype OSSRH介绍:Sonatype OS...
不管是老辈人还是年轻人,在挑选大件物品时都有一种品牌的情结,而在同等知名度的品牌面前,挑选者心里的天平又会不自觉地向国企倾斜。原因很简单,国企的产品往往具有经久耐用、质量过硬、信赖度高等特点,特别是需要长期使用的物件,国企产品不失为一个极好的选择。例如买房这件大事,以下五大...
标签: Integer 如果你运行下面的代码: 你得到的结果是 我们对生成的class文件进行反编译得到实际运行的代码 java中的数据类型,可分为两类: 基本数据类型,也称原始数据类型。byte,short,char,int,long,float,double,boole...
~4月2日,由中国国际经济技术交流中心、广州中山大学主办的第四届广州国际康复论坛,在广州保利世贸博览馆展开。 国内外近百名专家学者,相聚广州,面对面的交流。 专家学者们,通过现场演讲、论文评选的方式,从各个方面对康复领域进行主题研讨。 【WELL健康】的创...
《学习》 我的家庭学习老师是我的儿子,他教我背诵《弟子规》,《社会主义核心价值观》儿子刚上学,每天回来学习到的文章就背诵,我就鼓励他,好,挺好的,妈妈,你怎么都不会背呢?我说:&你当我的老师,教我,我以后就叫你小王老师。‘ 自从当上小老师,责任感非常强啦 !今天你还有两句没...
如果去医院检查,医生告知你已是“癌症晚期”,想必你的感觉定如晴天霹雳,万念俱灰。继而想尽一切办法,挽救生命于水火之中。如今你的朋友圈或许也已病入膏肓,而你仍不自知。那么尽快给它做次全面的检查吧,发现它满目疮痍的真面目,用最佳的治疗方案,拯救你,也拯救你的朋友!匿名用户不能发表回复!|
每天回帖即可获得10分可用分!小技巧:
你还可以输入10000个字符
(Ctrl+Enter)
请遵守CSDN,不得违反国家法律法规。
转载文章请注明出自“CSDN(www.csdn.net)”。如是商业用途请联系原作者。> 博客详情
摘要: 通过网页和maven两种方式,上传本地的jar到nexus私服,以及引用jar时,自动引用依赖
1通过网页上传
这种方法只是上传了jar包。通过maven引用当前jar,不能取得jar的依赖
from pom的方式,选择pom文件,以及jar。通过maven引入jar时,会自动加载jar的依赖
2通过maven的方式depoly
在maven的conf/setting.xml 配置nexus私服的管理账号
在servers标签下添加server
&&&&server&
&&&&&&&id&nexus-snapshots&/id&
&&&&&&&username&repouser&/username&
&&&&&&&password&repopwd&/password&
&&&&&/server&
id可自己定义一个名称 &以及私服的管理管的账号密码
在mirrors和profiles下配置nexus私服
&&&&&mirror&
&&&&&&&!--This&sends&everything&else&to&/public&--&
&&&&&&&id&nexus&/id&
&&&&&&&mirrorOf&*&/mirrorOf&
&&&&&&&url&http://192.168.10.8:18080/nexus/content/repositories/releases/&/url&
&&&&&/mirror&
&&&/mirrors&
&&&profiles&
&&&&&profile&
&&&&&&&id&nexus&/id&
&&&&&&&!--Enable&snapshots&for&the&built&in&central&repo&to&direct&--&
&&&&&&&!--all&requests&to&nexus&via&the&mirror&--&
&&&&&&&repositories&&
&&&&&&&&&repository&&
&&&&&&&&&&&&&id&nexus&/id&&
&&&&&&&&&&&&&name&local&private&nexus&/name&&
&&&&&&&&&&&&&url&http://192.168.10.8:18080/nexus/content/groups/public&/url&&
&&&&&&&&&&&&&releases&&enabled&true&/enabled&&updatePolicy&always&/updatePolicy&
&&&&&&&&&&&&&checksumPolicy&warn&/checksumPolicy&&/releases&&
&&&&&&&&&&&&&snapshots&&enabled&false&/enabled&&/snapshots&&
&&&&&&&&&/repository&&&&&&&&&
&&&&&&&/repositories&&
&&&&&&&pluginRepositories&&
&&&&&&&&&pluginRepository&&
&&&&&&&&&&&&&id&nexus&/id&&
&&&&&&&&&&&&&name&local&private&nexus&/name&&
&&&&&&&&&&&&&url&http://192.168.10.8:18080/nexus/content/groups/public&/url&&
&&&&&&&&&&&&&releases&&enabled&true&/enabled&&updatePolicy&always&/updatePolicy&
&&&&&&&&&&&&&checksumPolicy&warn&/checksumPolicy&&/releases&&
&&&&&&&&&&&&&snapshots&&enabled&false&/enabled&&/snapshots&&
&&&&&&&&&/pluginRepository&&&&&&&&&
&&&&&&&&/pluginRepositories&&
&&&&&/profile&
&&&/profiles&
&&&activeProfiles&
&&&&&!--make&the&profile&active&all&the&time&--&
&&&&&activeProfile&nexus&/activeProfile&
&&&/activeProfiles&
在项目的pom.xml中配置
&&distributionManagement&
&&&&&&&&&repository&
&&&&&&&&&&&&&id&nexus-releases&/id&
&&&&&&&&&&&&&name&Nexus&Release&Repository&/name&
&&&&&&&&&&&&&url&http://192.168.10.8:18080/nexus/content/repositories/releases/&/url&
&&&&&&&&&/repository&
&&&&&&&&&snapshotRepository&
&&&&&&&&&&&&&id&nexus-snapshots&/id&
&&&&&&&&&&&&&name&Nexus&Snapshot&Repository&/name&
&&&&&&&&&&&&&url&http://192.168.10.8:18080/nexus/content/repositories/snapshots/&/url&
&&&&&&&&&/snapshotRepository&
&&&&&/distributionManagement&
id与settings.xml中的server的id对应
当项目package后
mvn&deploy
就可以将jar上传到nexus私服
那可能当时我这边的不太一样吧 反正两种方式 试着来~
可以 配置的那个 应该是可以在开发工具中识别出来节点 切换节点用的
支付宝支付
微信扫码支付
打赏金额: ¥
已支付成功
打赏金额: ¥利用nexus搭建了maven私服,可是上传的第三方jar包不能下载到本地从仓库是什么原因?_百度知道
该问题可能描述不清,建议你
利用nexus搭建了maven私服,可是上传的第三方jar包不能下载到本地从仓库是什么原因?
我有更好的答案
然后在所有项目上 右键,会生成一个文件在 :如果下载失败一次的话,点击 maven-&update project有可能你没上传成功,请登录私库,然后查看3rd party 确认你的包有上传成功,然后粘贴到你的pom.xml文件里面,然后update project,如果成功,请点击你的jar包,在右边窗口会显示依赖的xml信息,告诉maven今天之内不要再重复下载这个文件,如果是这种情况,请到 本地仓库手动把这个jar所属的包文件夹删掉再更新有可能是你的本地仓库没有reindex,如果你用eclipse.update 文件你的本地仓库里面; user setting 然后点击 &reindex 按钮,请手动拷贝出来情况很多,我举一下几种常见情况,在项目上右键 属性 进入 maven -&gt
采纳率:59%
本地是否配置了第三方jar包的依赖权限设置是否正确
为您推荐:
其他类似问题
maven的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。Maven 通过nexus配置私服仓库在maven 的 settings.xml 中配置nexus的账号密码,比较安全。在&servers&标签内插入一下代码。id与pom文件中的id一致,name可自行定义,无特别要求。&server&
&!--发布仓库信息--&
&id&releases&/id&
&username&admin&/username&
&password&admin123&/password&
&!--快照仓库信息--&
&id&snapshots&/id&
&username&admin&/username&
&password&admin123&/password&
这一步结束后,每次项目添加jar包都会优先从私服上去下载了,因为私服刚配置,项目中的组件/模块都不存在,可以把本地的上传至私服。运行cmd命令,移动到项目目录下,运行mvn deploy命令。即可把组件/模块上传至私服仓库。如果遇到连接超时等连接相关错误,在私服的那台机器上设置防火墙,把8081端口开放即可。---------------以上配置已经可以正常使用了,下面是手动添加组件/模块到私服仓库-----------------私服本地添加选择仓库,再点击upload 下拉框选择GAV ,填写相关信息,Packaging 里选择组件/模块类型。点击select 按钮选择本地的组件/模块类型。再点击upload 即可添加成功。刷新一下仓库,点击仓库,再点击Browse Index。即可看见新增的组件/模块信息。在POM中引用,选择一个组件/模块,复制右侧Maven 信息框内的xml信息到POM文件中即可,用法和maven 中央仓库类似。好了,上面所说只是基本的私服配置和使用,要了解更深入的使用还得花时间去研究。功夫不怕有心人,只要肯花时间和精力,多大的困难都会被攻破~2收藏分享举报{&debug&:false,&apiRoot&:&&,&paySDK&:&https:\u002F\u002Fpay.zhihu.com\u002Fapi\u002Fjs&,&wechatConfigAPI&:&\u002Fapi\u002Fwechat\u002Fjssdkconfig&,&name&:&production&,&instance&:&column&,&tokens&:{&X-XSRF-TOKEN&:null,&X-UDID&:null,&Authorization&:&oauth c3cef7c66aa9e6a1e3160e20&}}{&database&:{&Post&:{&&:{&isPending&:false,&contributes&:[],&title&:&Maven 通过nexus配置私服仓库&,&author&:&mikoOY&,&content&:&\u003Cp\u003E因为公司的需要,要把jar包上传至服务器仓库储存。在我配置好私服之后决定总结一篇文章,来让以后看见的人减少遇坑。\u003C\u002Fp\u003E\u003Cp\u003E配置私服仓库其中的优点是:\u003C\u002Fp\u003E\u003Cp\u003E1.公司未来的员工从svn上获取项目到本地时可以直接从私服下载需要的jar包,在本机不能访问外网的情况下也可以快速下载所需的jar包、组件等。\u003C\u002Fp\u003E\u003Cp\u003E2.像ojdbc6这类jar包,maven仓库不支持。所以先把ojdbc6下载到本地,再上传至私服即可正常下载。\u003C\u002Fp\u003E\u003Cp\u003E3.有些jar包之前在maven中央仓库中存在,往后maven可能会删除它。本地如果是通过maven下载的就会出现报错信息,也不能正常下载了。\u003C\u002Fp\u003E\u003Cp\u003E但是在配置私服后,就不会出现以上问题。下面是nexus配置私服仓库的步骤\u003C\u002Fp\u003E\u003Cp\u003E\u003Cbr\u003E\u003C\u002Fp\u003E\u003Cp\u003E\u003Cb\u003E1:首先去官网下载nexus 服务,非安装版,解压出来就可以使用,这里下载的是2.x版本。\u003C\u002Fb\u003E\u003C\u002Fp\u003E\u003Cp\u003E\u003Ca href=\&https:\u002F\u002Flink.zhihu.com\u002F?target=https%3A\u002F\u002Fwww.sonatype.com\u002Fdownload-oss-sonatype\& class=\& external\& target=\&_blank\& rel=\&nofollow noreferrer\&\u003E\u003Cspan class=\&invisible\&\u003Ehttps:\u002F\u002Fwww.\u003C\u002Fspan\u003E\u003Cspan class=\&visible\&\u003Esonatype.com\u002Fdownload-o\u003C\u002Fspan\u003E\u003Cspan class=\&invisible\&\u003Ess-sonatype\u003C\u002Fspan\u003E\u003Cspan class=\&ellipsis\&\u003E\u003C\u002Fspan\u003E\u003C\u002Fa\u003E\u003C\u002Fp\u003E\u003Cfigure\u003E\u003Cnoscript\u003E\u003Cimg src=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-dbce3f87be_b.jpg\& data-caption=\&\& data-rawwidth=\&1267\& data-rawheight=\&475\& class=\&origin_image zh-lightbox-thumb\& width=\&1267\& data-original=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-dbce3f87be_r.jpg\&\u003E\u003C\u002Fnoscript\u003E\u003Cimg src=\&data:image\u002Fsvg+utf8,&svg%20xmlns='http:\u002F\u002Fwww.w3.org\u002FFsvg'%20width='1267'%20height='475'&&\u002Fsvg&\& data-caption=\&\& data-rawwidth=\&1267\& data-rawheight=\&475\& class=\&origin_image zh-lightbox-thumb lazy\& width=\&1267\& data-original=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-dbce3f87be_r.jpg\& data-actualsrc=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-dbce3f87be_b.jpg\&\u003E\u003C\u002Ffigure\u003E\u003Cp\u003E下载完成之后解压就可使用。因为有二个文件,所以创建了一个目录来统一存放。\u003C\u002Fp\u003E\u003Cfigure\u003E\u003Cnoscript\u003E\u003Cimg src=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-dfa22c3f6adcaa2c550b87_b.jpg\& data-caption=\&\& data-rawwidth=\&647\& data-rawheight=\&222\& class=\&origin_image zh-lightbox-thumb\& width=\&647\& data-original=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-dfa22c3f6adcaa2c550b87_r.jpg\&\u003E\u003C\u002Fnoscript\u003E\u003Cimg src=\&data:image\u002Fsvg+utf8,&svg%20xmlns='http:\u002F\u002Fwww.w3.org\u002FFsvg'%20width='647'%20height='222'&&\u002Fsvg&\& data-caption=\&\& data-rawwidth=\&647\& data-rawheight=\&222\& class=\&origin_image zh-lightbox-thumb lazy\& width=\&647\& data-original=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-dfa22c3f6adcaa2c550b87_r.jpg\& data-actualsrc=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-dfa22c3f6adcaa2c550b87_b.jpg\&\u003E\u003C\u002Ffigure\u003E\u003Cp\u003E解压之后在..\\nexus-2.14.4-03\\bin\\jsw\\conf\\wrapper.conf 文件的第15行,修改成本地的jdk路径。\u003C\u002Fp\u003E\u003Cfigure\u003E\u003Cnoscript\u003E\u003Cimg src=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-3bede2a0b25a_b.jpg\& data-caption=\&\& data-rawwidth=\&668\& data-rawheight=\&384\& class=\&origin_image zh-lightbox-thumb\& width=\&668\& data-original=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-3bede2a0b25a_r.jpg\&\u003E\u003C\u002Fnoscript\u003E\u003Cimg src=\&data:image\u002Fsvg+utf8,&svg%20xmlns='http:\u002F\u002Fwww.w3.org\u002FFsvg'%20width='668'%20height='384'&&\u002Fsvg&\& data-caption=\&\& data-rawwidth=\&668\& data-rawheight=\&384\& class=\&origin_image zh-lightbox-thumb lazy\& width=\&668\& data-original=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-3bede2a0b25a_r.jpg\& data-actualsrc=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-3bede2a0b25a_b.jpg\&\u003E\u003C\u002Ffigure\u003E\u003Cp\u003E为了方便输入nexus命令,需要配置Nexus的环境变量。\u003C\u002Fp\u003E\u003Cp\u003E新建环境\u003C\u002Fp\u003E\u003Cp\u003E变量名:NEXUS_HOME\u003C\u002Fp\u003E\u003Cp\u003E变量值:D:\\nexus-2.14.4-03-bundle\\nexus-2.14.4-03\u003C\u002Fp\u003E\u003Cfigure\u003E\u003Cnoscript\u003E\u003Cimg src=\&https:\u002F\u002Fpic2.zhimg.com\u002Fv2-eedd160c89fe709e79c319b_b.jpg\& data-caption=\&\& data-rawwidth=\&414\& data-rawheight=\&458\& class=\&content_image\& width=\&414\&\u003E\u003C\u002Fnoscript\u003E\u003Cimg src=\&data:image\u002Fsvg+utf8,&svg%20xmlns='http:\u002F\u002Fwww.w3.org\u002FFsvg'%20width='414'%20height='458'&&\u002Fsvg&\& data-caption=\&\& data-rawwidth=\&414\& data-rawheight=\&458\& class=\&content_image lazy\& width=\&414\& data-actualsrc=\&https:\u002F\u002Fpic2.zhimg.com\u002Fv2-eedd160c89fe709e79c319b_b.jpg\&\u003E\u003C\u002Ffigure\u003E\u003Cp\u003E编辑系统变量 path 在前面添加 %NEXUS_HOME%\u002F\u003C\u002Fp\u003E\u003Cfigure\u003E\u003Cnoscript\u003E\u003Cimg src=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-924bb6c6cbafcb8d6ea5a_b.jpg\& data-caption=\&\& data-rawwidth=\&411\& data-rawheight=\&459\& class=\&content_image\& width=\&411\&\u003E\u003C\u002Fnoscript\u003E\u003Cimg src=\&data:image\u002Fsvg+utf8,&svg%20xmlns='http:\u002F\u002Fwww.w3.org\u002FFsvg'%20width='411'%20height='459'&&\u002Fsvg&\& data-caption=\&\& data-rawwidth=\&411\& data-rawheight=\&459\& class=\&content_image lazy\& width=\&411\& data-actualsrc=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-924bb6c6cbafcb8d6ea5a_b.jpg\&\u003E\u003C\u002Ffigure\u003E\u003Cp\u003Ewin + R 打开CMD 窗口\u003C\u002Fp\u003E\u003Cfigure\u003E\u003Cnoscript\u003E\u003Cimg src=\&https:\u002F\u002Fpic2.zhimg.com\u002Fv2-42f23ae12c4e57500ffbc_b.jpg\& data-caption=\&\& data-rawwidth=\&420\& data-rawheight=\&256\& class=\&content_image\& width=\&420\&\u003E\u003C\u002Fnoscript\u003E\u003Cimg src=\&data:image\u002Fsvg+utf8,&svg%20xmlns='http:\u002F\u002Fwww.w3.org\u002FFsvg'%20width='420'%20height='256'&&\u002Fsvg&\& data-caption=\&\& data-rawwidth=\&420\& data-rawheight=\&256\& class=\&content_image lazy\& width=\&420\& data-actualsrc=\&https:\u002F\u002Fpic2.zhimg.com\u002Fv2-42f23ae12c4e57500ffbc_b.jpg\&\u003E\u003C\u002Ffigure\u003E\u003Cp\u003E输入nexus 显示以下结果代表配置成功。如果有问题就去检查环境变量内路径是否正确。\u003C\u002Fp\u003E\u003Cfigure\u003E\u003Cnoscript\u003E\u003Cimg src=\&https:\u002F\u002Fpic8.zhimg.com\u002Fv2-83d0c083aefe8d623d03cd77_b.jpg\& data-caption=\&\& data-rawwidth=\&646\& data-rawheight=\&479\& class=\&origin_image zh-lightbox-thumb\& width=\&646\& data-original=\&https:\u002F\u002Fpic8.zhimg.com\u002Fv2-83d0c083aefe8d623d03cd77_r.jpg\&\u003E\u003C\u002Fnoscript\u003E\u003Cimg src=\&data:image\u002Fsvg+utf8,&svg%20xmlns='http:\u002F\u002Fwww.w3.org\u002FFsvg'%20width='646'%20height='479'&&\u002Fsvg&\& data-caption=\&\& data-rawwidth=\&646\& data-rawheight=\&479\& class=\&origin_image zh-lightbox-thumb lazy\& width=\&646\& data-original=\&https:\u002F\u002Fpic8.zhimg.com\u002Fv2-83d0c083aefe8d623d03cd77_r.jpg\& data-actualsrc=\&https:\u002F\u002Fpic8.zhimg.com\u002Fv2-83d0c083aefe8d623d03cd77_b.jpg\&\u003E\u003C\u002Ffigure\u003E\u003Cp\u003E再输入 nexus.bat install
来安装服务。红框内信息是我已经安装了,为了展示成功效果,所以就卸载重新安装了一遍,显示 nexus installed 代表安装成功。\u003C\u002Fp\u003E\u003Cfigure\u003E\u003Cnoscript\u003E\u003Cimg src=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-21ad5bbab83daf_b.jpg\& data-caption=\&\& data-rawwidth=\&660\& data-rawheight=\&479\& class=\&origin_image zh-lightbox-thumb\& width=\&660\& data-original=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-21ad5bbab83daf_r.jpg\&\u003E\u003C\u002Fnoscript\u003E\u003Cimg src=\&data:image\u002Fsvg+utf8,&svg%20xmlns='http:\u002F\u002Fwww.w3.org\u002FFsvg'%20width='660'%20height='479'&&\u002Fsvg&\& data-caption=\&\& data-rawwidth=\&660\& data-rawheight=\&479\& class=\&origin_image zh-lightbox-thumb lazy\& width=\&660\& data-original=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-21ad5bbab83daf_r.jpg\& data-actualsrc=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-21ad5bbab83daf_b.jpg\&\u003E\u003C\u002Ffigure\u003E\u003Cp\u003E安装完成之后启动nexus 服务,默认端口是8081。显示 status:running 说明启动成功。\u003C\u002Fp\u003E\u003Cp\u003E运行nexus.bat stop 即可把服务停止。\u003C\u002Fp\u003E\u003Cfigure\u003E\u003Cnoscript\u003E\u003Cimg src=\&https:\u002F\u002Fpic2.zhimg.com\u002Fv2-d13f720cfd71c65dd51f105fe9376ee9_b.jpg\& data-caption=\&\& data-rawwidth=\&648\& data-rawheight=\&484\& class=\&origin_image zh-lightbox-thumb\& width=\&648\& data-original=\&https:\u002F\u002Fpic2.zhimg.com\u002Fv2-d13f720cfd71c65dd51f105fe9376ee9_r.jpg\&\u003E\u003C\u002Fnoscript\u003E\u003Cimg src=\&data:image\u002Fsvg+utf8,&svg%20xmlns='http:\u002F\u002Fwww.w3.org\u002FFsvg'%20width='648'%20height='484'&&\u002Fsvg&\& data-caption=\&\& data-rawwidth=\&648\& data-rawheight=\&484\& class=\&origin_image zh-lightbox-thumb lazy\& width=\&648\& data-original=\&https:\u002F\u002Fpic2.zhimg.com\u002Fv2-d13f720cfd71c65dd51f105fe9376ee9_r.jpg\& data-actualsrc=\&https:\u002F\u002Fpic2.zhimg.com\u002Fv2-d13f720cfd71c65dd51f105fe9376ee9_b.jpg\&\u003E\u003C\u002Ffigure\u003E\u003Cp\u003E\u003Cbr\u003E\u003C\u002Fp\u003E\u003Cp\u003E启动完成之后即可访问 \u003Ca href=\&https:\u002F\u002Flink.zhihu.com\u002F?target=http%3A\u002F\u002Flocalhost%3AFnexus\u002F%23welcome\& class=\& external\& target=\&_blank\& rel=\&nofollow noreferrer\&\u003E\u003Cspan class=\&invisible\&\u003Ehttp:\u002F\u002F\u003C\u002Fspan\u003E\u003Cspan class=\&visible\&\u003Elocalhost:Fnexus\u002F#\u003C\u002Fspan\u003E\u003Cspan class=\&invisible\&\u003Ewelcome\u003C\u002Fspan\u003E\u003Cspan class=\&ellipsis\&\u003E\u003C\u002Fspan\u003E\u003C\u002Fa\u003E 进入nexus界面。需要登录,初始化账号是admin 密码是 admin123。点击右上角log in 登录后即可修改账号密码。右击admin点击set password修改密码。\u003C\u002Fp\u003E\u003Cfigure\u003E\u003Cnoscript\u003E\u003Cimg src=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-285b92bbdfc5c20ac5ed09_b.jpg\& data-caption=\&\& data-rawwidth=\&1351\& data-rawheight=\&637\& class=\&origin_image zh-lightbox-thumb\& width=\&1351\& data-original=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-285b92bbdfc5c20ac5ed09_r.jpg\&\u003E\u003C\u002Fnoscript\u003E\u003Cimg src=\&data:image\u002Fsvg+utf8,&svg%20xmlns='http:\u002F\u002Fwww.w3.org\u002FFsvg'%20width='1351'%20height='637'&&\u002Fsvg&\& data-caption=\&\& data-rawwidth=\&1351\& data-rawheight=\&637\& class=\&origin_image zh-lightbox-thumb lazy\& width=\&1351\& data-original=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-285b92bbdfc5c20ac5ed09_r.jpg\& data-actualsrc=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-285b92bbdfc5c20ac5ed09_b.jpg\&\u003E\u003C\u002Ffigure\u003E\u003Cp\u003Epath是访问库的地址,点击Add可添加新的私服库。因为我只用到了现有的,所以不对添加做详解了。\u003C\u002Fp\u003E\u003Cfigure\u003E\u003Cnoscript\u003E\u003Cimg src=\&https:\u002F\u002Fpic4.zhimg.com\u002Fv2-7215bab42e0c5f94bbc69_b.jpg\& data-caption=\&\& data-rawwidth=\&1349\& data-rawheight=\&638\& class=\&origin_image zh-lightbox-thumb\& width=\&1349\& data-original=\&https:\u002F\u002Fpic4.zhimg.com\u002Fv2-7215bab42e0c5f94bbc69_r.jpg\&\u003E\u003C\u002Fnoscript\u003E\u003Cimg src=\&data:image\u002Fsvg+utf8,&svg%20xmlns='http:\u002F\u002Fwww.w3.org\u002FFsvg'%20width='1349'%20height='638'&&\u002Fsvg&\& data-caption=\&\& data-rawwidth=\&1349\& data-rawheight=\&638\& class=\&origin_image zh-lightbox-thumb lazy\& width=\&1349\& data-original=\&https:\u002F\u002Fpic4.zhimg.com\u002Fv2-7215bab42e0c5f94bbc69_r.jpg\& data-actualsrc=\&https:\u002F\u002Fpic4.zhimg.com\u002Fv2-7215bab42e0c5f94bbc69_b.jpg\&\u003E\u003C\u002Ffigure\u003E\u003Cp\u003E在项目中的父POM文件内配置私服信息,&project&标签内插入以下代码。\u003C\u002Fp\u003E\u003Cp\u003Erepository 配置私服的仓库地址,\u003C\u002Fp\u003E\u003Cp\u003EsnapshotRepository 配置构建快照的仓库地址。\u003C\u002Fp\u003E\u003Cp\u003E在使用快照版本时,如果 Maven 下载所提到的版本为 data-service:1.0,那么它永远不会尝试在库中下载已经更新的版本1.0。要下载更新的代码,data-service的版本必须要升级到1.1\u003C\u002Fp\u003E\u003Cdiv class=\&highlight\&\u003E\u003Cpre\u003E\u003Ccode class=\&language-cpp\&\u003E\u003Cspan\u003E\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&!--\u003C\u002Fspan\u003E \u003Cspan class=\&err\&\u003E配置私服仓库\u003C\u002Fspan\u003E \u003Cspan class=\&o\&\u003E--&\u003C\u002Fspan\u003E\n
\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E\u003Cspan class=\&n\&\u003EdistributionManagement\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E
\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E\u003Cspan class=\&n\&\u003Erepository\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E
\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E\u003Cspan class=\&n\&\u003Eid\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E\u003Cspan class=\&n\&\u003Ereleases\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u002F\u003C\u002Fspan\u003E\u003Cspan class=\&n\&\u003Eid\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E\n
\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E\u003Cspan class=\&n\&\u003Ename\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E\u003Cspan class=\&err\&\u003E发布版库\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u002F\u003C\u002Fspan\u003E\u003Cspan class=\&n\&\u003Ename\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E\n
\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E\u003Cspan class=\&n\&\u003Eurl\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E\u003Cspan class=\&nl\&\u003Ehttp\u003C\u002Fspan\u003E\u003Cspan class=\&p\&\u003E:\u003C\u002Fspan\u003E\u003Cspan class=\&c1\&\u003E\u002F\u002F211.**.**.**:Fnexus\u002Fcontent\u002Frepositories\u002Freleases\u002F&\u002Furl&
\u003C\u002Fspan\u003E\n
\u003Cspan class=\&o\&\u003E&\u002F\u003C\u002Fspan\u003E\u003Cspan class=\&n\&\u003Erepository\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E
\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E\u003Cspan class=\&n\&\u003EsnapshotRepository\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E
\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E\u003Cspan class=\&n\&\u003Eid\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E\u003Cspan class=\&n\&\u003Esnapshots\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u002F\u003C\u002Fspan\u003E\u003Cspan class=\&n\&\u003Eid\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E
\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E\u003Cspan class=\&n\&\u003Ename\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E\u003Cspan class=\&err\&\u003E快照版库\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u002F\u003C\u002Fspan\u003E\u003Cspan class=\&n\&\u003Ename\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E\n
\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E\u003Cspan class=\&n\&\u003Eurl\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E\u003Cspan class=\&nl\&\u003Ehttp\u003C\u002Fspan\u003E\u003Cspan class=\&p\&\u003E:\u003C\u002Fspan\u003E\u003Cspan class=\&c1\&\u003E\u002F\u002F211.**.**.**:Fnexus\u002Fcontent\u002Frepositories\u002Fsnapshots\u002F&\u002Furl&
\u003C\u002Fspan\u003E\n
\u003Cspan class=\&o\&\u003E&\u002F\u003C\u002Fspan\u003E\u003Cspan class=\&n\&\u003EsnapshotRepository\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E
\u003Cspan class=\&o\&\u003E&\u002F\u003C\u002Fspan\u003E\u003Cspan class=\&n\&\u003EdistributionManagement\u003C\u002Fspan\u003E\u003Cspan class=\&o\&\u003E&\u003C\u002Fspan\u003E\n\u003C\u002Fcode\u003E\u003C\u002Fpre\u003E\u003C\u002Fdiv\u003E\u003Cp\u003E在maven 的 settings.xml 中配置nexus的账号密码,比较安全。在&servers&标签内插入一下代码。id与pom文件中的id一致,name可自行定义,无特别要求。\u003C\u002Fp\u003E\u003Cdiv class=\&highlight\&\u003E\u003Cpre\u003E\u003Ccode class=\&language-text\&\u003E\u003Cspan\u003E\u003C\u002Fspan\u003E&server&
&!--发布仓库信息--&
&id&releases&\u002Fid&\n
&username&admin&\u002Fusername&
&password&admin123&\u002Fpassword&
\n&\u002Fserver&
\n&server&
&!--快照仓库信息--&
&id&snapshots&\u002Fid&
&username&admin&\u002Fusername&
&password&admin123&\u002Fpassword&
\n&\u002Fserver&\n\u003C\u002Fcode\u003E\u003C\u002Fpre\u003E\u003C\u002Fdiv\u003E\u003Cp\u003E这一步结束后,每次项目添加jar包都会优先从私服上去下载了,因为私服刚配置,项目中的组件\u002F模块都不存在,可以把本地的上传至私服。\u003C\u002Fp\u003E\u003Cp\u003E运行cmd命令,移动到项目目录下,运行mvn deploy命令。即可把组件\u002F模块上传至私服仓库。\u003C\u002Fp\u003E\u003Cfigure\u003E\u003Cnoscript\u003E\u003Cimg src=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-7e6f82f9b5b14f865ab235aed64ea2e8_b.jpg\& data-caption=\&\& data-rawwidth=\&643\& data-rawheight=\&449\& class=\&origin_image zh-lightbox-thumb\& width=\&643\& data-original=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-7e6f82f9b5b14f865ab235aed64ea2e8_r.jpg\&\u003E\u003C\u002Fnoscript\u003E\u003Cimg src=\&data:image\u002Fsvg+utf8,&svg%20xmlns='http:\u002F\u002Fwww.w3.org\u002FFsvg'%20width='643'%20height='449'&&\u002Fsvg&\& data-caption=\&\& data-rawwidth=\&643\& data-rawheight=\&449\& class=\&origin_image zh-lightbox-thumb lazy\& width=\&643\& data-original=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-7e6f82f9b5b14f865ab235aed64ea2e8_r.jpg\& data-actualsrc=\&https:\u002F\u002Fpic1.zhimg.com\u002Fv2-7e6f82f9b5b14f865ab235aed64ea2e8_b.jpg\&\u003E\u003C\u002Ffigure\u003E\u003Cp\u003E如果遇到连接超时等连接相关错误,在私服的那台机器上设置防火墙,把8081端口开放即可。\u003C\u002Fp\u003E\u003Cp\u003E---------------以上配置已经可以正常使用了,下面是手动添加组件\u002F模块到私服仓库-----------------\u003C\u002Fp\u003E\u003Cp\u003E私服本地添加\u003C\u002Fp\u003E\u003Cfigure\u003E\u003Cnoscript\u003E\u003Cimg src=\&https:\u002F\u002Fpic2.zhimg.com\u002Fv2-7c04ca9c5d2e129fcebfff_b.jpg\& data-caption=\&\& data-rawwidth=\&1316\& data-rawheight=\&605\& class=\&origin_image zh-lightbox-thumb\& width=\&1316\& data-original=\&https:\u002F\u002Fpic2.zhimg.com\u002Fv2-7c04ca9c5d2e129fcebfff_r.jpg\&\u003E\u003C\u002Fnoscript\u003E\u003Cimg src=\&data:image\u002Fsvg+utf8,&svg%20xmlns='http:\u002F\u002Fwww.w3.org\u002FFsvg'%20width='1316'%20height='605'&&\u002Fsvg&\& data-caption=\&\& data-rawwidth=\&1316\& data-rawheight=\&605\& class=\&origin_image zh-lightbox-thumb lazy\& width=\&1316\& data-original=\&https:\u002F\u002Fpic2.zhimg.com\u002Fv2-7c04ca9c5d2e129fcebfff_r.jpg\& data-actualsrc=\&https:\u002F\u002Fpic2.zhimg.com\u002Fv2-7c04ca9c5d2e129fcebfff_b.jpg\&\u003E\u003C\u002Ffigure\u003E\u003Cp\u003E选择仓库,再点击upload 下拉框选择GAV ,填写相关信息,Packaging 里选择组件\u002F模块类型。\u003C\u002Fp\u003E\u003Cfigure\u003E\u003Cnoscript\u003E\u003Cimg src=\&https:\u002F\u002Fpic4.zhimg.com\u002Fv2-da54c3fc365f7e0c955c1c6d813bb3f5_b.jpg\& data-caption=\&\& data-rawwidth=\&689\& data-rawheight=\&223\& class=\&origin_image zh-lightbox-thumb\& width=\&689\& data-original=\&https:\u002F\u002Fpic4.zhimg.com\u002Fv2-da54c3fc365f7e0c955c1c6d813bb3f5_r.jpg\&\u003E\u003C\u002Fnoscript\u003E\u003Cimg src=\&data:image\u002Fsvg+utf8,&svg%20xmlns='http:\u002F\u002Fwww.w3.org\u002FFsvg'%20width='689'%20height='223'&&\u002Fsvg&\& data-caption=\&\& data-rawwidth=\&689\& data-rawheight=\&223\& class=\&origin_image zh-lightbox-thumb lazy\& width=\&689\& data-original=\&https:\u002F\u002Fpic4.zhimg.com\u002Fv2-da54c3fc365f7e0c955c1c6d813bb3f5_r.jpg\& data-actualsrc=\&https:\u002F\u002Fpic4.zhimg.com\u002Fv2-da54c3fc365f7e0c955c1c6d813bb3f5_b.jpg\&\u003E\u003C\u002Ffigure\u003E\u003Cp\u003E点击select 按钮选择本地的组件\u002F模块类型。再点击upload 即可添加成功。\u003C\u002Fp\u003E\u003Cfigure\u003E\u003Cnoscript\u003E\u003Cimg src=\&https:\u002F\u002Fpic2.zhimg.com\u002Fv2-b29d3b133afeb7c77e97f8_b.jpg\& data-caption=\&\& data-rawwidth=\&902\& data-rawheight=\&284\& class=\&origin_image zh-lightbox-thumb\& width=\&902\& data-original=\&https:\u002F\u002Fpic2.zhimg.com\u002Fv2-b29d3b133afeb7c77e97f8_r.jpg\&\u003E\u003C\u002Fnoscript\u003E\u003Cimg src=\&data:image\u002Fsvg+utf8,&svg%20xmlns='http:\u002F\u002Fwww.w3.org\u002FFsvg'%20width='902'%20height='284'&&\u002Fsvg&\& data-caption=\&\& data-rawwidth=\&902\& data-rawheight=\&284\& class=\&origin_image zh-lightbox-thumb lazy\& width=\&902\& data-original=\&https:\u002F\u002Fpic2.zhimg.com\u002Fv2-b29d3b133afeb7c77e97f8_r.jpg\& data-actualsrc=\&https:\u002F\u002Fpic2.zhimg.com\u002Fv2-b29d3b133afeb7c77e97f8_b.jpg\&\u003E\u003C\u002Ffigure\u003E\u003Cp\u003E刷新一下仓库,点击仓库,再点击Browse Index。即可看见新增的组件\u002F模块信息。\u003C\u002Fp\u003E\u003Cfigure\u003E\u003Cnoscript\u003E\u003Cimg src=\&https:\u002F\u002Fpic3.zhimg.com\u002Fv2-5b6fdaf9eadc_b.jpg\& data-caption=\&\& data-rawwidth=\&591\& data-rawheight=\&498\& class=\&origin_image zh-lightbox-thumb\& width=\&591\& data-original=\&https:\u002F\u002Fpic3.zhimg.com\u002Fv2-5b6fdaf9eadc_r.jpg\&\u003E\u003C\u002Fnoscript\u003E\u003Cimg src=\&data:image\u002Fsvg+utf8,&svg%20xmlns='http:\u002F\u002Fwww.w3.org\u002FFsvg'%20width='591'%20height='498'&&\u002Fsvg&\& data-caption=\&\& data-rawwidth=\&591\& data-rawheight=\&498\& class=\&origin_image zh-lightbox-thumb lazy\& width=\&591\& data-original=\&https:\u002F\u002Fpic3.zhimg.com\u002Fv2-5b6fdaf9eadc_r.jpg\& data-actualsrc=\&https:\u002F\u002Fpic3.zhimg.com\u002Fv2-5b6fdaf9eadc_b.jpg\&\u003E\u003C\u002Ffigure\u003E\u003Cp\u003E在POM中引用,选择一个组件\u002F模块,复制右侧Maven 信息框内的xml信息到POM文件中即可,用法和maven 中央仓库类似。\u003C\u002Fp\u003E\u003Cfigure\u003E\u003Cnoscript\u003E\u003Cimg src=\&https:\u002F\u002Fpic3.zhimg.com\u002Fv2-5cdead5a582f15f9c4c6bc_b.jpg\& data-caption=\&\& data-rawwidth=\&1154\& data-rawheight=\&545\& class=\&origin_image zh-lightbox-thumb\& width=\&1154\& data-original=\&https:\u002F\u002Fpic3.zhimg.com\u002Fv2-5cdead5a582f15f9c4c6bc_r.jpg\&\u003E\u003C\u002Fnoscript\u003E\u003Cimg src=\&data:image\u002Fsvg+utf8,&svg%20xmlns='http:\u002F\u002Fwww.w3.org\u002FFsvg'%20width='1154'%20height='545'&&\u002Fsvg&\& data-caption=\&\& data-rawwidth=\&1154\& data-rawheight=\&545\& class=\&origin_image zh-lightbox-thumb lazy\& width=\&1154\& data-original=\&https:\u002F\u002Fpic3.zhimg.com\u002Fv2-5cdead5a582f15f9c4c6bc_r.jpg\& data-actualsrc=\&https:\u002F\u002Fpic3.zhimg.com\u002Fv2-5cdead5a582f15f9c4c6bc_b.jpg\&\u003E\u003C\u002Ffigure\u003E\u003Cp\u003E\u003Cbr\u003E\u003C\u002Fp\u003E\u003Cp\u003E好了,上面所说只是基本的私服配置和使用,要了解更深入的使用还得花时间去研究。\u003C\u002Fp\u003E\u003Cp\u003E功夫不怕有心人,只要肯花时间和精力,多大的困难都会被攻破~\u003C\u002Fp\u003E&,&updated&:new Date(&T14:05:03.000Z&),&canComment&:false,&commentPermission&:&anyone&,&commentCount&:2,&collapsedCount&:0,&likeCount&:2,&state&:&published&,&isLiked&:false,&slug&:&&,&isTitleImageFullScreen&:false,&rating&:&none&,&titleImage&:&&,&links&:{&comments&:&\u002Fapi\u002Fposts\u002F2Fcomments&},&reviewers&:[],&topics&:[{&url&:&https:\u002F\u002Fwww.zhihu.com\u002Ftopic\u002F&,&id&:&&,&name&:&Maven&},{&url&:&https:\u002F\u002Fwww.zhihu.com\u002Ftopic\u002F&,&id&:&&,&name&:&私服&}],&adminClosedComment&:false,&titleImageSize&:{&width&:0,&height&:0},&href&:&\u002Fapi\u002Fposts\u002F&,&excerptTitle&:&&,&tipjarState&:&closed&,&annotationAction&:[],&sourceUrl&:&&,&pageCommentsCount&:2,&hasPublishingDraft&:false,&snapshotUrl&:&&,&publishedTime&:&T22:05:03+08:00&,&url&:&\u002Fp\u002F&,&lastestLikers&:[{&bio&:&&,&isFollowing&:false,&hash&:&98c5ce5abbd7be41bd84c3e&,&uid&:469100,&isOrg&:false,&slug&:&yibu-yibu-94&,&isFollowed&:false,&description&:&&,&name&:&一步一步&,&profileUrl&:&https:\u002F\u002Fwww.zhihu.com\u002Fpeople\u002Fyibu-yibu-94&,&avatar&:{&id&:&da8e974dc&,&template&:&https:\u002F\u002Fpic4.zhimg.com\u002F{id}_{size}.jpg&},&isOrgWhiteList&:false,&isBanned&:false},{&bio&:&互联网&,&isFollowing&:false,&hash&:&dcced6bab323bbb8f47b8&,&uid&:528400,&isOrg&:false,&slug&:&li-rui-62-5&,&isFollowed&:false,&description&:&&,&name&:&LIMR&,&profileUrl&:&https:\u002F\u002Fwww.zhihu.com\u002Fpeople\u002Fli-rui-62-5&,&avatar&:{&id&:&da8e974dc&,&template&:&https:\u002F\u002Fpic4.zhimg.com\u002F{id}_{size}.jpg&},&isOrgWhiteList&:false,&isBanned&:false}],&summary&:&\u003Cimg src=\&http:\u002F\u002Fpic3.zhimg.com\u002Fv2-dbce3f87be_200x112.jpg\& data-caption=\&\& data-rawwidth=\&1267\& data-rawheight=\&475\& class=\&origin_image inline-img zh-lightbox-thumb\& data-original=\&http:\u002F\u002Fpic3.zhimg.com\u002Fv2-dbce3f87be_r.jpg\&\u003E因为公司的需要,要把jar包上传至服务器仓库储存。在我配置好私服之后决定总结一篇文章,来让以后看见的人减少遇坑。配置私服仓库其中的优点是:1.公司未来的员工从svn上获取项目到本地时可以直接从私服下载需要的jar包,在本机不能访问外网的情况下也可以…&,&reviewingCommentsCount&:0,&meta&:{&previous&:null,&next&:null},&annotationDetail&:null,&commentsCount&:2,&likesCount&:2,&FULLINFO&:true}},&User&:{&mikoOY&:{&isFollowed&:false,&name&:&miko&,&headline&:&&,&avatarUrl&:&https:\u002F\u002Fpic4.zhimg.com\u002Fv2-f32a03ecac3_s.jpg&,&isFollowing&:false,&type&:&people&,&slug&:&mikoOY&,&bio&:&软件工程师&,&hash&:&dae4088def6d635ce80c64&,&uid&:312800,&isOrg&:false,&description&:&&,&badge&:{&identity&:null,&bestAnswerer&:null},&profileUrl&:&https:\u002F\u002Fwww.zhihu.com\u002Fpeople\u002FmikoOY&,&avatar&:{&id&:&v2-f32a03ecac3&,&template&:&https:\u002F\u002Fpic4.zhimg.com\u002F{id}_{size}.jpg&},&isOrgWhiteList&:false,&isBanned&:false}},&Comment&:{},&favlists&:{}},&me&:{},&global&:{&experimentFeatures&:{&ge3&:&ge3_9&,&ge2&:&ge2_1&,&searchSectionStyle&:&loosen&,&androidPassThroughPush&:&all&,&newMore&:&new&,&nwebQAGrowth&:&experiment&,&showTipInLiveDetailsPage&:&true&,&nwebFeedAd&:&experiment&,&newSign&:&newVersion&,&qawebRelatedReadingsContentControl&:&open&,&marketTabBanner&:&market_tab_banner_show&,&liveStore&:&ls_a2_b2_c1_f2&,&qawebThumbnailAbtest&:&new&,&nwebSearch&:&nweb_search_heifetz&,&searchHybridTabs&:&without-tabs&,&enableVoteDownReasonMenu&:&enable&,&showVideoUploadAttention&:&true&,&isOffice&:&false&,&enableTtsPlay&:&post&,&newQuestionDiversion&:&false&,&wechatShareModal&:&wechat_share_modal_show&,&newLiveFeedMediacard&:&old&,&hybridZhmoreVideo&:&no&,&recommendationAbtest&:&new&,&nwebGrowthPeople&:&default&,&qrcodeLogin&:&qrcode&,&isShowUnicomFreeEntry&:&unicom_free_entry_off&,&newMobileColumnAppheader&:&new_header&,&questionRecommendReadingsAbtest&:&similar&,&androidDbCommentWithRepinRecord&:&open&,&androidDbRecommendAction&:&open&,&zcmLighting&:&zcm&,&androidDbFeedHashTagStyle&:&button&,&appStoreRateDialog&:&close&,&default&:&None&,&isNewNotiPanel&:&no&,&androidDbRepinSelection&:&open&,&nwebRelatedAdvert&:&default&,&androidProfilePanel&:&panel_b&,&nwebWriteAnswer&:&experiment&}},&columns&:{&next&:{}},&columnPosts&:{},&columnSettings&:{&colomnAuthor&:[],&uploadAvatarDetails&:&&,&contributeRequests&:[],&contributeRequestsTotalCount&:0,&inviteAuthor&:&&},&postComments&:{},&postReviewComments&:{&comments&:[],&newComments&:[],&hasMore&:true},&favlistsByUser&:{},&favlistRelations&:{},&promotions&:{},&switches&:{&couldSetPoster&:false},&draft&:{&titleImage&:&&,&titleImageSize&:{},&isTitleImageFullScreen&:false,&canTitleImageFullScreen&:false,&title&:&&,&titleImageUploading&:false,&error&:&&,&content&:&&,&draftLoading&:false,&globalLoading&:false,&pendingVideo&:{&resource&:null,&error&:null}},&drafts&:{&draftsList&:[],&next&:{}},&config&:{&userNotBindPhoneTipString&:{}},&recommendPosts&:{&articleRecommendations&:[],&columnRecommendations&:[]},&env&:{&edition&:{&baidu&:false,&yidianzixun&:false,&qqnews&:false},&isAppView&:false,&appViewConfig&:{&content_padding_top&:128,&content_padding_bottom&:56,&content_padding_left&:16,&content_padding_right&:16,&title_font_size&:22,&body_font_size&:16,&is_dark_theme&:false,&can_auto_load_image&:true,&app_info&:&OS=iOS&},&isApp&:false,&userAgent&:{&ua&:&Mozilla\u002F5.0 (compatible, MSIE 11, Windows NT 6.3; Trident\u002F7.0; rv:11.0) like Gecko&,&browser&:{&name&:&IE&,&version&:&11&,&major&:&11&},&engine&:{&version&:&7.0&,&name&:&Trident&},&os&:{&name&:&Windows&,&version&:&8.1&},&device&:{},&cpu&:{}}},&message&:{&newCount&:0},&pushNotification&:{&newCount&:0}}

我要回帖

更多关于 maven上传jar到nexus 的文章

 

随机推荐