jar 파일 경로로 입력
<dependency> <groupId>프로젝트 고유식별/groupId> <artifactId>버전 제외 jar 이름</artifactId> <version>버전</version> <scope>system</scope> <systemPath>자르파일 경로.jar</systemPath> </dependency> |
maven dependency package 포함 빌드
1. maven integration for eclipse wtp 이클립스 마켓 플레이스 설치.
2. pom.xml 에 적어놓은 tomcat 설치
3. run configuration 아래 입력.
dependency package 로입력된 패키지
- goals: clean install
최종으로 pom에 dependency package 로입력된 패키지
- goals : clean install tomcat7:run -X
dependency
<!-- https://mvnrepository.com/artifact/junit/junit --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.13-beta-2</version> <scope>test</scope> </dependency> |
groupId: 프로젝트 속하는 그룹 식별값, 회사, 본부, 단체
artifactId : 프로젝트 결과물의 식별 값, 모듈
version : 결과물의 버전 , 기본값 : 1.0-SNAPSHOT
package : 기본적으로 생성할 페키지, 별도 입력하지 않을 경우 groupId와 동일구조 패키지 생성
scope :
* compile : 기본영역으로 아무것도 지정되지 않은 경우 사용됨. compile 의존관계에 있는 것은 프로젝트의 모든 클래스에서 사용가능함. 또한, 이와 같은 의존관계는 의존관계에 있는 프로젝트에 포함됨.
* provided : compile 과 매우 유사히지만, 실행시 의존관계를 제공하는 JDK나 컨테이너에 대해서 적용됨. 예를 들어, JEE에 대한 웹 어플리케이션을 만드는 경우, 웹 컨테이너가 서블릿 API와 Java EE API관련 클래스들을 제공하기 때문에 provided 영역으로 의존관계가 세팅되어야 함. 이 영역은 컴파일과 테스트의 클래스패스 용으로 사용되며, 자동영역임.
* runtime : 의존관계가 컴파일시 필요하지 않지만, 실행시 필요함을 의미함. 실행시와 테스트 클래스패스에 속하지만, 컴파일 클래스패스에는 속하지 않음.
* test : 일반적인 어플리케이션 사용에 대해서는 의존관계가 필요없고, 테스트 컴파일과 실행 시점에만 사용됨.
* system : 명시적으로 해당 JAR를 포함하는 것이 제공되어야 한다는 것을 제외하고 provided와 유사함. artifact는 항상 사용가능하며 레파지토리에서 검색하지 않음.
* import (Maven 2.0.9 이후에서만 적용) : 이 영역은 <dependencyManagement>에서 pom의 의존관계에 대해서 사용됨. 지정된 POM이 해당 POM의 <dependencyManagement> 영역에 있는 의존관계로 대체됨을 의미함. 이것들이 대체되기 때문에 import 영역의 의존관계들은 실질적으로 의존에 대한 제약에 대해 관여하지 않음.
출처: https://homo-ware.tistory.com/43 [人-ware : Forwards Veritas]
packaging
class < jar < war < ear |
jar : java archive : 하나의 어플리케이션 기능이 가능하도록 java 파일 등을 압축하고 지원
war : web archive : 웹 어플리케이션을 지원하기 위한 압축방식 , jsp, servlet, gif , html, jar등을 압축지원 : default
ear : enterprise archive : 실제 서버에 배포하기 위한 단위
출처: https://creator1022.tistory.com/114 [무한도전]
Configuring Manager
tomcat-users.xml
<role rolename="manager-gui"/> <role rolename="manager-script"/> <role rolename="manager-jmx"/> <role rolename="manager-status"/> <user username="username" password="pass" roles="manager-gui,manager-script,manager-jmx,manager-status"/> |
manager-gui
— HTML 인터페이스 접속권한 : Access to the HTML interface.
manager-status
—Server Status 페이지 접속권한만 : Access to the "Server Status" page only.
manager-script
—text 인터페이스 접속권한, Server Status페이지까지 : Access to the tools-friendly plain text interface that is described in this document, and to the "Server Status" page.
manager-jmx
— JMX proxy 인터페이스 접속권한 : Access to JMX proxy interface and to the "Server Status" page.
admin-gui
- 그래픽 웹 인터페이스 사용 역할 : use this role for the graphical web interface.
admin-script
- 스크립트 웹 인터페이스 사용 역할 : use this role for the scripting web interface.
https://tomcat.apache.org/tomcat-8.0-doc/host-manager-howto.html
https://tomcat.apache.org/tomcat-8.0-doc/manager-howto.html