아티팩트 org.apache.maven.plugins : maven-surefire-plugin : pom : 2.7.1을 중앙 (http://repo1.maven.org/maven2)에서 /로 전송할 수 없습니다.
SpringSource Tool Suite에서 새로운 maven 프로젝트를 만들었습니다. 새 maven 프로젝트 에서이 오류가 발생합니다.
http://repo1.maven.org/maven2 에서 org.apache.maven.plugins : maven-surefire-plugin : pom : 2.7.1 전송 실패가 로컬 저장소에 캐시되었습니다. 업데이트 간격까지 해결이 다시 시도되지 않습니다. 중앙의 시간이 경과했거나 업데이트가 강제 실행되었습니다. 원래 오류 : 아티팩트 org.apache.maven.plugins : maven-surefire-plugin : pom : 2.7.1을 중앙 ( http://repo1.maven.org/maven2 ) 에서 /로 전송할 수 없습니다 . 연결 시간이 초과되었습니다.
pom.xml :
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.test.app</groupId>
<artifactId>TestApp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>TestApp</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<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">
<pluginGroups>
</pluginGroups>
<proxies>
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>user</username>
<password>pass</password>
<host>ip</host>
<port>80</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
</proxies>
<servers>
</servers>
<mirrors>
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo1.maven.org/maven2/</url>
</mirror>
</mirrors>
<profiles>
</profiles>
</settings>
빌드 할 수 있습니다. 오류가 IDE 내부의 pom.xml에 표시됩니다.
다음을 사용하여 작업을 단순화하십시오 settings.xml
.
<?xml version="1.0" encoding="UTF-8"?>
<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">
<proxies>
<proxy>
<id>myproxy</id>
<active>true</active>
<protocol>http</protocol>
<username>user</username> <!-- Put your username here -->
<password>pass</password> <!-- Put your password here -->
<host>123.45.6.78</host> <!-- Put the IP address of your proxy server here -->
<port>80</port> <!-- Put your proxy server's port number here -->
<nonProxyHosts>local.net|some.host.com</nonProxyHosts> <!-- Do not use this setting unless you know what you're doing. -->
</proxy>
</proxies>
</settings>
Linux / Unix에서 ~/.m2/settings.xml
. Windows에서 c:\documents and settings\youruser\.m2\settings.xml
또는 c:\users\youruser\.m2\settings.xml
.
<mirrors/>
, <profiles/>
및 <settings/>
섹션의 용도를 실제로 알지 않는 한 필요하지 않습니다 .
Maven을 업데이트 하고 Eclipse에서 " Force update of Snapshots / Releases " 옵션을 선택하면이 문제가 해결됩니다 . 이렇게하면 모든 오류가 지워집니다. 그래서 바로 프로젝트를 클릭 -> 메이븐 -> 업데이트 프로젝트 , 다음 위의 옵션을 선택 -> 확인 . 도움이 되었기를 바랍니다.
Maven이 http://repo1.maven.org/maven2의 Maven 저장소에 연결할 수없는 것 같습니다 .
프록시를 사용하고 있고 브라우저로 링크에 액세스 할 수있는 경우 동일한 설정을 Spring Source Tool Suite (스위트 내에서 실행중인 경우) 또는 Maven에 적용해야합니다.
Maven 프록시 설정의 경우 다음 세부 정보를 사용 settings.xml
하여 .m2
디렉터리에 생성합니다 .
<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">
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>PROXY</host>
<port>3120</port>
<nonProxyHosts>maven</nonProxyHosts>
</proxy>
</proxies>
</settings>
프록시를 사용하지 않고 브라우저로 링크에 액세스 할 수있는 경우 위에 설명 된 모든 프록시 설정을 제거하십시오.
첫 번째 오류의 경우 로컬 저장소 캐시를 삭제하여 로컬 저장소를 확인하는 대신 기본 저장소에서 강제로 다운로드 할 수 있습니다.
두 번째 오류의 경우 프록시 뒤에있는 경우이 방식으로 구성 해야합니다 . 프록시 구성 하지 않으면 지금 네트워크 문제가 있습니다.
나에게 해결책은 오류를 일으키는 특정 폴더를 삭제했습니다. ~/.m2/repository/org/hsqldb/
After deleting the hsqldb
folder I have build the project and everything is fine.
What helped me were the suggestions by @carlspring (create a settings.xml to configure your http proxy):
<?xml version="1.0" encoding="UTF-8"?>
<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">
<proxies>
<proxy>
<id>myproxy</id>
<active>true</active>
<protocol>http</protocol>
<username>user</username> <!-- Put your username here -->
<password>pass</password> <!-- Put your password here -->
<host>123.45.6.78</host> <!-- Put the IP address of your proxy server here -->
<port>80</port> <!-- Put your proxy server's port number here -->
<nonProxyHosts>local.net|some.host.com</nonProxyHosts> <!-- Do not use this setting unless you know what you're doing. -->
</proxy>
</proxies>
</settings>
AND then refreshing eclipse project maven as suggested by @Peter T :
"Force update of Snapshots/Releases" in Eclipse. this clears all errors. So right click on project -> Maven -> update project, then check the above option -> Ok. Hope this helps you.
It seems me there was a network issue. On your side, or on Maven side, or anywhere in the middle. Just try again later.
If the error is permanent, check your network settings. If you are behind a proxy, you need the following in you ~/.m2/settings.xml:
<proxies>
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<host>proxy.host.net</host>
<port>80</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
</proxies>
I strongly recommend to use a Maven Repository Manager such as Nexus. It will help you to get stable and reproducible builds with Maven. As the Repository Manager is usually in your LAN, you don't have to configure the proxy settings, but you need to define some other configurations:
http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.html
http://maven.apache.org/repository-management.html
If none of the above works then try and go this question and answer: Maven error "Failure to transfer..."
and delete your .lastUpdated
files.
I started using maven on my machine first time in while. Got this error: Could not transfer artifact from/to central (https://repo.maven.apache.org/maven2) No such file or directory
Cleaned up ~/.m2/repository directory. Don't experience this problem again
If you are in windows os and dont need any proxy then delete the whole proxy setting
<proxies>
<proxy>
..................
</proxy>
</proxies>
and replace with
<proxies/>
and then do a maven clean build
- Update Maven Project and check the option "Force update of Snapshots/Releases", it will remove errors.
- If not, Maven clean and install the Project.
- Still the error isn't removed, repeat step 1.
It worked for me :)
We have the Proxy set on company level.
After disabling proxy in Internet Explorer this issue was solved (looks like it is then disabled on 'system' level), so all other browsers will pick this change too.
Now I can issue MVN commands from CMD prompt and I have no problem while e.g.
"Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/archetypes/maven-archetype-webapp/1.0/maven-archetype-webapp-1.0.pom"
...that was causing 'Build failure'
Disabling proxy in IE needs to be done on daily basis in our case, because on each system start it gets set
This problem was solved by following steps -
- Go to the local m2 repository and find the directory org/apache/maven/plugins/maven-surefire-plugin.
- Delete the problematic version.
- maven update the project, then download it again.
If you are not behind any proxy and still getting connection timeout error, please check firewall settings/ antivirus. Sometimes firewall may block the connectivity from any tool (like Eclipse/STS etc..)
This can also happen when using an old version of Java that isn't capable of communicating properly with the HTTPS protocol that is now required. Version 8 and above should work as of the time writing this.
ReferenceURL : https://stackoverflow.com/questions/15334394/could-not-transfer-artifact-org-apache-maven-pluginsmaven-surefire-pluginpom2
'IT TIP' 카테고리의 다른 글
Amazon RDS 데이터베이스 서버 인스턴스에서 "mysqladmin flush-hosts"명령을 실행하는 방법은 무엇입니까? (0) | 2020.12.28 |
---|---|
Microsoft SQL Server Management Studio를 사용하여 데이터베이스의 모든 트리거에 대한 스크립트를 생성하는 방법 (0) | 2020.12.28 |
iOS 6 장비로 원격 디버깅하는 동안 Safari에서 "검사 할 수없는 응용 프로그램"이 표시되는 이유는 무엇입니까? (0) | 2020.12.28 |
Intellij-이 이상한 선택은 무엇이며 어떻게 해제합니까? (0) | 2020.12.28 |
Gradle로 매우 긴 빌드 (Android Studio) (0) | 2020.12.28 |