๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๊ฐœ๋ฐœ/์„œ๋ฒ„ ํ™˜๊ฒฝ

[CentOS 7] Maven ์„ค์น˜ :: ๋งˆ์ด์ž๋ชฝ

by ๐ŸŒปโ™š 2018. 8. 29.

Maven ์ด๋ž€?

๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ๊ด€๋ฆฌํ•ด์ฃผ๋Š” ๋„๊ตฌ์ด๋‹ค.



๋ฉ”์ด๋ธ ์„ค์น˜๋ฅผ ์œ„ํ•ด ์•„ํŒŒ์น˜์žฌ๋‹จ ๋ฉ”์ด๋ธ ํ”„๋กœ์ ํŠธ๋กœ ๋“ค์–ด๊ฐ€ download๋กœ ๋“ค์–ด๊ฐ„๋‹ค.

์ตœ์‹  ๋ฒ„์ „์„ ์›ํ•˜๋ฉด ๋ฐ”๋กœ ๋ณด์ด๋Š” ๋งํฌ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์„ค์น˜๋ฅผ ํ•ด์ฃผ๊ณ , ์ด์ „ ๋ฒ„์ „์„ ์›ํ•œ๋‹ค๋ฉด ์•„๋ž˜ ๋‚ด์šฉ์„ ์ฐธ๊ณ ํ•œ๋‹ค.

http://maven.apache.org/






์Šคํฌ๋กค์„ ๋‚ด๋ ค archives ํด๋ฆญ





๋ฒ„์ „ ํŠธ๋ฆฌ๊ฐ€ ๋‚˜์˜จ๋‹ค.

์›ํ•˜๋Š” ๋ฒ„์ „์„ ๊ฒฝ๋กœ๋กœ ๋“ค์–ด๊ฐ€์ค€๋‹ค.

ํ•„์ž๋Š” 3.3.9๋ฒ„์ „์„ ์„ค์น˜ํ•  ์˜ˆ์ •์ด๋‹ค.





๋ฒ„์ „ ์„ ํƒ ํ›„ binaries๋กœ ์ž…์žฅํ•œ๋‹ค.





tar ํŒŒ์ผ์„ wget์œผ๋กœ ๋ฐ›์•„์ค„๊ฑฐ๋‹ˆ ๋งํฌ์ฃผ์†Œ๋ฅผ ๋ณต์‚ฌํ•œ๋‹ค.




ํŒŒ์ผ์„ ๋ฐ›์•„์ฃผ๊ณ  ํ’€์–ด์ค€๋‹ค.

1
2
3
[jamong@localhost ~]$ cd dev_util/
[jamong@localhost dev_util]$ wget https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
[jamong@localhost dev_util]$ tar xvfz apache-maven-3.3.9-bin.tar.gz

cs





์„ค์น˜์™„๋ฃŒ ํ›„ ํ™˜๊ฒฝ๋ณ€์ˆ˜๋ฅผ ์„ค์ •ํ•˜๊ธฐ ์œ„ํ•ด jamong๊ณ„์ • home์˜ .bash_profile์— ์ถ”๊ฐ€ํ•ด์ค€๋‹ค.

1
2
[jamong@localhost dev_util]$ cd
[jamong@localhost ~]$ vi .bash_profile
cs


1
2
3
4
5
MAVEN_HOME=/home/jamong/dev_util/apache-maven-3.3.9
 
PATH=$PATH:$MAVEN_HOME/bin
 
export MAVEN_HOME

cs





.bash_profile ํŒŒ์ผ์„ ๋ฐ˜์˜ํ•ด์ฃผ๊ณ  ๋งˆ์ง€๋ง‰์œผ๋กœ ํ™•์ธ์„ ํ•ด์ค€๋‹ค.

1
2
3
4
5
6
7
8
[jamong@localhost ~]$ source .bash_profile
[jamong@localhost ~]$ mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T01:41:47+09:00)
Maven home: /home/jamong/dev_util/apache-maven-3.3.9
Java version: 1.7.0_80, vendor: Oracle Corporation
Java home: /home/jamong/dev_util/jdk1.7.0_80/jre
Default locale: ko_KR, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-862.el7.x86_64", arch: "amd64", family: "unix"
cs




๋Œ“๊ธ€