Maven - New Lecture 강의록
https://www.youtube.com/watch?v=oPEY7xawQlg&list=PLq8wAnVUcTFWRRi_JWLArMND_PnZM6Yja&index=3
1강 : Maven 개념
2강 : Maven 설치 및 환경변수 설정
http://maven.apache.org/download.cgi
Maven – Download Apache Maven
Downloading Apache Maven 3.6.3 Apache Maven 3.6.3 is the latest release and recommended version for all users. The currently selected download mirror is http://mirror.navercorp.com/apache/. If you encounter a problem with this mirror, please select another
maven.apache.org
3강: Maven 형성
mvn archetype:generate -DgroupId=com.newlecture -DartifactId=javaprj -DarchetypeArtifactId=maven-archetype-quickstart
<properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties>
프로젝트로 옮겨서 컴파일 해 줘야 해!
mvn compile
mvn package
java -cp target\javaprj-1.0-SNAPSHOT.jar com.newlecture.App
-cp : class path
.
5강 :
mvn compile
mvn test
mvn package
Phase : 단계 (예 : compile, test, package ... )
Plug-in : 단계에 해당하는 프로그램이 매핑돼 있어.
Goal : Plug-in의 작은 단계를 밟고 있는 것
mvn help:describe -Dcmd=compile
http://maven.apache.org/plugins/index.html
Maven – Available Plugins
Available Plugins Maven is - at its heart - a plugin execution framework; all work is done by plugins. Looking for a specific goal to execute? This page lists the core plugins and others. There are the build and the reporting plugins: Build plugins will be
maven.apache.org
6강 : IDE에서 Maven 프로젝트 Import 하기.
http://a.zany.kr:9003/board/bView.asp?bCode=52299899&aCode=13729
[인프라] 아티팩트 저장소(artifact repository)
[아티팩트: artifact] 아티팩트(artifact)는 소프트웨어 개발 프로젝트를 진행하면서 생성하는 다양한 산출물을 의미한다. 각종 설계문서, 유스 케이스, UML 다이어그램, 소스코드, 소스를 빌드해서 생
12bme.tistory.com
https://groups.google.com/forum/#!topic/ksug/EBk0FYsINJ8
Google 그룹스
groups.google.com
메이븐을 넥서스와 연동해서 사용하는 이유
7강 :
pom.xml을 바꾸면 항상 해당 프로젝트를 Maven > Update Project 해 주자.
대표사진 삭제
사진 설명을 입력하세요.
근데 이거 한뒤로.. Maven이 사라졌다..
Maven 을 이용한 프로젝트 생성 및 활용
Maven 소개 메이븐은 프로젝트 구조와 내용을 기술하는 선언적 접근방식의 오픈소스 빌드 툴 입니다. 컴파일과 동시에 빌드를 수행할 수 있으며 테스트를 병행하거나 서버측 디플로이 자원을 관�
unabated.tistory.com
// pom.xml 중 일부..
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
플러그인 3.6 버전부터는 아래의 문법이 지원된다.
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
8강 : Java에서 Web으로 프로젝트 변경. by POM
Jar => war로 변경, Update Maven
그럼 위와 같이 디렉터리 구조가 바뀐다. 이때 POM이 에러난다.
webapp에 WEB-INF를 만든 담에 톰캣의 web.xml을 복붙하자 (아래 경로)
{...}\apache-tomcat-8.5.57\webapps\ROOT\WEB-INF
index.html 파일을 만든 후 Run을 하자 ( 아파치 톰캣 설정)
9강 :
jsp 파일을 만들게 되면 위와 같이 Servlet을 내포한 라이브러리가 없기 때문에 오류가 난다.
플젝 우클릭 그리고
빌드 패스 들어간다.
위와 같이 추가한다.
톰캣을 lib에 추가한단 건.. 톰캣자체가 라이브러리는 아니고 톰캣 하위폴더에 lib가 있는데 그곳에
톰캣을 운영하는데 필요한 servlet, jsp 관련 된게 다 있다.
근데 문제는 이렇게 지정하면.. 물리적인 경로라서 집과 회사가 다를 수 있어.. 이렇게 말고..
dependeny는 의존성, 부품이야. 라이브러리야.
Remote Repository에서 Local로 가져오자.
대게 이곳에 저장된다. ${user.home}/.m2/repository
mvn repository 사이트에서
tomcat jsp 검색
<!-- https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-jsp-api -->
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jsp-api</artifactId>
<version>8.5.57</version>
</dependency>
위의 정보 복사, pom에 넣기