μΈν”„λŸ°/μŠ€ν”„λ§ λΆ€νŠΈ - 핡심 원리와 ν™œμš©

μŠ€ν”„λ§ λΆ€νŠΈ 3.xx λΉŒλ“œ 였λ₯˜ (Could not resolve org.springframework.boot:spring-boot-dependencies:3.0.5.)

초보보 ν˜œμ§„ 2023. 4. 20. 09:46
728x90

 

μŠ€ν”„λ§ λΆ€νŠΈ 핡심 원리 와 ν™œμš© κ°•μ˜λ₯Ό λ“£λ‹€κ°€ 이제 μŠ€ν”„λ§λΆ€νŠΈ 3μ λŒ€λ₯Ό μ‚¬μš©ν•΄μ„œ μˆ˜μ—…μ„ μ§„ν–‰ν•˜κΈ° λ•Œλ¬Έμ— 

μžλ°” 17도 μ΄ˆλ°˜μ— μ„€μΉ˜ν–ˆμ—ˆλ‹€.. (μŠ€ν”„λ§λΆ€νŠΈ 3λΆ€ν„°λŠ” μžλ°” 17이상이어야 ν•œλ‹€.) 

 

그리고 이제 μŠ€ν”„λ§ λΆ€νŠΈ ν”„λ‘œμ νŠΈλ₯Ό μƒμ„±ν•΄μ„œ ν”„λ‘œμ νŠΈλ₯Ό λΉŒλ“œν•˜λŠ”λ° ...

 

Execution failed for task ':dependencies'.
> Could not resolve all dependencies for configuration ':detachedConfiguration1'.
   > Could not resolve org.springframework.boot:spring-boot-dependencies:3.0.5.
     Required by:
         project :
      > Could not resolve org.springframework.boot:spring-boot-dependencies:3.0.5.
         > Could not get resource 'https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-dependencies/3.0.5/spring-boot-dependencies-3.0.5.pom'.
            > Could not HEAD 'https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-dependencies/3.0.5/spring-boot-dependencies-3.0.5.pom'.

               > repo.maven.apache.org

 

Unknown host 'repo.maven.apache.org'. You may need to adjust the proxy settings in Gradle.

 

자꾸 이런 였λ₯˜κ°€ λ‚˜λ©΄μ„œ λΉŒλ“œ μ‹€νŒ¨ν–ˆλ‹€..

 

μš°μ„  ν•΄κ²° 방법쀑에 μŠ€ν”„λ§ λΆ€νŠΈ 3 이 μ•„λ‹Œ 2μ λŒ€λ‘œ 내리면 λΉŒλ“œ μ„±κ³΅ν•œλ‹€κ³  ν–ˆμ§€λ§Œ..

λ‚˜λŠ” μ§€κΈˆ μŠ€ν”„λ§ λΆ€νŠΈ 3μ λŒ€μ—μ„œ κ°•μ˜λ₯Ό λ“£κ³  κ³΅λΆ€ν•΄μ•Όν•˜κΈ° λ•Œλ¬Έμ— ν•΄κ²° 방법이 μ•„λ‹ˆμ—ˆλ‹€. 

 

κ΅¬κΈ€λ§ν•΄λ³΄λ‹ˆκΉŒ μžλ°” 버전 λ¬Έμ œλΌλŠ” μ–˜κΈ°κ°€ λ§Žμ•„μ„œ 

μžλ°” 17도 λ‹€μ‹œ μ„€μΉ˜λ„ 해보고... 

 

μΈν…”λ¦¬μ œμ΄μ— μžλ°” 17둜 μ„ΈνŒ…λ˜μ§€ μ•Šμ•˜μ„ κ²½μš°λ„ μžˆλ‹€κ³  ν•΄μ„œ 

λͺ¨λ‘ μžλ°” 17둜 μ„ΈνŒ…λ„ 해쀬닀.. 

 

κ·Έ λ‹€μŒμœΌλ‘œ λ°œκ²¬ν•œ λ°©λ²•μœΌλ‘  build.gradle에 

sourceCompatibility = '17'

이게 μ—†μ–΄μ„œ μΌμˆ˜λ„ μžˆλ‹€ν–ˆμ§€λ§Œ λ‚˜λŠ” μžˆμ–΄μ„œ 해결방법이 μ•„λ‹ˆμ—ˆλ‹€..

 

 

κ·ΈλŸ¬λ‹€ μ§„μ§œ μš°μ—°νžˆ κ΅¬κΈ€λ§ν•˜λ‹€κ°€ ...

https://ssons.tistory.com/61

 

mavenCentral() vs jcenter() κ°œλ… 및 차이점

μ•„λž˜μ™€ 같이 springboot gradle ν”„λ‘œμ νŠΈλ₯Ό μž‘μ—… 쀑에 build.gradle 섀정을 ν•΄μ£Όμ—ˆμŠ΅λ‹ˆλ‹€. 문득 mavenCentral() κ³Ό jcenter() 두 개의 차이점은 무엇이고 μ™œ μ„€μ •ν•΄μ£ΌλŠ” 것인가에 λŒ€ν•œ 근본적인 μ΄μœ μ— λŒ€ν•΄μ„œ

ssons.tistory.com

μ—¬κΈ°μ„œ mavenCentral() vs jcenter() 이런 글을 λ°œκ²¬ν–ˆκ³ .. ν˜Ήμ‹œ? ν•΄μ„œ 

plugins {
   id 'java'
   id 'org.springframework.boot' version '3.0.5'
   id 'io.spring.dependency-management' version '1.1.0'
}

group = 'hello'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'

repositories {
   mavenCentral()
   jcenter()
}

dependencies {
   implementation 'org.springframework.boot:spring-boot-starter-web'
   testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

tasks.named('test') {
   useJUnitPlatform()
}

 

jcenter() λ₯Ό μΆ”κ°€ν•΄λ΄€λ”λ‹ˆ build μ„±κ³΅ν–ˆλ‹€..????? 뭐지???? 

μœ„μ— κΈ€μ—μ„œ μ„€λͺ…ν•˜κΈ°λ‘œλŠ” μš°μ„  repositories λŠ” 각쒅 μ˜μ‘΄μ„± (라이브러리) 듀을 μ–΄λ–€ 원격 μ €μž₯μ†Œμ—μ„œ 받을 것인지λ₯Ό μ •ν•΄μ€€λ‹€. 

mavenCentral()κ³Ό jcenter()λŠ” Android Studio 의 Gradle ν”ŒλŸ¬κ·ΈμΈ 용 μ €μž₯μ†ŒλΌκ³  ν•œλ‹€. 

보톡 mavenCentral()을 많이 μ‚¬μš©ν•˜κ³  jcenter()λŠ” 지원 μ€‘λ‹¨λœλ‹€κ³  ν–ˆλŠ”λ° μ™œ 이걸 λΆ™μ΄λ‹ˆκΉŒ λΉŒλ“œ μ„±κ³΅ν•˜λŠ”μ§€λŠ” 아직 잘 λͺ¨λ₯΄κ² λ‹€..

ꡬ글링해봐도 κ΄€λ ¨ λ‚΄μš©μ΄ λ‚˜μ˜€μ§€λŠ” μ•Šμ•„μ„œ.. μš°μ„  해결은 ν–ˆμœΌλ‹ˆ μž‘μ„±μ€ ν•˜μ§€λ§Œ 원인과 이유 νŒŒμ•…μ΄ μ•ˆλΌμ„œ...

λ‚˜μ€‘μ— 찾게 λœλ‹€λ©΄ λ‚΄μš© μΆ”κ°€λ₯Ό ν•΄μ•Όκ² λ‹€. ..πŸ˜‚

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

728x90