๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๊ฐœ๋ฐœ/etc

[Maven] ๋งฅ์— ๋ฉ”์ด๋ธ ์„ค์น˜ํ•˜๊ธฐ, local repository ์œ„์น˜ ์ฐพ๊ธฐ

by ynzu๐Ÿค 2022. 7. 1.
๋ฐ˜์‘ํ˜•

https://maven.apache.org/download.cgi

 

Maven – Download Apache Maven

Downloading Apache Maven 3.8.6 Apache Maven 3.8.6 is the latest release and recommended version for all users. The currently selected download mirror is https://dlcdn.apache.org/. If you encounter a problem with this mirror, please select another mirror. I

maven.apache.org

์œ„ ์‚ฌ์ดํŠธ์—์„œ ํŒŒ์ผ์„ ๋‹ค์šด๋กœ๋“œ ๋ฐ›๋Š”๋‹ค. 

 

1. ํ„ฐ๋ฏธ๋„ ์˜คํ”ˆ

2. ๋‹ค์šด๋กœ๋“œ ๋ฐ›์€ ํŒŒ์ผ /usr/local ๋กœ ์ด๋™ : sudo mv Downloads/apache-maven-3.8.4 /usr/local

( ํŒจ์Šค์›Œ๋“œ๋Š” ๋งฅ ๊ณ„์ • ํŒจ์Šค์›Œ๋“œ๋ฅผ ์ž…๋ ฅํ•˜๋ฉด ๋จ)

3. vi ~/.bash_profile ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•˜์—ฌ  .bash_profile ํŒŒ์ผ์„ ์—ด์–ด ๋ฉ”์ด๋ธ ์„ค์ • ์ถ”๊ฐ€

export M3_HOME=/usr/local/apache-maven-3.8.4
export PATH=$PATH:$M3_HOME/bin

4. source ~/.bash_profile ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•˜์—ฌ ์ถ”๊ฐ€ํ•œ ๋ฉ”์ด๋ธ ์„ค์ • ์ ์šฉ

5. ์„ค์น˜ ํ™•์ธ

 


๊ธฐ๋ณธ์ ์œผ๋กœ Maven ๋กœ์ปฌ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ ${user.home}/.m2/repositoryํด๋”๋กœ ์„ค์ •๋œ๋‹ค.

 

๋กœ์ปฌ ๋ ˆํŒŒ์ง€ํ† ๋ฆฌ๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†์–ด์„œ ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•˜์—ฌ ๋กœ์ปฌ ์ €์žฅ์†Œ ์œ„์น˜๋ฅผ ์„ค์ •ํ•˜์˜€๋‹ค.

mvn help:evaluate -Dexpression=settings.localRepository

 

 

728x90
๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€