1 쉘 프로젝트와 4 하위 모듈로 maven 프로젝트 설정이 있습니다. 쉘을 만들려고 할 때. 나는 얻다:
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project module1:1.0_A0 (C:\module1\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Failure to find shell:pom:1.0_A0 in http://nyhub1.ny.ssmb.com:8081/nexus/content/repositories/JBoss/ was cached in the local repository, resolution will not be reattempted until the update interval of jboss has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 5, column 11 -> [Help 2]
고독한 모듈을 만들려고하면 동일한 오류가 발생합니다. module1 만 해당 모듈로 교체합니다.
그들 모두에게 그들의 poms에서 부모를 언급하게하십시오.
<parent>
<artifactId>shell</artifactId>
<groupId>converter</groupId>
<version>1.0_A0</version>
</parent>
다음은 shell pom의 관련 부분입니다.
<groupId>converter</groupId>
<artifactId>shell</artifactId>
<version>1.0_A0</version>
<packaging>pom</packaging>
<name>shell</name>
<modules>
<module>module1</module>
<module>module2</module>
<module>module3</module>
<module>module4</module>
</modules>
답변
참고 용입니다.
Maven의 기쁨.
모듈의 상대 경로를 ../pom.xml에 넣으면 해결되었습니다.
parent
요소는이 relativePath
상위의 디렉토리를 가리 키도록해야한다는 요소를. 기본값은..
답변
올바른 settings.xml
파일을 ~/.m2/
디렉토리 에 넣어서 수정할 수도 있습니다 .
답변
대체 이유는 상위 아티팩트가에서 액세스 할 수없는 pom.xml
저장소 (일반적으로 개인 저장소) 에서 온 것일 수도 있습니다 . 해결책은 다음 위치에 해당 저장소를 제공하는 것이 었습니다 pom.xml
.
<repositories>
<repository>
<id>internal-repo</id>
<name>internal repository</name>
<url>https://my/private/repo</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
제 경우에는 Eclipse로 인해 문제가 훨씬 더 복잡했습니다. 저장소는 특수 프로필 ( <profiles><profile><id>activate-private-repo</id><repositories>...
) 에서만 활성화 되었고 Eclipse의 Maven GUI에서는 Ctrl+Alt+P
바로 가기를 통해이 프로필을 설정할 수 없었습니다 .
해결책은 임시로 프로필 외부에 저장소를 선언하고 (무조건) Alt+F5
Maven 업데이트 프로젝트를 시작 하고, 프로필을 활성화하고, 저장소 선언을 프로필에 다시 넣는 것입니다. 이것은 Maven 버그가 아니라 Eclipse 버그입니다.
답변
해석
불가능한 상위 POM : 이는 상위 저장소를 해석 할 수 없음을 의미합니다.
디버그 모드에서 자르기 :
[DEBUG] Reading global settings from **/usr/local/Cellar/maven/3.5.4/libexec/conf/settings.xml**
[DEBUG] **Reading user settings from /Users/username/.m2/settings.xml**
[DEBUG] Reading global toolchains from /usr/local/Cellar/maven/3.5.4/libexec/conf/toolchains.xml
[DEBUG] Reading user toolchains from /Users/username/.m2/toolchains.xml
[DEBUG] Using local repository at /Users/username/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /Users/username/.m2/repository
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
부모 저장소는 maven 중앙의 일부가 아니기 때문입니다. 해결책은 ~ m2 /에 setting.xml을 지정하여 상위 POM을 생성하는 데 도움이됩니다. /Users/username/.m2/settings.xml
해당 XML에서 저장소 정보를 지정해야 할 수 있습니다.
답변
<relativePath />
pom의 부모가 다음과 같이 보이도록 추가하십시오 .
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<relativePath />
</parent>