maven

 

build management tool for java

프로젝트의 복잡성을 줄일 수 있다.

라이브러리 없이 프로젝트를 진행하는 경우가 없다.

예전 과정

라이브러리 다운

프로젝트에 라이브러리 등록

라이브러리가 변경될 때 / 새로운 프로젝트를 할 때마다 반복

→ 불편함을 해결 하기 위함 : 중앙저장소

maven

cited from

Maven - Maven in 5 Minutes

The POM


pom : Project Object Model - 프로젝트에 대한 설정 정보 ( 밑의 정보들을 관리해 주는 것 ) 
해당 프로젝트를 만든 회사
프로젝트 이름
프로젝트의 버전
프로젝트에서 필요로 하는 의존성 (dependency) - 라이브러리 (ojdbc6.jar) 
pom.xml

The pom.xml file is the core of a project's configuration in Maven. It is a single coniguration file that contains the majority of information required to build a projects

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/67ac35ad-ae71-4eed-a9e2-a1bd51f46bc0/s.png

for java 9 or more

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a9d76965-6d1d-406e-915f-d9d07b99128c/ee.png

What is Maven? Build and dependency management for Java

Maven consists of three components :

The POM : The file that describes a Maven project and its dependencies.

POM ( project object model) file in its root directory. The pom.xml describes the project's dependencies

The directory : The standardized format for describing a Maven project in the POM

Maven institutes a common project structure and offers a standard file format for descibing how it works. You just plug in your requirements , and Maven calls in dependencies and configures the project for you.

Repositories : Where third-party software is stored and discovered.

centralized repositories : Maven uses centralized repositories to both discover and publish project packages as dependencies. When you reference a dependency in your project, Maven will discover it in the centralized repository, download it to a local repository , and install it into your project.

참고 : Path 변수는 운영체제가 파일의 디렉토리를 파악하는데 사용한다.

Path 변수에 디렉토리를 등록하면 해당 디렉토리에 포함된 파일을 파일 경로 없이 파일 이름만으로도 사용이 가능하다 cmd 창에서 java -version 이 나온다. ??

M

댓글