来自fair-jm.iteye.com 转截请注明出处
首先这个问题会在第一次使用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 http://repo.spring.io/libs-snapshot was cached in the local repository, 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 (http://repo.spring.io/libs-snapshot): No response received after 60000 pom.xml /gs-rest-service-complete line 1 Maven Dependency Problem
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 http://repo.spring.io/libs-snapshot was cached in the local repository, 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 (http://repo.spring.io/libs-snapshot): No response received after 60000 pom.xml /gs-rest-service-complete line 1 Maven Dependency Problem
解决方法其实很简单
只要在cmd中对出错的项目进行下mvn compile保证成功后 回到IDE中 如果项目还是有X或者感叹号的话
再在项目上强制update一下就可以了
如下:
此外使用maven时用默认的仓库速度会过慢 下载很小的jar包都需要很久 推介使用oschina的源
使用在这里:http://maven.oschina.net/help.html
嫌麻烦的话 我这里有一份:
<?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 http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, 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="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <!--本地仓库的位置 我放在了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>http://maven.oschina.net/content/groups/public/</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>http://maven.oschina.net/content/groups/public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>nexus</id> <name>local private nexus</name> <url>http://maven.oschina.net/content/groups/public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> </settings>
相关推荐
一、Idea关联的maven本地仓库配置文件settings.xml (1)必须使用默认文件名 D:\developsoft\javaweb\commonPlugins\maven\apache-maven-3.8.1_first\conf\settings.xml ...pom-maven-spring-CusConfigV1不推荐使用.xml
spring pom.xml
spring-tool-suite-3.9.9.RELEASE-e4.11.0-win32-x86_64.zip
使用java纯手动实现的一个简单的Spring框架,pom.xml文件中只包含一个Servlet依赖jar包,参考的网上视频教学做的,仅用于学习
springboot 集成kettle核心包依赖文件配置信息pom.xml
spring-tool-suite-3.9.18.RELEASE-e4.21.0-win32-x86_64.zip
Maven+springMvc+Mybatis+spring+mysql的pom.xml的相关版本依赖
1.Spring4前 spring-jdbc包是独立的,4以后spring-jdbc 就已经没有了
SpringMVC所需的依赖,包含logback的依赖详情,maven项目的基本依赖。 2020/06/02-很久之前的了忘记里面,看见所需的积分太高了,重新设置一下
spring-tool-suite-3.8.4.RELEASE-e4.6.3-win32-x86_64
测试通过,集成了spirng MVC4+data jpa+spring Security pom.xml
需要注意的是,当使用 Spring Boot 时,pom.xml 文件中可能会包括 Spring Boot 相关的依赖和插件,以及额外的配置,如 Spring Boot 版本、启动器依赖等。这些配置有助于简化 Spring Boot 项目的搭建和构建。
spring-mvc.xml spring-mybatis.xml web.xml log4j.properties,项目中需要用到的配置文件。直接可用。
pom.xml,springboot配置好的依赖。包含web ,web-services,junit,tomcat,mysql,thymeleaf等依赖
spring-tool-suite-3.9.5.RELEASE-e4.8.0-win32-x86_64以及历史各版本的下载
ssm(Spring MVC + Spring + MyBatis)整合所需pom.xml文件
Spring Tool Suite安装配置tomcat服务器功能,同时也适合eclipse开发工具.
ssm配置文件齐全
spring-tool-suite-3.9.5.RELEASE-e4.8.0-win32-x86_64
spring开发所必须安装的插件。 官网提供下载 MD5 校验值:21e0c45a46b019fb8a5d932daa1cb9a7