Maven
๐ฆMaven
Java ๊ธฐ๋ฐ์ ํ๋ก์ ํธ ๋น๋, ์ปดํ์ผ์ ์ํํ๋ ๋น๋ ๋๊ตฌ์ด๋ค. ๋น๋์ ํ ์คํธ๋ฅผ ๋ณํ ์ํ ํ๊ฑฐ๋ ์๋ฒ ์ธก deploy ์์์ ๊ด๋ฆฌ ํ ์ ์๋ค.
Maven์ ์ฃผ๋ ๋ชฉํ๋ ์ต๋จ์๊ฐ๋ด์ ๊ฐ๋ฐํ๊ฒ์ ์ ์ฒด ์ํ๋ฅผ ์ดํด ํ ์ ์๊ฒ ํ๋๊ฒ์ ๋๋ค. - ๐ What is Maven?
๐ง ์์กด์ฑ ๊ด๋ฆฌ
/pom.xml
	<dependency>
		<groupId>org.mariadb.jdbc</groupId>
		<artifactId>mariadb-java-client</artifactId>
		<version>2.0.1</version>
				...
	</dependency>
- properties- ํน์  ๊ฐ์ ๋ฐฐํฌ ํ๊ฒฝ์ ๋ฐ๋ผ ๊ฐ์ ๋ค๋ฅด๊ฒ ํ๊ธฐ ์ํด์ ๋ค์๊ณผ ๊ฐ์ด ์นํํ๊ณ ์ ํ๋ ๋ณ์๋ฅผ ์ถ๊ฐํ๋ค.
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<!--  ๋น๋์ ์์ค์ฝ๋ ์ธ์ฝ๋ฉ ํ์
 ์ง์  -->
	</properties>

- ๋น๋๋ .jar์์๋ ๋ฃจํธ ๋๋ ํ ๋ฆฌ์ ์์ฑํ webapp์ ํฌํจํ์ง ์์์ฑ๋ก ๋น๋๋์ง ์๋๋ค.
- newโก๏ธ- ๐ SourceFolder("/resources”)
- ๐ webappโก๏ธ- ๐ SourceFolder("/resources”)
- ๐ ROOT projectโก๏ธ ๐ง- Propertiesโก๏ธ- Java Build Path์ include ํ์ธ
- ๐ pom.xml์- <resources>์ถ๊ฐ
- 
โ๏ธ (Optional) DOCUMENT_ROOT path๋ฅผ ์ ๋๊ฒฝ๋ก๋ก ๋ฐ๊พธ์ด ์ฃผ๋ ์ฝ๋๋ฅผ ์์ฑํด์ผํ๋ค. 
- 
โ๏ธ ํด๋์ค ๋ก๋ฉ์ ์คํ๋๋ static{}๋ฅผ ๋ง๋ค์ด ์ ๋๊ฒฝ๋ก๋ฅผ ๋ฐ๊ฟ์ฃผ์static { // this๊ฐ ๋ก๋ฉ๋์๋ ์คํ๋๋ ๋ถ๋ถ try { documentRoot = new File(RequestHandler.class. getProtectionDomain(). getCodeSource(). getLocation(). toURI()). getPath(); documentRoot += "/webapp"; System.out.println("---->" + documentRoot); } catch (URISyntaxException e) { // TODO Auto-generated catch block e.printStackTrace(); } }