개발/Error
[Maven] 메이븐 패키징 실패
namni
2020. 10. 22. 20:42
메이븐 패키징을 하려고 하는데 ! 에러가 발생했다 ! ㅠㅠ
1. 인증서 에러
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
...
위와 같은 에러가 발생했 때는 JDK에 SSL통신에 대한 인증서가 없다는 뜻이다.
메이븐의 서버(repo.maven.apache.org/maven2)에 https로 레퍼지토리의 라이브러리를 다운로드 하는데, 로컬서버에서 인증서를 갖고 있어야 한다.
인증서를 넣어주자 ! [나중에 포스팅하기로!]
2. 벗뜨...에러가 또난다..
Could not resolve dependencies for project :war:0.0.1-SNAPSHOT: Failed to collect dependencies at org.lazyluke:log4jdbc-remix:jar:0.2.4: Failed to read artifact descriptor for org.lazyluke:log4jdbc-remix:jar:0.2.4: Could not transfer artifact org.lazyluke:log4jdbc-remix:pom:0.2.4 from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
뭐라는걸까... maven서버에 이게(org.lazyluke:log4jdbc-remix:jar:0.2.4)없나... 있는데 왜이런걸까
수동으로 다운받아서 넣어야 하나...다른 jar도 그러는데... 어떡하지....
레퍼런스를 뒤져보다가 우리회사가 넥서스를 사용한다는 것이 번뜩 !
넥서스 정보를 repository에 등록하여 다시 mvn package했더니 잘 된다.........
넥서스에서 jar를 다운로드 한 뒤 넥서스에 없을 경우 maven레포지토리를 참조한다.
(。•́︿•̀。) 후,, 메이븐..