nexus index 怎样nexus删除jar包

> 博客详情
由于网络经常抽风,maven经常卡死。所以在本地搭建了个nexus私服。
搭建私服后发现索引不能完整地同步,整合网络信息,解决方案如下:
1、通过x度云离线下载等方式下载如下两个文件:(如果repo2速度更快就用repo2)
2、找一个服务器(Apache Tomcat或者wamp等,只要是server就行),在其根目录(ROOT)下建立一个 /maven2/.index 的虚拟目录(注意: 如果你使用的是windows, 可能无法建立.index文件夹, 在cmd下使用mkdir
命令可创建),把上述两个文件拷贝至该目录下;修改服务器端口为80.
3、编辑 c:\WINDOWS\system32\drivers\etc\hosts 文件,在文件中加入:
repo1.maven.org
注:127.0.0.1 为步骤2的Apache Tomcat服务器IP地址。
4、登陆Nexus, 在远程仓库上右键选择Update Index即可
5、移除之前在 hosts 文件中添加的内容。
支付宝支付
微信扫码支付
打赏金额: ¥
已支付成功
打赏金额: ¥PW for the maven build 1, there are many tools to build maven PW, such as artifactory, Nexus, etc., we nexus as an example, to build maven PW 2, download nexus, http://nexus.sonatype.org/download-nexus.html, there are two to choose war and zip, need
Project to use its own packaged jar. Mvn install using the installation locally, using mvn deploy to nexus private Use mvn eclipse: clean eclipse: eclipse, reference is always less than that found in the project jar, eclipse buil
Access http://nexus.sonatype.org/downloads/ Download Nexus. Start Nexus, is to start a web server, its default address is localhost: 8081. Nexus in a servlet container called Jetty's running, it uses a file called Tanuki Java Service Wrapper's local
In the same application using maven maven repository manager Nexus, became a sensation on the system. Access http://nexus.sonatype.org/downloads/ Download Nexus. Start Nexus, is to start a web server, its default address is localhost: 8081. Nexus in
Use as a maven nexus alternative artifactory PW from: /baoguo/archive//1403145.html Keyword: nexus 1 First, download the Nexus Http://nexus.sonatype.org/download.html download from the official website to download the
Use of alternative artifactory as maven, PW nexus from: /baoguo/archive//1403145.html Keyword: nexus 1. First of all download Nexus Http://nexus.sonatype.org/download.html download from the official website to download
Access http://nexus.sonatype.org/downloads/ Download Nexus. Start Nexus, is to start a web server, its default address is localhost: 8081. Nexus in the servlet container called Jetty to run, it uses a file called Tanuki Java Service Wrapper's local s
--- Maven process with a small problem big problem is many, not an article written an article, simply write with ---- ------- Nexus plus index Click the Administration menu below Repositories, these three warehouses Apache Snapshots, Codehaus Snapshots, M
Click the Administration menu below Repositories, these three warehouses Apache Snapshots, Codehaus Snapshots, Maven Central's configuration under the remote repository access under the Download Remote Indexes amended as true. Then in the three wareh
--- Maven process with a small problem big problem is many, not an article written an article, simply write with ---- ------- Nexus plus index Click the Administration menu below Repositories, these three warehouses Apache Snapshots, Codehaus Snapshots, M
--- Maven process with the big problem is really a lot of small problems, not an article written article, simply write together ---- ------- Nexus index increases Click the Administration menu below Repositories, these three warehouses Apache Snapshots, C
nexus is sonatype developed a maven repository manager, sonatype is the maven behind the company, specialize in consulting services related to maven, but also developed some very good tools, nexus and m2eclise are. First, download the nexus webapp, y
Copyright (C) , All Rights Reserved.
版权所有 闽ICP备号
processed in 0.040 (s). 10 q(s)博客分类:
nexus的安装已经好了,再重新试一次
准备软件:
maven3.0.3
eclipse-jee-indigo-win32-x86_64.zip
nexus-webapp-1.9.2.2.war
apache-tomcat-6.0.33-windows-x64.zip
主要就这几项,同时把已经好的maven setting保留下来;
这次安装,先安装nexus,再maven,最后eclipse使用maven
------------------------------------------------------------------------------------------------------------
1. 解压tomcat
2. nexus.war复制到tomcat的webapps中,解压成nexus目录 (最好按照标准的方式安装)
3. 修改nexus目录的:WEB-INF中的plexus.properties文件,
修改其中nexus-work项,到自己需要的目录中
4. 启动tomcat,在浏览器上能够访问到
,以及在nexus-work的设置对应地方能看到内容,启动成功
5. 修改nexus的Maven Central设置:(缺省的管理员为admin/admin123)
设置 Download Remote Index = true
同时设置代理
好了注意观察tomcat的log,---- 这个时候,网络和cpu应该有点忙
没想到第一次就有问题,
11:00:44 ERROR [pool-1-thread-1] - org.apache.maven.index.updater.DefaultIndexUpdater - Fallback to *.zip also failed: org.sonatype.nexus.proxy.RemoteStorageException: Transport error while executing GET method [repositoryId="central", requestPath="/.index/nexus-maven-repository-index.zip", remoteUrl=""] 11:00:44 WARN
[pool-1-thread-1] - org.sonatype.nexus.index.DefaultIndexerManager - Cannot fetch remote index for repository "Maven Central" [id=central]
重新点了Maven Central的Update Index
重启了一次tomcat,Maven Central没有自动开始更新,手动的执行了一次UpdateIndex, 看到网络连接开始有流量了,那就等
当网络流量结束了,刷新Maven Central的 Browse Index,有内容出来了,index下载完成
(这个过程是为了让nexus下载repository index,这个文件有些大,要等,可以在nexus的Schedule Tasks中,看到当前的任务)
6. 调整Public Repositories的设置:
在Ordered Group Repositories中,只选择Maven Central
Save以后,还是重新Update Index保险一点
在Public Repositories的 Browse Index窗口,点一下Refresh,可以看到Maven Central的所有内容
到目前为止,应该nexus配置完成;
===================================================================
Maven的配置:
1. 解压: apache-maven-3.0.3-bin.tar.gz
设置环境变量: M2_HOME=安装目录
把 %M2_HOME%\bin 加入到Path中
设置: MAVEN_OPTS= -Xms128m
2. 运行mvn -v看是否正常
这个时候,不会创建本地Repository
3. 把%M2_HOME%\conf下的setting.xml 复制到 用户目录下的 .m2 目录中
各个不同系统中,用户目录不一样
4. 修改用户下的 setting.xml
修改方式按照
中“5. 本地maven配置:”的说明操作
5. 运行mvn help:system
观察mvn的log,如果没有问题,运行结束,本地Repository创建成功,就ok了
有问题,回去修改setting.xml设置,哪里错误报错会很清楚的;
===================================================================
Eclipse配置
1. 解压: eclipse-jee-indigo-win32-x86_64.zip
2. 安装m2eclipse 和 m2e-extras:
http://m2eclipse.sonatype.org/sites/m2e
m2e-extras:
http://m2eclipse.sonatype.org/sites/m2e-extras
3. 安装好后,设置maven repository
打开Maven Repositories的时候,Global Repositories就在自动更新
4. 创建一个工程试一下:创建helloworld
创建工程,maven要下载大量的构件,在Console的maven窗口中可以看见
5. 又碰到一个问题,双击pom.xml,打开的是普通xml编辑窗口,没有像以前那样,显示pom特有的一些tab页
在pom.xml上,点右键选择 open with ,选择other 窗口,选择 Maven POM Editor
重新打开pom.xml, 显示了maven特有的pom.xml编辑窗口
在Window ---& Preferences ---& Maven ---& POM Editor 把2个勾都选上,可以看到更多内容
6. 在Dependence窗口中,随便增加一个构件,譬如 : org.springframework: spring-core 2.5.6
在保存pom.xml时候,就会更新工程,同时会下载这个构件,以及所依赖的其他构件
7. 运行maven install, 会compiler/package/install 这个构件
运行结束,这个构件就会加入到本地的Repository中
浏览 11268
Schedule TasksSeven7+ 写道我也遇到这种问题,不知道怎么解决,按照楼主的方法,依然是没有解决。Schedule Tasks中压根就没有任务。。。不动为何……Schedule Tasks中没有任务,可以自己手工发起一个更新任务
我也遇到这种问题,不知道怎么解决,按照楼主的方法,依然是没有解决。
Schedule Tasks中压根就没有任务。。。不动为何……
你好& 我是新学maven安装nexus时也碰到不能更新的问题Fallback to *.zip also failed: org.sonatype.nexus.proxy.RemoteStorageException。。两天了都不行 公司代理& 家里没有代理 都连不上然后试了网上的方法& 先把索引文件下载下来& 大概44M http://repo1.maven.org/maven2/.index/nexus-maven-repository-index.zip放在tomcat的root 里面& 把 Remote Storage Location 远程地址改成本地的接下来能看到索引了&& 可是我按教程搜索的时候& 出来的很少& 比如搜索 ehcache& 只出来一个。。 但是去官网搜索& 出来NN个搞不懂啊1. 更新的中央库,有时候连接不上2. 第一次更新,需要下载的数据量很大,需要有耐心
浏览: 293335 次
来自: 上海
请问候选用户是怎样task自己的任务,看网上说先根据任务id先 ...
友情提醒:如果是在MYSQL下创建数据库,则还需要更改\jbp ...
ganjiang 写道有点疑惑,请lz指点,1.那个“depl ...
ganjiang 写道有点疑惑,请lz指点,1.那个“depl ...
有点疑惑,请lz指点,1.那个“deployId”不知是那个i ...
(window.slotbydup=window.slotbydup || []).push({
id: '4773203',
container: s,
size: '200,200',
display: 'inlay-fix'32858人阅读
最近正着手把公司内部的项目迁移到maven平台。需要搭建一个maven私服,选择的是Nexus(别和Google的Nexus手机混淆了)。至于为什么要搭建自己的maven私服,原因有三个:
maven自己的中央库访问速度比较慢,伟大的墙再一闹腾,会时断时续。有些jar包由于版权原因,maven中央仓库没有,比如oracle JDBC驱动。另外也会有一些项目中用到的比较老的开源jar包, 中央仓库也没用。这种情况我们需要把jar包手动上传到私服。公司自己开发的jar包并不开源,不能上传到maven中央仓库,只能部署到私服上面。
至于如何安装Nexus Maven私服,网上有很多的教程,也非常的简单,我就不造重复的轮子了。下面主要就自己遇到的问题作一个汇总,以期能够帮后来者少走弯路。
私服的数据源
私服里面绝大多数的jar包都来自另外一个私服或者中央仓库。所以第一件事情是指定私服的数据来源。Nexus默认设置为Maven中央仓库,但Maven中央仓库实在是太慢,不考虑。国内稳定的maven镜像我了解的有两个,
和。两个和maven中央仓库都不可能完全一样,至少有一个时间的延迟,某些maven中央仓库有的最新版本jar包可能要过一定的时间它们才有。观察了一下,oschina更新频率更快一些,所以选择了oschina。一般无需太关心时延的问题,两个镜像绝大多数情况下都能满足需求。
设置步骤为, 先登陆,Repositories=&Central=&Configuration=&Remote Storage Location。请把Download Remote Indexes选择为True(默认为False),最后请一定记得点击Save按钮。
如何处理下载失败
pom.xml经常就报找不到某某某jar包的错,很烦很头疼。一句话,这个是网络的问题,下载失败。正常情况下jar包存在于三个地方, Local仓库,Nexus私服仓库,镜像或者maven中央仓库。以所列出的顺序为准,搜索的过程由前往后,下载的过程由后往前。下载过程分两段,镜像或者maven中央仓库=&Nexus私服仓库,Nexus私服仓库=&Local仓库,两段都可能出问题。出问题也没事,重试就行了呗,但maven会在Local仓库中生成一份以lastUpdated结尾的破文件,一个错误的缓存(cache)。要能正确重试,只能手动删除缓存。
先判断是哪一段出错,选择Repositories=&Central=&Brower Storage,看一下对应的jar包在Nexus私服上面有没有,没有的话说明镜像或者maven中央仓库=&Nexus私服仓库下载失败,否则Nexus私服仓库=&Local仓库下载失败。
镜像或者maven中央仓库=&Nexus私服仓库下载失败处理方法
删除Local仓库的缓存。打开~/.m2/repository文件夹,删除报错jar包所在的文件夹(也可以只删除特定的子文件,提高效率)。删除Nexus私服仓库的缓存。Repositories=&Central=&Brower Storage,选择对应的目录树,右键先Expire Cache,后Delete。
Nexus私服仓库=&Local仓库下载失败处理方法
这种情况简单很多,只要删除Local仓库的缓存即可。步骤如上。
万事万物有优点,也必定有缺点,maven也一样。个人感觉maven有些过于复杂了,入门比较难,另外也不够健壮,经常需要花很多时间去和错误和warning作斗争,累。
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:642157次
积分:5957
积分:5957
排名:第4493名
原创:73篇
评论:156条
阅读:27519
阅读:155987
(2)(1)(2)(2)(2)(1)(3)(1)(4)(1)(4)(2)(2)(1)(4)(1)(2)(2)(2)(3)(7)(1)(12)(3)(2)(1)(1)(1)(11)
(window.slotbydup = window.slotbydup || []).push({
id: '4740881',
container: s,
size: '200,200',
display: 'inlay-fix'}

我要回帖

更多关于 nexus index remote 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信