- build 도구로 maven을 사용해 프로젝트 build시 이용되는 3가지 기능
- maven으로 build시 2개의 주요한 폴더(target,m2e-wtp)가 생성된다.
- target 폴더: 컴파일된 프로젝트 코드와 프로젝트 구동 시 필요한 자원들을 포함하는 폴더
- m2e-wtp 폴더: 이클립스와 maven을 연동하는 설정파일들을 포함하는 폴더. 설정파일들은 웹 프로젝트 파일의 위치, context root, deployment descriptor(배포서술자) 등을 명시한다.(**참조: https://www.eclipse.org/m2e-wtp/)
1. clean: repository 내 target 폴더를 삭제하면서, maven과 관련된 모든 자원들을 삭제하는 명령어
2. build: 외부에서 프로젝트를 사용할 수 있도록 프로젝트와 관련된 자원과 소스코드들을 컴파일하여 압축된 형태로 만들어 주는 명령어. build 실행 시 targe 폴더 내에 war 또는 jar 형태로 배포가능한 파일들이 생성되어 프로젝트 소스코드가 필요한 다른 곳에서도 이용할 수 있게된다.
3. install: 메이븐의 전반적인 생명주기에 관여하는 명령어. 메이븐을 이용한 빌드시 pom.xml에 dependncy로 작성된 자원들이 모두 성공적으로 resolve 되어야 빌드가 이루어지게 된다. install 명령어는 dependency에 설정된 파일들을 다운로드 받아서 target 폴더와 local Repository(artifact 형태)에 저장시켜 프로젝트에서 관련 자원을 이용할 수 있게 해준다.
**참조
1. maven install이란?
https://stackoverflow.com/questions/10533828/what-does-mvn-install-in-maven-exactly-do
What does mvn install in maven exactly do
I just started using Maven and I was told to do mvn install in a specific directory. What does mvn install do, exactly? I think it looks for pom.xml in the current folder and starts following the
stackoverflow.com
2. maven install과 build의 차이
What is the difference between "Maven Install" and "Maven Build" with M2Eclipse?
I tried to search about the differences between maven install and maven build in the eclipse m2e plugin (if you right click the project and click "run as", you will see them), and I still cannot fi...
stackoverflow.com
'기타' 카테고리의 다른 글
소스코드 실행과 동작과정 (0) | 2024.04.11 |
---|---|
[Artifact와 SnapShot이란?] (0) | 2023.09.10 |
[에러] style z-index 에러 (0) | 2023.09.06 |
[에러] docker 컨테이너 실행 시 바로 Exit 되는 경우 (0) | 2023.08.30 |
[코딩 컨벤션]가이드 사이트 모음 (0) | 2023.08.29 |