์Šคํ”„๋ง ๋ถ€ํŠธ 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