使用Nexus1.8搭建Maven私服以及在网页上上传JAR包

所需积分/C币:49 2019-03-29 13:41:44 1.09MB PDF
33
收藏 收藏
举报

使用Nexus1.8搭建MAVEN私服详细步骤,以及在网页上上传JAR包
. jlb 2 Seect Artifact() for Upload 5 e:t AlRali(s lc Upludt.…. Heane C:\akeprth'cjchr14jar 点主这个aA,添加henz仁中 Arlildtls Remove All I Add atract ArTifacts =C fa cepathiojdb 14jar e ar Emo 点击更新即可 Bad Artifact() Reset Welcome Repository Targets x Repositories E Refresh Add. e Delete STash.. Use Ma aged Repositories Repository Quality Format Policy Repository Statu ublic Repositories gr叫 up ANALYZE 3rd party In Apache snap shots maven2 napshot In servce Central M1 shadow vitual maven Release In service Codeha. s Snapshots proxy maven2 napshot In Service Snapshots hosted AMLY正E maven2 snapshot In service 3rd party Drowse Storage Drowse Index Configuration Mirors Summary Artifact Up oad 日 rd pary 三m 曰ac odbc 白10.1.0.20 彐dhr-1010aar 刷新后发现已经成功在n仓库中 彐dc-10.1.020」rsha1 a 彐aC10.102U.pom 彐ajdc10.1020 pom. md5 E maven- metadata xml 彐 maven-metadata. xml. md5 archey pe-catalog xml md5 彐彐 archey pe-catalog xml sha1 那么在 nexus已经安装好,怎么使用上传的ar包吧,很简单的,前提是你已经建立了一个 maven的项目。含有 pom.xm这个文件在这 个文件中添加如下 先去服务器看看ar的 maven构件 e afresh 1:Bh LDo: 可th-11?j 写可-10.1.020 j=.sha1 0.1020 然后在 pom.Xm中添加如下的本地仓库地址 1<repositories> 2<repository>3<id >nexus </id> 4<name>Team Nexus Repository </name> 5<url>http://localhost:8081/nexus/content/groups/public</url>6</repository>7</repositories>8<pluginrepositories> <plugin Repository 10<id> nexus </id> 11< name> Team Nexus Repository</name>12<uri>http://localhost:8081/nexus/content/groups/public</url>13</pluginRepository>14</pluginreposi projectxmins=http://maven,apacheorg/pm4,e,exmins:xs1=http://www,ws.ong/2ee xsischemalocations"http://maven,apachecrg/pom/4.0.ahttp://mauen,apacheorg/m mode vErsion>4.0.0<mode Version> <groupId>com. gya</groupId> KartifactId>maven-demo</artifactId> <packagingwan</'packaging> <version>0.0.1-SNAPSHOT</version> <name >maven-demo Maven Webapp</name <urlshttp://maven.apacheorg</url> <repositories> <repository> 仓库地址 <id>nexus</id> <name>Team Nexus Repository</name> <url>http:V/localhost:8081/nexus/content/groups/public</url> </repository> <pluginRepositories) <pluginRepository> 抬件地址 <id>nexus</id> name>Team Nexus Repository</name> <url>http://localhost:8081/nexus/content/groups/public</url> </plugin Repository> </pluginRepositories> <dependency> <groupId>com, oracle</groupId> 4c1动包的构件 CantifactId>jdbc</artifactId> cversIon>1,1,的。2,的/ vension </dependency> </dependencies> <final Name>maven-democ/fi nal Name> 到此,完成了 nexus私服的搭建,项目组开发人员开发时,只要在项目的 pom. xm文件中,添加如下 pom.xm信息即可获取私服的ar. 如果添加其他的构件时,会先在 nexus私服下载好,以后才会下载到本地。以后,如果发现私服已经存在某一ja包,则会直接从私服下 载,如果没有再去网络上下载。这就是搭建私服的好处。 所以很有必要搭建 maven私服。 接下来将的是如何在网页上上传AR包,并在POM文件中配置好JAR包信息,并自动从私报中下载到本地。 具体步娶如下 私服地址:http://192.168.241.1:8081/nexus, 上传jar包到私服的步骤如下 (1)先进行登录,用户名: admin,密码: admin123 ≡ Sonatype E Nexus LDN Cooigwcirm (2)点击左边菜单“ Repositories",选择右边列表“3 rd party 以pm图甲m,|日Mm+-(m Sonatype ==如 (3) 点击“3 rd party",选择 artifact Upload如下图 Sonatype Nexus satre Rattone 告R9画 M标pDes y Repaste an winced stench Repcon Targets taII hi Mdar viable shora Prora 品ag/mmkr (4)在 artifact Upload界面显示的有 GAV Parameter, grouped, artifact, Version, Packaging等等参数,界面如图 2 Refresh ( Add... Delete R Trash.. User Naneqed Repcsitoriss Repusiluly▲ Type HeaiLlI ChEck FUI TEL Fulic Repusi. uly salus RepUt Pubic Repositories 西→nver2 3rd party f osted AMALYE maver? Release In Service wU∈AAL→H2 AldUs iul II seI wit-Reu山 ALumel v E,tlu 3rr party Select GAv Definition Source GAV Defnton: - GAV Parameter vo Auto Guess Attract Packagng: Select. (5)将以上参数填完之后,选择要上传的jar包,点击″ add artifact“最后点击" uploadartifact“按钮即可,如下图所示 带h,·●xe旨natm,· E UN MdeL Rww AitiactSeax2≈四sa R:pastor Slabus M orca 8r8/ra ta》+ Ca411010,1 3rd party strg Arwe Itv-mfgirmm Mm Aria+ Ainiristraton Attacts ctdyhty selet arial to Led secant henge PaSsword adjarusu Remove) Browse IsseT:kar Udac At'act Resel (6)上传完毕后,要把jar包名、版本等相关信息填写到 pom.xm中,具体地址如下 --(①1〕点击如下客标注地址按照下图步骤进行操作(图1->图2 Sonatype avanced score A Pacaagrg:ar jdwnIw-ulla3..t-j4n +8102150241101900+ 國器cc 最常词词C授权登录有道云笔已 Index of /nexus/content/repositories/thirdparty/ Last modified Size Description PareL DirecTory Sun sep01554:16c5T2015 Thu now1915:56:53C5T2015 Man Fcb 15 1C: 56: 27 CST 2016 Man Feb 15 1C: 35: 01 CST 2016 ) 最常诉出仅费录白道云羊 Index of /nexus/content/re positories/thirdparty/com/ Lesl Muui fied 5i∠ Desc ipu Tarent Director Mon Feb 15 11-03: 40CS1 2016 iasperrHXLs-dplel! Mun Feb 15 11: 05: 02 CST 2016 iaspcrrcpor-s fonts/ Mon Fcb 15 11: 06: 29 CST 2016 iasperrepor-s-iavatlow/ Mon Feb 1511: 0/: 58 CSI 2016 Mon feb151c:56:27c5T2016 yhwh task/ Mon leb1511:10:58C5T2016 )1921082411081 on.trIy'repusitcl ie/LhuiruparLy/tuly/jaspenrepur ls-appley/ 最常访问邮箱授权登汞有直云笔记 Index of /nexus/content/repositories/thirdparty/com/jasp Size Descripti。n Pa arent Directo iasperreports-applet/Mon Feb 15 11: 05: 03CSI 2015 8192.168.241.1: 8081/ne xuc/content/repositoriesthirdparty/ cam/jasperreports-app etijaeperreports-applet/ 最家□虾箱授登录有迫笔i Index of /nexus/content/repositories/thirdparty/com/jaspe Last Modified size Description en-metadata xml Mon feb 15 11: 05: 03 C5T 2016 351 haven mctadata. xml, sha1 Mon fcb 15 11: 05: 03 C5T 2016 40 Mon fcb1511:05:03cST2016 6)6192168.241.1: 8081/exuscun/iepusiturieschiu a ly/cumvjaspe repur b-applel/jasperrepur ly-appley50C/ 最常访间□邮律摸权登录 Index of /nexus/content/repositories/thirdparty /com/jasp Last modified Size Description Parent Directory jasperreports applet 5.0.0.jar Mon fcb1511:05:03cST2016496920 iaspcrrcports applet 5.0.0.jar. md5 Mon Fcb 15 11: 05: 03 CST 2016 iaspcrrcports applet 5.0.0.jar. sha1 Mon Fcb 15 11: 05: 03 CST 2016 40 jasperreports-applet. 5. 0.0, om Mon Feb 15 11:05: 02 CST 2016 4180 jasperreports-applet-5.0.0. Dom md5 Mon Feb 15 11: 05: 03 CST 2016 3 iasperreports-applet-5.0.0. Dom sha1 Mon Feb 15 11: 05: 03 CST 2016 4 器cQ 最访□却箱授板登录有云笔 该XM文件并未包含任何关联的样式信忌。文档显示姐下。 projectxsischemalocation='http://Maven.apacheorg/pom/4.0.0http://maven.apacheorg/xsc/maven-4.0.0.xsd modelVersion>4.0.0</modelversion: rouped> com. jasperreports- applet≤/yro旷Id: cartifactId: jasperreports-applet < /artifactId> verslon, 5.0.0</verslon description> FOM was crcated by Sonatypc Noxus</description> /project> 最后放进项目中的 pom.X中就可以从仓库下载AR包了 E B iritPublcServer ]s OrderlnformCortActionijeva B erderInformCont IistPagehtml M) hmD plaformipor xrml K3 旧结含项所需包 <dependency> taroutld>or. conet 4. tomcat o/around> tatacc11>0-g, ccnet41. somceto/arcl ct⊥d> ti=:ity'> g-oupIdzccm. Jasson. MaOi\, groupIe a==om, -e=son. ImApi/arti=ac= grourId com.iasparrepr-g<, groupId> 42 Ls-pc⊥et</arup⊥c> artifac-Id>asperreoor-3-appletc/ar-ifactIo> groupId cm. jasperrepar-s-fonts</aroup Id> aspezrepozs8-fonte</ at工a

...展开详情
试读 7P 使用Nexus1.8搭建Maven私服以及在网页上上传JAR包
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
  • 签到新秀

    累计签到获取,不积跬步,无以至千里,继续坚持!
关注 私信 TA的资源
上传资源赚积分or赚钱
    最新推荐
    使用Nexus1.8搭建Maven私服以及在网页上上传JAR包 49积分/C币 立即下载
    1/7
    使用Nexus1.8搭建Maven私服以及在网页上上传JAR包第1页
    使用Nexus1.8搭建Maven私服以及在网页上上传JAR包第2页

    试读结束, 可继续读1页

    49积分/C币 立即下载 >