[SPRING] Maven 의존성 찾기 실패
SPRINGMaven 의존성 찾기 실패
Maven 버전 3.1.1을 사용하고 있습니다. 그리고 저는 의존성 스프링으로 컴파일하려고합니다. 다음 사이트를 통해 Maven에 있어야한다는 것을 알았습니다. Maven 저장소 메이븐 검색
다음은 "mvn compile -e"의 스택 추적입니다 :
>mvn compile -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Test 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.233s
[INFO] Finished at: Tue Dec 10 13:44:36 CST 2013
[INFO] Final Memory: 6M/122M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project Test: Could not resolve depe
ndencies for project Test:Test:jar:1.0.0: Failure to find org.spri
ngframework.ws:spring-ws:jar:2.1.4.RELEASE in http://repo.maven.apache.org/maven
2 was cached in the local repository, resolution will not be reattempted until t
he update interval of central has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
n project Test: Could not resolve dependencies for project Test:Co
rrectAddress:jar:1.0.0: Failure to find org.springframework.ws:spring-ws:jar:2.1
.4.RELEASE in http://repo.maven.apache.org/maven2 was cached in the local reposi
tory, resolution will not be reattempted until the update interval of central ha
s elapsed or updates are forced
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDe
pendencies(LifecycleDependencyResolver.java:220)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resol
veProjectDependencies(LifecycleDependencyResolver.java:127)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAr
eResolved(MojoExecutor.java:257)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:200)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not res
olve dependencies for project Test:Test:jar:1.0.0: Failure to find
org.springframework.ws:spring-ws:jar:2.1.4.RELEASE in http://repo.maven.apache.
org/maven2 was cached in the local repository, resolution will not be reattempte
d until the update interval of central has elapsed or updates are forced
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(D
efaultProjectDependenciesResolver.java:198)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDe
pendencies(LifecycleDependencyResolver.java:195)
... 22 more
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Failure
to find org.springframework.ws:spring-ws:jar:2.1.4.RELEASE in http://repo.maven.
apache.org/maven2 was cached in the local repository, resolution will not be rea
ttempted until the update interval of central has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDepen
dencies(DefaultRepositorySystem.java:384)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(D
efaultProjectDependenciesResolver.java:192)
... 23 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to
find org.springframework.ws:spring-ws:jar:2.1.4.RELEASE in http://repo.maven.ap
ache.org/maven2 was cached in the local repository, resolution will not be reatt
empted until the update interval of central has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(Defa
ultArtifactResolver.java:459)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtif
acts(DefaultArtifactResolver.java:262)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDepen
dencies(DefaultRepositorySystem.java:367)
... 24 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to fin
d org.springframework.ws:spring-ws:jar:2.1.4.RELEASE in http://repo.maven.apache
.org/maven2 was cached in the local repository, resolution will not be reattempt
ed until the update interval of central has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newExcepti
on(DefaultUpdateCheckManager.java:232)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtif
act(DefaultUpdateCheckManager.java:206)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownlo
ads(DefaultArtifactResolver.java:599)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownl
oads(DefaultArtifactResolver.java:518)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(Defa
ultArtifactResolver.java:436)
... 26 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException
도움이 될만한 다른 정보를 게시해야하는 경우 알려주십시오. 어떤 도움이라도 대단히 감사합니다. 최신 정보:
<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>Test</groupId>
<artifactId>Test</artifactId>
<version>1.0.0</version>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.2.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.2.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws</artifactId>
<version>2.1.4.RELEASE</version>
</dependency>
</dependencies>
</project>
업데이트 2 : 기존 저장소를 삭제하고 mvn을 다시 실행하면 컴파일됩니다. 나는 여전히 오류가 발생합니다.
[ERROR] Failed to execute goal on project Test: Could not resolve depe
ndencies for project Test:Test:jar:1.0.0: Could not find artifact
org.springframework.ws:spring-ws:jar:2.1.4.RELEASE in central (http://repo.maven
.apache.org/maven2), try downloading from http://www.springsource.com/download/c
ommunity?project=Spring%20Web%20Services -> [Help 1]
해결법
-
==============================
1.중앙 저장소보고
중앙 저장소보고
spring-ws에 대한 검색을 수행하면 pom.xml에 정확하게 지정한 내용의 pom 파일 만 다운로드된다는 것을 알 수 있습니다.
다음과 같이 spring-ws-core를 사용하고 싶을 것 같습니다.
<dependency> <groupId>org.springframework.ws</groupId> <artifactId>spring-ws-core</artifactId> <version>2.1.4.RELEASE</version> </dependency>
-
==============================
2.maven이 리포지토리를 찾는 데 사용하는 settings.xml 파일을 찾습니다. 그것이 가리키는 repo를보고 원하는 jar가 있는지 확인하기 위해 repo를 검사하십시오.
maven이 리포지토리를 찾는 데 사용하는 settings.xml 파일을 찾습니다. 그것이 가리키는 repo를보고 원하는 jar가 있는지 확인하기 위해 repo를 검사하십시오.
예를 들어
<profiles> <profile> <id>default</id> <repositories> <repository> <id>smss-group-m2</id> <url>http://repo.mycompany.net/nexus/content/groups/smss-group-m2/</url> <releases> <updatePolicy>always</updatePolicy> </releases> <repository> </repository> </profile> </profiles>
-
==============================
3.나는이 일을하는 "일반적인"방법이 있는지 모르겠다. 당신의 로컬 Maven 저장소로 가서 그 의존성이 있어야하는 디렉토리로 가서 모든 파일을 지운다. (심지어 org / sprimgframework / ws) 다음 mvn을 다시 실행하십시오. 누락 된 모든 종속성을 다시로드하려고 시도합니다.
나는이 일을하는 "일반적인"방법이 있는지 모르겠다. 당신의 로컬 Maven 저장소로 가서 그 의존성이 있어야하는 디렉토리로 가서 모든 파일을 지운다. (심지어 org / sprimgframework / ws) 다음 mvn을 다시 실행하십시오. 누락 된 모든 종속성을 다시로드하려고 시도합니다.
-
==============================
4.settings.xml 파일에서 로그인 할 때 같은 URL의 붙여 넣기에 나타나는 url과 동일하게 nexus 또는 jfrog repo의 동일한 URL을 붙여 넣으십시오.
settings.xml 파일에서 로그인 할 때 같은 URL의 붙여 넣기에 나타나는 url과 동일하게 nexus 또는 jfrog repo의 동일한 URL을 붙여 넣으십시오.
예 : https : //artifactory.xxxx/artifactory/webapp/#/home
from https://stackoverflow.com/questions/20504046/maven-failed-to-find-dependency by cc-by-sa and MIT license
'SPRING' 카테고리의 다른 글
[SPRING] 봄 AMQP v1.4.2 - 네트워크 실패시 토끼 재접속 문제 (0) | 2019.04.17 |
---|---|
[SPRING] java.lang.NoSuchMethodError : org.springframework.util.ReflectionUtils.clearCache () (0) | 2019.04.17 |
[SPRING] Spring에서는 선택적 경로 변수를 만들 수 있습니까? (0) | 2019.04.17 |
[SPRING] Spring @QuerydslPredicate Questions (0) | 2019.04.17 |
[SPRING] 스프링 부트 애플리케이션에서 스프링 JMS 자동 설정 비활성화하기 (0) | 2019.04.17 |