Spring Tool Suite首次使用pom.xml出现依赖异常解决办法
2017-02-08 22:43
537 查看
Ecplise 安装 spring-tool-suit
首次使用pom.xml出现依赖错误解决方法
来自fair-j 转截请注明出处
首先这个问题会在第一次使用STS的时候发生
大体是新建一个带有maven支持的工程 或者直接从DashBorad中导入guide的时候
都会出现pom.xml的异常 导致项目不能被编译
会出现很多的依赖错误 我这边就复制了一个 在新建一个JPA项目的时候会出现:
写道
Description Resource Path Location Type
ArtifactDescriptorException: Failed to read artifact descriptor for org.springframework.boot:spring-boot-starter-web:jar:0.5.0.M6: ArtifactResolutionException: Failure to transfer org.springframework.boot:spring-boot-starter-web:pom:0.5.0.M6 from , resolution
will not be reattempted until the update interval of spring-snapshots has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-web:pom:0.5.0.M6 from/to spring-snapshots (): No response received
after 60000 pom.xml /gs-rest-service-complete line 1 Maven Dependency Problem
解决方法其实很简单
参照这里: s-right-after-creating
只要在cmd中对出错的项目进行下mvn compile保证成功后 回到IDE中 如果项目还是有X或者感叹号的话
再在项目上强制update一下就可以了
如下:
此外使用maven时用默认的仓库速度会过慢 下载很小的jar包都需要很久 推介使用oschina的源
使用在这里:
嫌麻烦的话 我这里有一份:
< xml version="1.0" encoding="UTF-8" > <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF
licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at , software distributed under the License is distributed on an "AS IS"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <settings xmlns="" xmlns:xsi="" xsi:schemaLocation=""> <!--本地仓库的位置 我放在了H盘-->
<localRepository>H:\repository\jar</localRepository> <pluginGroups> </pluginGroups> <proxies> </proxies> <servers> </servers> <!--设置oschina的镜像--> <mirrors> <mirror> <id>nexus-osc</id> <mirrorOf>*</mirrorOf> <name>Nexus osc</name> <url>;/url> </mirror> </mirrors>
<profiles> <profile> <id>jdk-1.4</id> <activation> <jdk>1.4</jdk> </activation> <repositories> <repository> <id>nexus</id> <name>local private nexus</name> <url>;/url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots>
</repository> </repositories> <pluginRepositories> <pluginRepository> <id>nexus</id> <name>local private nexus</name> <url>;/url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories>
</profile> </profiles> </settings>
如果使用mvn compile 失败请参考:
http://jingyan.baidu.com/article/066074d645db24c3c21cb088.html
亲测,成功!
首次使用pom.xml出现依赖错误解决方法
来自fair-j 转截请注明出处
首先这个问题会在第一次使用STS的时候发生
大体是新建一个带有maven支持的工程 或者直接从DashBorad中导入guide的时候
都会出现pom.xml的异常 导致项目不能被编译
会出现很多的依赖错误 我这边就复制了一个 在新建一个JPA项目的时候会出现:
写道
Description Resource Path Location Type
ArtifactDescriptorException: Failed to read artifact descriptor for org.springframework.boot:spring-boot-starter-web:jar:0.5.0.M6: ArtifactResolutionException: Failure to transfer org.springframework.boot:spring-boot-starter-web:pom:0.5.0.M6 from , resolution
will not be reattempted until the update interval of spring-snapshots has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-web:pom:0.5.0.M6 from/to spring-snapshots (): No response received
after 60000 pom.xml /gs-rest-service-complete line 1 Maven Dependency Problem
解决方法其实很简单
参照这里: s-right-after-creating
只要在cmd中对出错的项目进行下mvn compile保证成功后 回到IDE中 如果项目还是有X或者感叹号的话
再在项目上强制update一下就可以了
如下:
此外使用maven时用默认的仓库速度会过慢 下载很小的jar包都需要很久 推介使用oschina的源
使用在这里:
嫌麻烦的话 我这里有一份:
< xml version="1.0" encoding="UTF-8" > <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF
licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at , software distributed under the License is distributed on an "AS IS"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <settings xmlns="" xmlns:xsi="" xsi:schemaLocation=""> <!--本地仓库的位置 我放在了H盘-->
<localRepository>H:\repository\jar</localRepository> <pluginGroups> </pluginGroups> <proxies> </proxies> <servers> </servers> <!--设置oschina的镜像--> <mirrors> <mirror> <id>nexus-osc</id> <mirrorOf>*</mirrorOf> <name>Nexus osc</name> <url>;/url> </mirror> </mirrors>
<profiles> <profile> <id>jdk-1.4</id> <activation> <jdk>1.4</jdk> </activation> <repositories> <repository> <id>nexus</id> <name>local private nexus</name> <url>;/url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots>
</repository> </repositories> <pluginRepositories> <pluginRepository> <id>nexus</id> <name>local private nexus</name> <url>;/url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories>
</profile> </profiles> </settings>
如果使用mvn compile 失败请参考:
http://jingyan.baidu.com/article/066074d645db24c3c21cb088.html
亲测,成功!
相关文章推荐
- 使用记事本编写xml文件保存出现异常解决办法
- Spring中使用proxool连接池的配置方式与出现Attempt to refer to a unregistered pool by its alias 'ums'异常的解决办法
- eclipse或者SpringToolSuite里访问tomcat首页出现404错误解决之法
- 使用getHibernateTemplate()的方法时出现空指针异常的解决办法
- spring tool suite juno 创建spring mvc 项目及遇到无法把maven依赖jar包发布到服务器下解决
- myeclipse 使用weblogic10启动hibernate项目时出现ClassNotFoundException: org.hibernate.hql.ast.HqlToken异常的解决办法
- 使用SAX解析XML利用Google Weather服务制作天气预报异常解决办法
- Spring使用session,request,global sessiong作用域出现异常解决方法
- 使用hibernate出现could not parse configuration:hibernate.cfg.xml 错误的解决办法
- 使用Android SDK Manager下载sdk时总是出现中断异常的解决办法。
- linq to sql 使用试图做数据源 翻页时出现的异常的一种解决办法
- 在Servlet使用getServletContext()获取ServletContext对象出现java.lang.NullPointerException(空指针)异常的解决办法
- eclipse或者SpringToolSuite里访问tomcat首页出现404错误解决之法
- JavaWeb学习(5.5)---在Servlet使用getServletContext()获取ServletContext对象出现java.lang.NullPointerException(空指针)异常的解决办法
- Spring Tool Suite (STS)使用Spring Template Project 生成项目时报错解决方法
- 使用Gevent程序正常运行出现这个异常KeyError(155880780,) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored解决办法
- Hibernate里使用jackjson出现异常解决办法
- 获取xml时,出现“(十六进制值 0x1F)是无效的字符之类Xml异常的解决办法
- 获取xml时,出现“(十六进制值 0x1F)是无效的字符之类Xml异常的解决办法
- 在Servlet使用getServletContext()获取ServletContext对象出现java.lang.NullPointerException(空指针)异常的解决办法