maven常见异常以及解决方法
2016-01-07 17:44
99 查看
本文写的是我在整合ssm框架时遇到的一些问题,我估计很多人也会遇到,所以,这里作为一个总结,希望能够帮助大家解决问题
一,加入shiro组件时抛出的异常
加入步骤(略)
问题
1,保存后,无法导入shiro包的,信息如下
Description Resource Path Location Type
ArtifactDescriptorException: Failed to read artifact descriptor for org.apache.shiro:shiro-core:jar:1.3.2: ArtifactResolutionException: Failure to transfer org.apache.shiro:shiro-core:pom:1.3.2 from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.shiro:shiro-core:pom:1.3.2 from/to central (http://repo1.maven.org/maven2): connection timed out to http://repo1.maven.org/maven2/org/apache/shiro/shiro-core/1.3.2/shiro-core-1.3.2.pom pom.xml /shirotest line 1 Maven Dependency Problem
先看看log信息,说是伪描述异常,然后导致的timeout无法连接的错误,然后在网上找资料啊,有的说可以使用下面的方法
right click on project -> maven -> update-project -> force to update snapshot/release -> OK.
但是这个方法对我并没有什么作用,既然是无法连接,那我就自己连接http://repo1.maven.org/maven2,看看是不是能连上,结果,是连不上。在继续google,得到这样的答案:http://repo1.maven.org/maven2这个中央仓库地址已经被屏蔽了,被屏蔽固然没法连接了,解决方法呢,1,使用其他的镜像路径,2,使用私服
可用的镜像路径如下
具体的步骤是
1,cmd->mvn -version,有信息说明环境配置成功
2,进入mvn的目录的setting.xml文件中,更改mirrors,添加一个借点
<mirror>
<id>ibiblio</id>
<mirrorOf>*</mirrorOf>
<name>ibiblio</name>
<url>http://maven.ibiblio.org/maven2/</url>
</mirror>
亲测可用
3,cmd->mvn help:system,自己下载jar包,具体的可见oschins镜像代替
一,加入shiro组件时抛出的异常
加入步骤(略)
问题
1,保存后,无法导入shiro包的,信息如下
Description Resource Path Location Type
ArtifactDescriptorException: Failed to read artifact descriptor for org.apache.shiro:shiro-core:jar:1.3.2: ArtifactResolutionException: Failure to transfer org.apache.shiro:shiro-core:pom:1.3.2 from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.shiro:shiro-core:pom:1.3.2 from/to central (http://repo1.maven.org/maven2): connection timed out to http://repo1.maven.org/maven2/org/apache/shiro/shiro-core/1.3.2/shiro-core-1.3.2.pom pom.xml /shirotest line 1 Maven Dependency Problem
先看看log信息,说是伪描述异常,然后导致的timeout无法连接的错误,然后在网上找资料啊,有的说可以使用下面的方法
right click on project -> maven -> update-project -> force to update snapshot/release -> OK.
但是这个方法对我并没有什么作用,既然是无法连接,那我就自己连接http://repo1.maven.org/maven2,看看是不是能连上,结果,是连不上。在继续google,得到这样的答案:http://repo1.maven.org/maven2这个中央仓库地址已经被屏蔽了,被屏蔽固然没法连接了,解决方法呢,1,使用其他的镜像路径,2,使用私服
可用的镜像路径如下
http://maven.ibiblio.org/maven2/ http://maven.oschina.net/content/groups/public/ (这个其实是oschina对ibiblio的同步,同步周期为一天,所以有时间差,如果ibiblio可用,就直接用)
阿里云的镜像,还是挺快的
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
阿里云的镜像,还是挺快的
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
具体的步骤是
1,cmd->mvn -version,有信息说明环境配置成功
2,进入mvn的目录的setting.xml文件中,更改mirrors,添加一个借点
<mirror>
<id>ibiblio</id>
<mirrorOf>*</mirrorOf>
<name>ibiblio</name>
<url>http://maven.ibiblio.org/maven2/</url>
</mirror>
亲测可用
3,cmd->mvn help:system,自己下载jar包,具体的可见oschins镜像代替
相关文章推荐
- 2016-01-07 activityviewcontroller
- 浅谈压缩感知(十九):MP、OMP与施密特正交化
- Visual Studio 2013 web调试oracle打开连接时报错
- Vmware虚拟机中安装双系统,Win7无法安装网卡驱动的解决办法
- js urlencode , encodeURIComponent
- 关于使用Mybatis的分页插件com.github.pagehelper报空指针
- MySQL索引原理及慢查询优化
- 在opencv中,关于IplImage和Mat类型之间的转换
- css 选择器
- 2016-01-07 UIToolbar
- cron
- gettimeofday()函数的使用方法 转载
- iOS开发常用的第三方类库
- Launch 启动全屏 隐藏上方状态栏
- 183,常用控件自带的代理使用方法
- 2016-01-07 定时器
- SQL Server 2012 使用警报调度数据库作业通知操作员
- GCD (Grand Central Dispatch)
- Scala数据集操作
- There is no default constructor available in xxx错误引发