[right click]

1. project > Build Project

  • .class 파일 빌드 경로에 있는 모든 파일을 컴파일하고 .class 파일을 지정한 폴더에 넣습니다.
  • 상단 Project 메뉴에서 Build Automatically 설정하면 빌드경로에서 소스파일을 추가, 삭제 또는 수정 시 자동으로 build 되므로 수동으로 build를 호출할 필요가 없습니다.
  • .class 파일 빌드 경로 : D:\TEST_PROJECT\workspace\test\.classpath

2. server > Publish 

  • 컴파일된 프로젝트 resources를 올바른 위치로 복사하여 Tomcat 인스턴스에 애플리케이션을 배포합니다.
  • 새로 변경된 프로젝트 resources가 해당됨.
  • 서버경로 : Overview (server) > Server Locations > Server path 
  • 배포 경로: Overview (server) > Server Locations > Deploy path 

3. server > Clean...

  • 프로젝트 빌드 경로에 있는 모든 파일을 컴파일하고 Tomcat 인스턴스에 애플리케이션을 재배포합니다.
  • Tomcat 인스턴스가 실행중인 경우 해당 작업을 수행하지 않습니다.

4. server > Clean Tomcat Work Directory...

  • Tomcat 인스턴스 실행중에 jsp 파일명 등 변경 시 수행 가능합니다.
  • 해당 작업을 수행 시 서버에서 jsp 컴파일 후 저장하는 폴더를 clear 하게 됩니다. 기존 작업파일은 서버 경로에서 삭제합니다.

(eclipse > Server(tomcat) 우클릭 시 탭에서 Publish, Clean, Clean Tomcat Work Directory 옵션을 확인할 수 있습니다.)

 

[참고 사이트]

https://stackoverflow.com/questions/5656989/eclipse-difference-between-clean-build-and-publish

 

Eclipse: Difference between clean, build and publish

I am using eclipse with tomcat. On the server (right-click)tab you have the options: Clean, Publish and Clean Tomcat Work directory, What do these options really do and how are they different from

stackoverflow.com

http://wiki.eclipse.org/WTP_Tomcat_FAQ

 

WTP Tomcat FAQ - Eclipsepedia

Contents 1 General 2 Getting Started 3 Information 4 Troubleshooting General What should I know about this FAQ? This FAQ includes frequently asked questions and other useful information about the support for Apache Tomcat servers in WTP 1.5.x, 2.0.x, and 3

wiki.eclipse.org

https://help.eclipse.org/latest/index.jsp?topic=/org.eclipse.wst.server.ui.doc.user/topics/tpublish.html 

 

Help - Eclipse Platform

 

help.eclipse.org

 

728x90

'Eclipse' 카테고리의 다른 글

[Eclipse] 줄 간격 설정 (자동 줄바꿈)  (0) 2020.08.19
[Eclipse] Code Template 등록 및 실행 방법  (0) 2020.08.18

소스코드 입력 후 자동 정렬 [Ctrl + Shift + F] 을 누르면 이클립스에서 자동으로 설정되어 있는 값을 기준으로 줄바꿈을 합니다.

 

이는 오히려 가독성에 문제가 되는 경우가 있어 기본값을 재설정 해주어 문제를 해결할 수 있습니다.

 

[설정방법 목차]

1.Java

2.CSS

3.HTML

4.XML

1.Java

1) Preferences > Java > Code Style > Formatter > New... 클릭

2) Profile name 입력 > OK 클릭

3) Indentation > Tab policy > Spaces only 선택 > Indentation & Tab size 4 선택

4) Line Wrapping > Maximum line width 120 설정

5) OK 클릭

2.CSS

1) Preferences > Web > CSS Files > Editor

2) Formatting > Line width : 120 설정

3) Formatting > Indent using spaces 클릭

4) Formatting > Indentation size : 4 설정

5) Apply and Close 클릭

3.HTML

1) Preferences > Web > HTML Files > Editor

2) Formatting > Line width : 120 설정

3) Formatting > Indent using spaces 클릭

4) Formatting > Indentation size : 4 설정

5) Apply and Close 클릭

4.XML

1) Preferences > XML > XML Files > Editor

2) Formatting > Line width : 120 설정

3) Formatting > Indent using spaces 클릭

4) Formatting > Indentation size : 4 설정

5) Apply and Close 클릭

728x90

'Eclipse' 카테고리의 다른 글

[Eclipse] clean, build, publish 차이점  (0) 2022.08.02
[Eclipse] Code Template 등록 및 실행 방법  (0) 2020.08.18

Eclipse 또는 STS에서 프로그램 소스코드에 프로그래머의 설명 등을 작성할 수 있습니다.

 

이를 주석(Comment)이라고 합니다. 

 

코드 템플릿(Code Templates) 기능을 이용하여 주석을 설정할 수 있습니다.

 

이 글에서는 Class 주석 등록 및 실행 방법에 대해서만 작성하였지만 설정 단위별로 수정 등록하여 사용할 수 있습니다.

 

[Class 주석 등록 및 실행 방법]

1. Window > Preferences > Java > Code Templates > Type 선택

2. [Edit...] 또는 [Import]를 통해 수정합니다. 

3. ['/**' + Enter] 또는 [Shift + Alt + J] 누르면 등록한 주석이 생성됩니다.

 

- ${user}의 경우 OS user name이 적용됩니다. 이를 변경하려면 Eclipse 또는 STS 설치된 경로의 설정 파일에 가서 [.ini] 파일에서 아래와 같이 추가하면 됩니다.

-Duser.name="username"

- [Export...] 기능을 이용하여 Code Template을 [.xml] 형태로 저장하여 다른 이에게 공유할 수 있습니다.

 

 

 

[설정단위]

- Files : 파일에 적용되는 주석 템플릿, Java/Jsp 같은 파일의 맨 위에 생성

- Types : 클래스에 적용되는 주석 템플릿, Class명 바로 위에 생성

- Fields : 필드(변수)에 적용되는 주석 템플릿

- Constructors : 생성자에 적용되는 주석 템플릿

- Methods : 메소드에 적용되는 주석 템플릿

- Overriding Methods : Overriding 되는 메소드에 적용되는 주석 템플릿

- Delegate Methods : Delegate 되는 메서드에 적용되는 주석 템플릿

- Getters : Getter에 적용되는 주석 템플릿

- Setters : Setter에 적용되는 주석 템플릿

 

 

[Import 경우 설정파일 예시]

codetemplates.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<templates><template autoinsert="false" context="typecomment_context" deleted="false" description="Comment for created types" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.typecomment" name="typecomment">
/**
 * @packageName : ${package_name}
 * @fileName    : ${file_name}
 * @author      : ${user}
 * @date        : ${id:date('YYYY.MM.dd')}
 * @description : 
 * ==================================================
 * Date           Author           Note
 * ==================================================
 * ${id:date('YYYY.MM.dd')}     ${user}         Initial creation
 */
 </template></templates>

 

[참고사이트]

점프 투 자바 : 02-2 주석
https://wikidocs.net/260

 

728x90

'Eclipse' 카테고리의 다른 글

[Eclipse] clean, build, publish 차이점  (0) 2022.08.02
[Eclipse] 줄 간격 설정 (자동 줄바꿈)  (0) 2020.08.19

+ Recent posts