아티팩트 org.apache.maven을 전송할 수 없습니다.플러그인: maven-surefire-pair: pattern: 2.7.1에서 central(http://repo1.maven.org/maven2)로)
SpringSource Tool Suite에서 새로운 maven 프로젝트를 만들었습니다.새로운 메이븐 프로젝트에서 이 오류가 발생하고 있습니다.
org.apache.maven을 전송하지 못했습니다.http://repo1.maven.org/maven2의 plugins:maven-surefire-fire:displays:2.7.1이 로컬저장소에 캐시되었습니다.central 업데이트 간격이 경과하거나 업데이트가 강제될 때까지 해결은 재시도되지 않습니다.원래 오류: 아티팩트 org.apache.maven을 전송할 수 없습니다.플러그인: maven-surefire-fired: central에서/central로 연결(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/>
어떤 용도를 알고 있는 경우가 아니라면요
이 문제는 Eclipse에서 매븐을 업데이트하고 "스냅샷/릴리스 강제 업데이트" 옵션을 선택하면 해결됩니다.그러면 모든 오류가 지워집니다.프로젝트 -> 메이븐 -> 갱신 프로젝트를 오른쪽 클릭하여 위의 옵션 -> OK를 선택합니다.도움이 되시길 바랍니다.
추가: "로컬 파일 시스템에서 워크스페이스 리소스 새로 고침"을 선택 취소합니다. 이 기능은 작동합니다.
당신의 Maven은 http://repo1.maven.org/maven2의 Maven 저장소에 접속할 수 없는 것 같습니다.
프록시를 사용하여 브라우저에서 링크에 액세스할 수 있는 경우 동일한 설정을 Spring Source Tool Suite(스위트 내에서 실행 중인 경우) 또는 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/
후hsqldb
폴더는 내가 프로젝트를 만들었고 모든 것이 정상이다.
도움이 된 것은 @carlspring(http 프록시를 설정하기 위한 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>
그리고 @Peter T가 제안한 것처럼 상쾌한 일식 프로젝트 맵:
Eclipse의 "스냅샷/릴리스 강제 업데이트"그러면 모든 오류가 지워집니다.프로젝트 -> 메이븐 -> 갱신 프로젝트를 오른쪽 클릭하여 위의 옵션 -> OK를 선택합니다.도움이 되시길 바랍니다.
네트워크에 문제가 있었던 것 같습니다.네 옆이나 메이븐 옆이나 중간 어디든지.나중에 다시 시도하세요.
에러가 영속적인 경우는, 네트워크 설정을 확인해 주세요.프록시의 배후에 있는 경우는, ~/.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>
나는 오랜만에 기계로 메이븐을 사용하기 시작했다.Could not transfer artifact from/to central (https://repo.maven.apache.org/maven2) No such file or directory
~/.m2/보관소는 이런
repo url:https://repo1.maven.org/maven2 에서 https 를 사용해 보겠습니다.
경우 1.2:jdk1.7 의 TLS 를 유효하게 .-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2
Nexus 등의 Maven Repository Manager 사용을 강력히 권장합니다.Maven을 사용하여 안정적이고 재현 가능한 빌드를 얻는 데 도움이 됩니다.Repository Manager는 일반적으로 LAN에 있으므로 프록시 설정을 구성할 필요는 없지만 다른 구성을 정의해야 합니다.
http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.html
http://maven.apache.org/repository-management.html
위의 어느 것도 효과가 없는 경우는, Maven 에러 「Failure to transfer.."
해 주세요..lastUpdated
files.complete files files files files files files files files.
- Maven 프로젝트를 업데이트하고 "스냅샷/릴리스 강제 업데이트" 옵션을 선택하면 오류가 제거됩니다.
- 그렇지 않으면 Maven이 프로젝트를 청소하고 설치합니다.
- 그래도 에러는 해소되지 않습니다.순서 1을 반복합니다.
효과가 있었습니다. :)
이 문제는 현재 필요한 HTTPS 프로토콜과 제대로 통신할 수 없는 이전 버전의 Java를 사용하는 경우에도 발생할 수 있습니다.버전 8 이후는, 이것을 쓰는 시점부터 기능합니다.
Windows OS 를 사용하고 있어 프록시가 필요 없는 경우는, 프록시 설정 전체를 삭제합니다.
<proxies>
<proxy>
..................
</proxy>
</proxies>
로 대체하다
<proxies/>
깔끔하게 조립해서
회사 차원에서 Proxy가 설정되어 있습니다.
Internet Explorer에서 프록시를 비활성화한 후 이 문제가 해결되었습니다('시스템' 수준에서 비활성화된 것처럼 표시되므로 다른 모든 브라우저에서도 이 변경이 선택됩니다).
이제 CMD 프롬프트에서 MVN 명령을 실행할 수 있으며 다음과 같은 경우 문제가 없습니다.
"다운로드: https://repo.maven.apache.org/maven2/org/apache/maven/archetypes/maven-archetype-webapp/1.0/maven-archetype-webapp-1.0.pom"
...그것이 '빌드 실패'의 원인이었습니다.
이 경우 IE에서 프록시를 비활성화해야 합니다.이는 각 시스템을 시작할 때마다 프록시가 설정되기 때문입니다.
이 문제는 다음 단계로 해결되었습니다.
- 로컬 m2 저장소로 이동하여 디렉토리 org/apache/maven/plugins/maven-surefire-plugin을 찾습니다.
- 문제가 있는 버전을 삭제합니다.
- maven은 프로젝트를 업데이트한 후 다시 다운로드합니다.
저는요.File
> Settings
> ...
> BuildTools
> Maven
> Work Offline[■]
IntelliJ inte 、 [ Preference ]-> [ Build ]- [ Execution ]- [ Deployment ]-> [ Build Tools ]-> [ Maven ]으로 이동합니다."스냅샷 항상 업데이트" 체크박스를 켜고 변경 내용을 적용한 후 저장한 후 mvn 클린 설치를 수행합니다.
프록시 설정을 시도할 수 있습니다.
파일 -> 설정 -> 외관 -> 시스템 설정 -> HTTP 프록시 -> 자동 검출
그런 다음 프록시 URL을 제공합니다.
프록시의 배후에 없는 경우에도 접속 타임아웃 에러가 발생하는 경우는, 파이어 월 설정/안티바이러스를 확인해 주세요.방화벽이 모든 도구(Eclipse/STS 등)로부터의 연결을 차단할 수 있습니다.
자바 버전을 1.7에서 1.8로 변경했는데 작동했어요.
문제는 이 때문에maven 3.8.1
HTTP를 통한 전송을 정지했습니다.가장 간단한 해결책은 단순히 pom.xml 파일로 이동하여 Import할 저장소 아래에 있는 파일을 단순히 교체하는 것입니다. HTTP
와 함께HTTPS
잘 될 거야
프로젝트를 오른쪽 클릭합니다.Maven Update 프로젝트로 이동한 후 위의 "스냅샷/릴리스 강제 업데이트" 옵션을 선택하십시오.
먼저, 할 수 있습니다.mvn clean
프로젝트의 캐시를 클리어합니다.그런 다음 maven 패키지를 다시 로드하고 maven 스냅샷을 강제로 업데이트하십시오.
언급URL : https://stackoverflow.com/questions/15334394/could-not-transfer-artifact-org-apache-maven-pluginsmaven-surefire-pluginpom2
'programing' 카테고리의 다른 글
Java 불변의 컬렉션 (0) | 2022.09.04 |
---|---|
불투명 C 구조체: 다양한 선언 방법 (0) | 2022.09.04 |
부언, 조건부 연산자 및 자동 박스 (0) | 2022.09.04 |
Java에서의 정규식 \\s vs. \\s (0) | 2022.09.04 |
Axios 호출에서 Vuejs img 요소로 이미지를 표시하려면 어떻게 해야 합니까?효과가 있는 것을 본 적이 없다 (0) | 2022.09.03 |