1. 程式人生 > >新建maven項目pom.xml文件報錯

新建maven項目pom.xml文件報錯

art attempted error: cti could not posit eat resolve pac

1、背景交代

新建了一個練手的項目,準備了解一下springBoot的使用(之前沒有用過springBoot),百度了一下springBoot教程發現大多數使用maven來管理jar包的引入。因此順帶學習了一下maven,以此貼記錄我在使用maven過程中所遇到的一串問題以及解決的辦法。

2、所遇問題

myeclipse直接創建maven project,創建成功之後發現pom.xml文件報錯,報錯的內容是:

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its
dependencies could not be resolved: Failure to transfer org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3
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.maven.plugins:maven-resources-plugin:jar:2.4.3
from/to central (http://repo1.maven.org/maven2): invalid version format: S:

3、解決方案

在pom.xml文件中添加:

<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
</dependency>

然後update project 問題解決

新建maven項目pom.xml文件報錯