이 나왔다.  이전 버전들을 모두 포함하고 있다.

 

자세한 설치 관련 내용은 다음의 링크를

http://www-01.ibm.com/support/docview.wss?rs=3352&context=SSDV2W&context=SSCZQKL&context=SSSTY3&dc=D400&uid=swg24023138&loc=en_US&cs=UTF-8&lang=en

 

Unix나 Linux에서 GUI 환경으로 설치하기 어려울 때,

      b. For a silent install, open a command prompt to the extracted directory.  For example, C:\temp.  Run the command:
        Windows: installc --launcher.ini silent-install.ini
        Linux and UNIX systems: ./install --launcher.ini silent-install.ini

 

 

이렇게 인스톨된 IM으로 설치하려는 제품 자체도 silent 인스톨 하고 싶을 때.

• Record a response file and install the product:
IBMIM -record <response file path and name> -log <log file path and name>
• Record a response file without installing the product:
IBMIM -record <response file path and name> -log <log file path and name> -skipInstall <agentDataLocation>

 를 이용하여 record파일(xml)을 만들어 낸다.

 

이 record파일을 이용하여, 다음의 명령으로 실제로 설치를 할 수 있다.

IBMIM --launcher.ini silent-install.ini -input <response file path and name> -log <log file path and name>

이 글은 스프링노트에서 작성되었습니다.

Posted by 아프락사스

그동안 JUnit 테스트를 이용하면서, 가장 힘들었던 부분 중에 하나는 테스트 데이터를 하드코딩해야 하고, 여러 값을 세팅하기 어렵다는 것이었다.

RAD 6.X에서는 컴포넌트 테스트라는 기능을 제공하여, 이 부분을 커버해 주고 있었는데, 7.0으로 넘어오면서 TPTP기반의 테스트로 바뀌면서

그 기능이 도움말에서 아주 찾기 어려웠으며, 사용하기 어려웠는데,

7.5에서 다시 찾아보니, 다시 그럭저럭 쓸만하게 바뀌었다. 아마도 Ganemede의 힘이 아닐까 싶다. (한편으로는 좀 아쉽긴 하지만)

 

RSA 도움말의 내용이지만, 꼭 따라해 볼 만 할 것 같아서, 캡처해 봤다.

 

JUnit 테스트에서 데이터풀 액세스


목표:

Eclipse TPTP(Test and Performance Tools Platform)를 사용하여 예제 테스트 애플리케이션에서 데이터풀을 작성하고 액세스합니다.

필요한 시간

1시간

시작하기 전에

이 학습을 시작하기 전에 다음을 수행해야 합니다.

  1. Eclipse와 Eclipse TPTP(Test and Performance Tools Platform)를 설치하십시오.
  2. JUnit 테스트에 대한 기본 정보를 습득하십시오. JUnit 테스트에 대한 자세한 정보는 www.junit.org를 참조하십시오.
  3. 현재 TPTP 버전에 맞는 Agent Controller를 구성하고 실행하십시오. 자세한 정보는 Agent Controller 시작하기를 참조하십시오.


설명

이 학습에서는 MyShoppingCart 애플리케이션을 작성하고 테스트합니다. Eclipse TPTP(Test and Performance Tools Platform)를 사용하면 JUnit 테스트를 개발하고, 테스트 환경에 데이터를 제공하는 데이터풀을 작성할 수 있습니다.

이 학습에서는 다음 프로시저를 안내합니다.

  1. 샘플 사용자 애플리케이션 작성
  2. TPTP 테스트 스위트 설정
  3. 데이터풀 작성 및 테스트 데이터 초기화
  4. 데이터풀을 참조할 테스트 케이스 수정

샘플 사용자 애플리케이션 작성


이 프로시저에서는 MyShoppingCart 클래스를 개발하고 다음 프로시저에서는 Eclipse TPTP(Test and Performance Tools Platform)를 사용하여 해당 테스트 환경을 개발합니다.
  1. 새 Eclipse 자바 프로젝트를 작성하십시오.
    • 파일 메뉴에서 파일 > 새로 작성 > 프로젝트...를 선택하십시오. 새 프로젝트 대화 상자가 나타납니다.
    • 마법사 목록에서 자바 프로젝트를 선택하고 다음을 클릭하십시오. 자바 프로젝트 작성 페이지가 나타납니다.
    • 프로젝트 이름에 datapoolExample을 입력하고 완료를 클릭하십시오. 네비게이터 보기에 datapoolExample 프로젝트가 나타납니다.
  2. MyShoppingCart 클래스를 작성하십시오.
    • 네비게이터 보기에서 datapoolExample 프로젝트를 마우스 오른쪽 단추로 클릭하고 새로 작성 > 클래스를 선택하십시오. 새 자바 클래스 대화 상자가 나타납니다.
    • 이름 필드에 MyShoppingCart를 입력하십시오.
    • Main 메소드 public static void main(String[] args)를 작성하는 옵션을 지우십시오.
    • 완료를 클릭하십시오. 자바 편집기에 MyShoppingCart.java 파일이 나타납니다.
    • MyShoppingCart 소스에 다음을 입력하십시오.
      import java.util.Hashtable;
      
      public class MyShoppingCart {
      
              public Hashtable myFlowers;
              
              public MyShoppingCart() {
                  
                      myFlowers = new Hashtable();
                      myFlowers.put("Orchid", new Double(5.99));
                      myFlowers.put("Tulip", new Double(1.99));
                      myFlowers.put("Yellow Carnation", new Double(6.99));
                      myFlowers.put("White Rose", new Double(9.99));
                      myFlowers.put("Geraniums", new Double(4.99));           
              }
              
              public double itemCost(String itemName, int itemQuantity)
              {
                   Double price = (Double)myFlowers.get(itemName);
                      
                   if (price != null) {
                       return price.doubleValue()*itemQuantity;
                   }
                   
                   return -1;                                                 
              }
      }
      
    • MyShoppingCart.java를 저장하십시오. 파일 메뉴에서 파일 > 저장을 선택하십시오.

TPTP 테스트 스위트 설정


이 프로시저에서는 MyShoppingCart 클래스의 테스트 스위트를 개발합니다. Eclipse TPTP(Test and Performance Tools Platform)를 사용하여 itemCost 메소드의 JUnit 테스트를 개발합니다.
  1. 테스트 Perspective를 여십시오.
    • 파일 메뉴에서 창 > Perspective 열기 > 기타를 선택하십시오.
    • 테스트를 선택하고 확인을 클릭하십시오. 테스트 네비게이터가 나타납니다.
  2. 새 TPTP JUnit 테스트를 작성하십시오.
    • 테스트 네비게이터에서 datapoolExample 프로젝트를 마우스 오른쪽 단추로 클릭하고 새로 작성 > 요소 테스트...를 선택하십시오.
    • 요소 테스트 대화 상자에서 TPTP JUnit 테스트를 선택하고 다음을 클릭하십시오. 새 테스트 케이스 대화 상자가 나타나며 JUnit 라이브러리를 추가하도록 프롬프트합니다. JUnit 라이브러리를 추가하려면 예를 클릭하십시오.
    • 새 JUnit 테스트 소스 코드 페이지의 이름 필드에 MyShoppingCartTest를 입력하십시오. 테스트 동작 편집 방법 선택 섹션에서 테스트 편집기에서 편집 옵션(기본값)을 선택하십시오.
    • 완료를 클릭하십시오. TPTP JUnit 테스트 편집기가 나타나며 MyShoppingCartTest 테스트 스위트가 표시됩니다. 개요 탭에는 테스트 설명, 소스 정보 및 테스트 메소드 목록이 포함됩니다. 현재 정의된 테스트 메소드가 없습니다. 이 학습의 경우, TPTP JUnit 테스트 편집기는 메소드 스텁을 생성하므로 소스 정보 섹션의 테스트 동작을 코드로 구현 옵션은 지워져야 합니다. 자세한 정보는 JUnit 테스트 스위트 편집기를 참조하십시오.
  3. testItemCost 및 testMyShoppingCartConstructor 메소드를 추가하십시오.
    • 테스트 메소드 탭에서 추가를 클릭하십시오. 테스트의 기본 이름이 나타납니다.
    • testItemCost 메소드를 추가하십시오. 이름 필드에 새 테스트 이름의 testItemCost를 입력하십시오. 설명 필드에 Test for the MyShoppingCart.itemCost(String, int) method를 입력하십시오.
    • testMyShoppingCartConstructor 메소드를 추가하십시오. 테스트 메소드 탭에서 추가를 클릭하십시오. 이름 필드에 새 테스트 이름의 testMyShoppingCartConstructor를 입력하십시오. 설명 필드에 Test for the MyShoppingCart constructor를 입력하십시오.
  4. 테스트 실행 동작을 구성하십시오.
    • 테스트 실행 루프를 추가하십시오. 동작 탭에서 추가.. > 루프를 클릭하십시오. 이름 필드에 Loop_MyShoppingCart를 입력하십시오. 반복 횟수 필드에 1(기본값)을 입력하십시오.
    • testMyShoppingCartConstructor 호출을 추가하십시오. Loop_MyShoppingCart를 선택하고 추가... > 호출을 클릭하십시오. 테스트 호출 대화 상자가 나타납니다. testMyShoppingCartConstructor를 선택하고 확인을 클릭하십시오.
    • testItemCost 호출을 추가하십시오. Loop_MyShoppingCart를 선택하고 추가... > 호출을 클릭하십시오. 테스트 호출 대화 상자가 나타납니다. testItemCost를 선택하고 확인을 클릭하십시오.
    • 테스트 스위트를 저장하십시오. 파일 메뉴에서 파일 > 저장을 선택하십시오.

      참고: 저장 명령을 실행하면 TPTP JUnit 테스트 편집기가 MyShoppingCartTest.java에 테스트 메소드 스텁을 작성합니다.
  5. 생성된 JUnit 테스트 메소드 testMyShoppingCartConstructor 및 testItemCost의 코드를 입력하십시오.
    • 자바 Perspective를 여십시오. 파일 메뉴에서 창 > Perspective 열기 > 기타... > 자바를 선택하십시오.
    • MyShoppingCartTest.java를 여십시오. 네비게이터에서 datapoolExample 프로젝트 폴더를 열고 MyShoppingCartTest.java를 두 번 클릭하십시오. 테스트 스위트를 설정하고 실행하는 코드와 testMyShoppingCartConstructor 및 testItemCost의 스텁 메소드와 함께 MyShoppingCartTest.java 컨텐츠가 자바 편집기에 나타납니다.
    • testMyShoppingCartConstructor 메소드에 대한 다음 코드를 입력하십시오.
      public void testMyShoppingCartConstructor()
      throws Exception
      {
              MyShoppingCart cart = new MyShoppingCart();
              Double priceOrchid = (Double)cart.myFlowers.get("Orchid");
              Double priceTulip = (Double)cart.myFlowers.get("Tulip");
              
              assertTrue(priceOrchid.doubleValue() == 5.99);
              assertTrue(priceTulip.doubleValue() == 1.99);
      }
      
    • testItemCost 메소드에 대한 다음 코드를 입력하십시오.
      public void testItemCost()
      throws Exception
      {
              MyShoppingCart cart = new MyShoppingCart();
              double priceForTwo = cart.itemCost("Orchid", 2);
              
              assertTrue(priceForTwo == 11.98);
      }
      
    • MyShoppingCartTest.java를 저장하십시오. 파일 메뉴에서 파일 > 저장을 선택하십시오.
  6. 테스트 Perspective를 열고 테스트 배치를 작성하십시오. 예를 들어, 테스트 배치 작성을 참조하십시오.
  7. 사용자 정의 배치를 사용하여 테스트를 실행하십시오.
    • 테스트 네비게이터에서 MyShoppingCartTest 테스트 스위트를 마우스 오른쪽 단추로 클릭하고 실행 도구 > 실행...을 선택하십시오. 실행 구성 대화 상자가 나타납니다.
    • 구성 분할창에서 테스트를 선택한 후 새로 작성을 클릭하십시오.
    • 실행 구성의 왼쪽 분할창에서(실행할 테스트 선택) datapoolExample을 펼치고 MyShoppingCartTest 테스트 스위트를 선택하십시오.
    • 실행 구성의 오른쪽 분할창에서 섹션을 작성한 배치를 선택하십시오.
    • 테스트 로그 탭에서 기본값 사용 옵션을 지우고 위치에 대한 datapoolExample 프로젝트 폴더를 선택하십시오.
    • 실행을 클릭하여 테스트를 실행하십시오.
  8. 테스트 네비게이터에 나타나는 MyShoppingCartTest 테스트 로그를 두 번 클릭하십시오. MyShoppingCartTest 테스트 로그가 나타납니다. 테스트 세부사항을 보려면 이벤트 탭을 선택하십시오. 테스트 스위트 시작, Loop_MyShoppingCart 시작, 테스트 시작, 테스트 판정, 테스트 중지, 두 번째 테스트 시작, 두 번째 테스트 판정, 두 번째 테스트 중지, 루프 중지, 테스트 스위트 판정 및 테스트 스위트 중지와 같은 이벤트가 표시되어야 합니다.

데이터풀 작성 및 테스트 데이터 초기화


이 프로시저에서는 테스트 데이터를 저장할 단순 데이터풀을 작성합니다. 데이터풀 편집기를 사용하여 변수(열), 레코드(행) 및 등가 클래스(관련 레코드 그룹)와 같은 데이터풀의 구조 요소를 정의합니다.
  1. 테스트 데이터를 포함하여 CSV(쉼표로 분리) 파일을 작성하십시오. 일반적으로 스프레드시트 애플리케이션 또는 데이터베이스의 데이터를 CSV 형식으로 내보낼 수 있습니다. 그러나 이 학습에서는 텍스트 편집기에 데이터를 입력합니다.
    • 텍스트 편집기에서 다음을 입력하십시오.
      ,ModelNumber::String,Description::String,Price::Double
      flowers,F0001,Orchid,5.99
      flowers,F0002,Tulip,1.99
      flowers,F0003,Yellow Carnation,6.99
      flowers,F0004,White Rose,9.99
      flowers,F0005,Geraniums,4.99
      
    • 임시 외부 위치에 파일을 flowerData.csv로 저장하십시오.
  2. Eclipse에서 테스트 Perspective를 여십시오.
    • 파일 메뉴에서 창 > Perspective 열기 > 기타를 선택하십시오.
    • 테스트를 선택하고 확인을 클릭하십시오. 테스트 네비게이터가 나타납니다.
  3. 테스트 네비게이터에서 프로젝트를 마우스 오른쪽 단추로 클릭하고 새로 작성 > 테스트 요소...를 선택하십시오. 새 테스트 요소 대화 상자가 나타납니다.
  4. 마법사 목록 상자에서 테스트 자산 폴더를 펼치고 데이터풀을 선택하십시오.
  5. 다음을 클릭하십시오. 새 데이터풀 대화 상자가 나타납니다.
  6. 데이터풀 프로젝트 폴더 및 데이터풀 이름을 선택하십시오. 기존 프로젝트 목록에서 datapoolExample 프로젝트를 선택하십시오. 이름 필드에 shoppingCartDatapool을 입력하십시오. 계속하려면 다음을 클릭하고 CSV(쉼표로 분리) 파일 가져오기 페이지를 열려면 다음을 다시 클릭하십시오.
  7. CSV 파일 flowerData.csv를 가져오십시오.
    • CSV 파일 필드에서 찾아보기를 클릭하여 flowerData.csv를 탐색하십시오.
    • 첫 번째 행에 변수 이름 및 제안 유형 포함 옵션을 선택하십시오. flowerData.csv의 첫 번째 행에는 열 표제와 유형이 포함됩니다.
    • 첫 번째 열에 등가 클래스 이름 포함 옵션을 선택하십시오. 등가 클래스는 관련 데이터의 그룹입니다. flowerData.csv의 첫 번째 열은 flowers라는 단일 등가 클래스를 지정합니다.
  8. 완료를 클릭하십시오. 초기 데이터풀 크기를 지정한 경우, 대화 상자가 나타납니다. 이 크기는 CSV 파일 크기와 충돌할 수 있습니다. CSV 파일의 크기를 사용하려면 예를 클릭하십시오. 지정된 초기 크기를 사용하려면(CSV 파일 데이터를 자를 수 있음) 아니오를 클릭하십시오.flowers 등가 클래스에 포함된 데이터를 표시하는 데이터풀 편집기가 나타납니다.

    데이터풀 작성에 대한 자세한 정보는 데이터풀 작성을 참조하십시오.


데이터풀을 참조할 테스트 케이스 수정


이 프로시저에서는 데이터풀 API를 사용하여 하드코딩된 테스트 값을 데이터풀 열에 대한 참조로 바꿉니다.

데이터풀 API에서 필요한 라이브러리 추가

데이터풀 API에는 다양한 TPTP 및 EMF(Eclipse Modeling Framework) 라이브러리가 필요합니다. 이 프로시저에서는 이러한 라이브러리를 자바 빌드 경로에 추가합니다.
  1. 자바 Perspective를 여십시오. 파일 메뉴에서 창 > Perspective 열기 > 자바를 선택하십시오.
  2. datapoolExample 프로젝트 특성을 여십시오. 네비게이터 또는 패키지 탐색기 창에서 datapoolExample 프로젝트 폴더를 마우스 오른쪽 단추로 클릭하고 특성을 선택하십시오. datapoolExample 특성 대화 상자가 나타납니다.
  3. tptp-models.jar를 자바 빌드 경로에 추가하십시오.
    • 왼쪽 분할창에서 자바 빌드 경로를 선택하십시오.
    • 오른쪽 분할창에서 라이브러리 탭을 선택하고 변수 추가...를 클릭하십시오. 새 변수 클래스 경로 입력 대화 상자가 나타납니다.
    • ECLIPSE_HOME 변수를 선택하고 확장...을 클릭하십시오. 변수 확장 대화 상자가 나타납니다. plugins > org.eclipse.tptp.platform.models_Version 폴더를 열고 tptp-models.jar을 선택하십시오. 여기서, Version은 TPTP 버전 번호입니다.
    • 확인을 클릭하여 라이브러리를 추가하십시오.
  4. org.eclipse.emf.common_Version.jar를 자바 빌드 경로에 추가하십시오. 여기서, Version은 EMF 버전입니다.
    • 새 변수 클래스 경로 입력 대화 상자에서 ECLIPSE_HOME 변수를 선택하고 확장...을 클릭하십시오.
    • 플러그인 폴더를 열고 org.eclipse.emf.common_Version.jar를 선택하십시오. 여기서 Version은 EMF 버전입니다.
    • 확인을 클릭하여 라이브러리를 추가하십시오.
  5. org.eclipse.emf.ecore_Version.jar를 자바 빌드 경로에 추가하십시오. 여기서, Version은 EMF 버전입니다.
    • 새 변수 클래스 경로 입력 대화 상자에서 ECLIPSE_HOME 변수를 선택하고 확장...을 클릭하십시오.
    • 플러그인 폴더를 열고 org.eclipse.emf.ecore_Version.jar를 선택하십시오. 여기서 Version은 EMF 버전입니다.
    • 확인을 클릭하여 라이브러리를 추가하십시오.
  6. org.eclipse.core.runtime_Version.jar를 자바 빌드 경로에 추가하십시오. 여기서, Version은 Eclipse 플랫폼 버전입니다.
    • 새 변수 클래스 경로 입력 대화 상자에서 ECLIPSE_HOME 변수를 선택하고 확장...을 클릭하십시오.
    • 플러그인 폴더를 열고 org.eclipse.core.runtime_Version.jar를 선택하십시오. 여기서 Version은 Eclipse 플랫폼 버전입니다.
    • 확인을 클릭하여 라이브러리를 추가하십시오.
  7. 확인을 클릭하여 특성 대화 상자를 닫으십시오.


데이터풀 API 사용

이 프로시저에서는 shoppingCartDatapool을 활용하도록 MyShoppingCartTest 클래스 및 testMyShoppingCartConstructor 메소드를 수정합니다.
  1. 필요한 경우 자바 Perspective를 여십시오. 파일 메뉴에서 창 > Perspective 열기 > 자바를 선택하십시오.
  2. MyShoppingCartTest.java를 여십시오. 네비게이터에서 datapoolExample 프로젝트 폴더를 열고 MyShoppingCartTest.java를 두 번 클릭하십시오. MyShoppingCartTest.java 컨텐츠가 자바 편집기에 나타납니다.
  3. MyShoppingCartTest 클래스에 다음 import 문을 추가하십시오.
    import org.eclipse.hyades.execution.runtime.datapool.IDatapool;
    import org.eclipse.hyades.execution.runtime.datapool.IDatapoolFactory;
    import org.eclipse.hyades.execution.runtime.datapool.IDatapoolIterator;
    import org.eclipse.hyades.models.common.datapool.impl.Common_DatapoolFactoryImpl;
    
  4. IDatapoolIterator 클래스 인스턴스를 선언하십시오. 이 클래스 인스턴스는 설정 코드에서 초기화되어 테스트 메소드에서 사용됩니다.
    public class MyShoppingCartTest extends HyadesTestCase {
            
            IDatapoolIterator dpIterator;
            
            //...
    
  5. setUp 메소드를 수정하여 데이터풀을 초기화하십시오. TPTP JUnit 테스트 환경의 경우 setUp 메소드는 공통 고정 기능을 제공합니다. setUp 메소드를 사용하면 공통 테스트 변수를 초기화할 수 있습니다. 참고: java.io.File 생성자의 <workspace>에 완전한 작업공간 경로를 지정하십시오.
    protected void setUp() throws Exception {
            // Initialize the datapool factory
            IDatapoolFactory dpFactory = new Common_DatapoolFactoryImpl();
                    
            // Load the shoppingCartDatapool datapool 
            IDatapool datapool = dpFactory.load(
                            new java.io.File("<workspace>\\datapoolExample\\shoppingCartDatapool.datapool"),
                            false);
                       
            // Create an iterator to traverse the datapool
            dpIterator = dpFactory.open(datapool,"org.eclipse.hyades.datapool.iterator.DatapoolIteratorSequentialPrivate");
            
            // Initialize the datapool to traverse the first equivalence class.
            dpIterator.dpInitialize(datapool,0);
    }
    
    참고:
    • IDatapoolFactory 로드 메소드의 두 번째 매개변수는 데이터풀 인스턴스를 공유하는지 여부를 나타냅니다. true인 경우 데이터풀 캐시에서 데이터풀의 기존 사본을 확인합니다. false인 경우 데이터풀은 개인용 인스턴스입니다. 공유 데이터풀 인스턴스를 수정하면 다른 사용자에게 영향을 줄 수 있으므로 제한된 환경에만 권장됩니다.
    • 데이터풀을 프로그램적으로 편집하려면 org.eclipse.hyades.edit.datapool을 가져오십시오.
    • IDatapoolFactory open 메소드의 두 번째 매개변수는 반복기 유형을 나타냅니다. 공유 데이터풀에는 DatapoolIteratorSequentialPrivate를 사용하십시오.
  6. testMyShoppingCartConstructor 메소드를 수정하여 shoppingCartDatapool을 활용하십시오.
    public void testMyShoppingCartConstructor()
    throws Exception
    {
            MyShoppingCart cart = new MyShoppingCart();
                    
            // Traverse through datapool...
            // Test if constructor initializes each flower record appropriately
            while(!dpIterator.dpDone())
            {
                    String Description = dpIterator.dpCurrent().getCell("Description").getStringValue();
                    double datapoolPrice = dpIterator.dpCurrent().getCell("Price").getDoubleValue();
                    
                    // Test if the flower is accounted for in the application
                    Double applicationPrice;
                    assertNotNull(applicationPrice = (Double)cart.myFlowers.get(Description));
                    
                    // Test that the application price equals the price in the datapool 
                    assertTrue(applicationPrice.doubleValue() == datapoolPrice);
                    
                    dpIterator.dpNext();
            }
    }
    
  7. MyShoppingCartTest.java를 저장하십시오. 파일 메뉴에서 파일 > 저장을 선택하십시오.
  8. testArtifact에 데이터풀을 추가하십시오.
    • 테스트 Perspective를 여십시오. 테스트 네비게이터에서 testDeployment를 두 번 클릭하여 편집기에서 여십시오.
    • 쌍 탭에서 testAsset을 선택하고 열기...를 클릭하십시오.
    • 테스트 자산 탭에서 추가...를 클릭하십시오. 데이터풀을 선택하고 확인을 클릭하십시오. 자산을 저장하십시오.
  9. 사용자 정의 배치를 사용하여 테스트를 실행하십시오.
    • 테스트 Perspective를 여십시오. 테스트 네비게이터에서 MyShoppingCartTest 테스트 스위트를 마우스 오른쪽 단추로 클릭하고 실행 도구 > 실행...을 선택하십시오. 실행 구성 대화 상자가 나타납니다.
    • 실행 구성의 왼쪽 분할창에서 MyShoppingCartTest 테스트 스위트를 선택하십시오.
    • 실행 구성의 오른쪽 분할창에서, 시작하기 전에 섹션에서 작성한 배치를 선택하십시오.
    • 테스트 로그 탭에서 기본값 사용 옵션을 지우고 위치에 대한 datapoolExample 프로젝트 폴더를 선택하십시오.
    • 실행을 클릭하여 테스트를 실행하십시오.
    참고:
    • 선택한 배치에 암호화된 데이터풀이 포함되어 있는 경우 테스트를 실행한 후 배치에 포함되어 있는 암호화된 각 데이터풀의 비밀번호가 필요한 대화 상자가 표시됩니다.
  10. 테스트 네비게이터에 나타나는 새 MyShoppingCartTest 테스트 로그를 두 번 클릭하십시오. MyShoppingCartTest 테스트 로그가 나타납니다. 테스트 결과 세부사항을 보려면 이벤트 탭을 선택하십시오.

이 글은 스프링노트에서 작성되었습니다.

Posted by 아프락사스

 

아.. 생각보다.. 좀 복잡하다.

 

기본적으로 eclipse 3.2.1이 되어야 한다. 3.2는 안된다.

http://www-01.ibm.com/support/docview.wss?rs=0&q1=eclipse+3.2&uid=swg21254410&loc=en_US&cs=utf-8&cc=us〈=en

 

게다가 RSA 7.0.0.5,6 patch를 적용하면서, 3.2.2에도 문제가 생긴다. 

http://www-01.ibm.com/support/docview.wss?rs=0&q1=eclipse+3.2&uid=swg21290393&loc=en_US&cs=utf-8&cc=us〈=en

 

이것참.. 너무 eclipse 버전에 민감하다.

 

뭐.. 다 알겠지만, .7.0.0.X 버전들은 eclipse 3.3을 지원안한다.

 

RSD 7.0.5.X는 eclipse 3.3기반이다.

 

RSA 7.5는 eclipse 3.4기반...

이 글은 스프링노트에서 작성되었습니다.

Posted by 아프락사스

요즘, 소스로부터 Model을 만들어 내는 Reverse Engineering 작업을 EMFT, RMP 등을 이용해서 구현하고 있는데..

 

고객이 기존 모델과의 Compare도 자동으로 해달란다..

 

그래서 찾다보니.. 다음과 같은.. 아티클이 있네용.

 

Compare and Merge Framework를 확장하는 예제 관련 자료

http://www.ibm.com/developerworks/rational/library/08/0722_balaba-liaskovski/index.html

이 글은 스프링노트에서 작성되었습니다.

Posted by 아프락사스

오류를 만나면

 

http://www-01.ibm.com/support/docview.wss?rs=3045&context=SSSRXA&dc=DB520&uid=swg21255417&loc=en_US&cs=UTF-8&lang=en&rss=ct3045db2

 

여기를 참조하시라..

 

1년전에 찾았던 것 같은데, 까먹어서 다시 적어둔다..

이 글은 스프링노트에서 작성되었습니다.

Posted by 아프락사스

RAD/RSA에서 사용할 때,

 

WebLogic의 내장 Sample 어플리케이션들은 모두 ant build 파일들을 가지고 있다.

그래서, 이 build 파일을 이용하면, 컴파일, 패키징 심지어, WebLogic에 Deploy까지 자동으로 해 준다.

 

command line에서 이를 실행하자면

ant -lib c:\bea\wlserver_10.0\server\lib\weblogic.jar

이런식으로 weblogic.jar를 라이브러리로 불러줘야 한다.

 

그럼, 이 sample들을 RAD/RSA로 import해서 RAD/RSA의 ant runner를 이용하여, 실행하자면,

AntRun.JPG

위의 그림처럼,

 1) ANT_HOME을 WebLogic 내장 ant로 바꿔야 하고.

 2) 외부 JAR 추가를 통해, weblogic.jar를 CLASSPATH에 넣어 ㅈ

 

 

이 글은 스프링노트에서 작성되었습니다.

Posted by 아프락사스

 

이 글은 스프링노트에서 작성되었습니다.

Posted by 아프락사스

 

Managing WebSphere Portal V5.1 projects with Apache Maven and Rational Application Developer 6.0

developerWorks
Document options
'); //--> '); //-->
Set printer orientation to landscape mode

Print this page

Set printer orientation to landscape mode

Print this page

Set printer orientation to landscape mode

Print this page

Email this page

E-mail this page

Email this page

E-mail this page

Email this page

E-mail this page

Sample code

Document options requiring JavaScript are not displayed

Using XML, but need to do more?

Download DB2 Express-C 9

-->
Rate this page

Help us improve this content

Level: Intermediate

Hinrich Boog (hboog@de.ibm.com), IT Specialist, IBM

30 Mar 2005

See how to set up a portal project infrastructure in IBM® Rational® Application Developer that can be used to perform daily builds using Apache Maven. You walk through a complete example which covers the primary aspects of the build and deployment process. You see how to extract source from a version control system, build the source, deploy the resulting artifacts on IBM WebSphere® Portal Server V5.1, and generate reports about the process.
"); } } } //-->

Introduction

The build process for large portal projects is a very important and, often, underestimated task. Typical build process tasks include:

  • Checking out components from a repository
  • Compiling source code
  • Replacing properties
  • Automating testing
  • Deploying components

The complexity of the deployment tasks increases as the number of subprojects in a project increases, and businesses often use Apache Ant as the tool of choice for automating these tasks. However, creating deployment tasks with Ant is more difficult when working with many deployment units. Even though the basic usage of Ant is very simple, issues such as the following can cause problems in larger J2EE projects that involve deploying large numbers of artifacts.

  1. The build and deployment scripts get very complex over time, as new functionality is added.
  2. Many similar tasks must be scripted separately because Ant lacks support for loops, inheritance, and conditional processing; therefore, build code is duplicated and is sometimes redundant.
  3. The gap between daily or nightly build tasks and developer tasks for unit testing widens as complexity and customization is added. Sometimes it is not possible to build artifacts without doing a full build. For example, a central build script provides properties for subprojects. The subprojects, however, might not build stand-alone, because they are not aware of the properties that are provided during a full build.
  4. Last but not least, deployment tasks performed with Ant do not include testing, by definition. This contradicts the desire to check your code quality on a daily basis.

Apache Maven offers a promising solution for these issues. Maven, which is fully compliant with Ant, uses different concepts to achieve the similar results. Ant can be seen as a scripting tool. Maven targets the project management aspect of software projects. It helps you perform all steps in the project lifecycle including build, deployment, test, report generation, and documentation. For an overview of Maven, see The Apache Maven project.

Maven has a very powerful plugin mechanism, however, many developers refrain from using Maven due to lack of experience, insufficient documentation, or perceived complexity.

This article shows how to perform daily builds with Maven, how to overcome some initial pitfalls, and how to set up a project infrastructure. The general project structure in Maven is already documented (see Resources); this article focuses on how to set up a typical IBM Rational Application Developer project structure. You walk through a complete example which covers the primary aspects of the build and deployment process. You see how to extract source from a version control system, build the source, deploy the resulting artifacts on IBM WebSphere Portal Server V5.1, and generate reports about the process. You can perform all these tasks from the command line (for example, using a batch job) or directly from the Rational Application Developer V6.0 workbench, using a Maven plugin.

The artifacts in the sample project include:

  • A portlet project to be deployed on WebSphere Portal Server V5.1
  • A library project to support the portlet project
  • A simple project containing the files for the build and deployment process
  • An EAR project to satisfy the J2EE validation of the IDE

Figure 1 shows these projects in the Rational Application Developer Resource perspective.


Figure 1: The workbench layout for the sample project
Figure 1: The workbench layout for the sample project

Back to top


Installing the software

The machine used for the example could be used for daily builds or as a developer's machine. You will be able to run Maven from the command line, as well as through the development environment using a plugin. Mevenide provides extensions to Rational Application Developer so you can run Maven tasks. For more information on Mevenide, see The Mevenide plugin.

You need to install the following components in order to run the examples:

  • IBM Rational Application Developer V6.0 with WebSphere Portal Toolkit
  • IBM WebSphere Portal Server V5.1
  • Apache Maven 1.0.2
  • Mevenide plugin for Eclipse 3.0
  • A CVS Client, such as WinCVS

Install Rational Application Developer and WebSphere Portal on the same machine as described in the WebSphere Portal product documentation.

Install the CVS client on the machine that performs the build. If you have to authenticate against the version control system, make sure the client can handle .cvspass files. One CVS client that can handle these files is WinCVS. After you have successfully run the cvs login command (on the command line), you can find a file called .cvspass in your USER_HOME directory. This file will provide the credentials for further invocations of the cvs login command.

Install the Mevenide Plugin into Rational Application Developer. Although the plugin is not absolutely necessary, it helps with editing Maven-related files and running specific goals for certain build-steps.

To install Maven on a Microsoft® Windows® system:

  1. Run the installer that comes with Maven.
  2. Define the installation directory.
  3. Let the installation run to completion.

After the installation has completed:

  1. Define a JAVA_HOME variable that points to a Java™ installation directory. In testing the example, I set JAVA_HOME to the Java installation that comes with Application Developer:
     c:\apps\RAD60\runtimes\portal_base_v5\java\
  2. Define a MAVEN_HOME variable that defines where you installed Maven. For example, I set MAVEN_HOME to:
    c:\apps\maven_1_0_2\

Back to top


Setting up the project

Next, look at the typical Rational Application Developer (hereafter called Application Developer) project setup. The main difference between this project and the standard Maven project is the folder layout. In the Maven default layout, subprojects are located in sub-folders of the main projects. The Application Developer workspace contains many projects at the same level, with one project as the central place for all build-related files. This can be the first pitfall when setting up Maven.

To import the sample code into the Application Developer workbench:

  1. Download the attached ZIP file, and unzip it to some temporary directory.
  2. Open Rational Application Developer in the Resource perspective.
  3. Create a simple project named AddressBookDeployment. Select File => Import and import the contents of the AddressBookDeployment folder (from the extracted download) into this new project.
  4. Create a portlet project called AddressBookPortlet. Do not choose to create a portlet. After the project is created, import the contents of the AddressBookPortlet folder (from the extracted download), and overwrite any existing files.
  5. The Enterprise Application Project called AddressBookPortletEAR should have been created when the portlet project was created. (If not, create this EAR project manually). For this project, select File -> Import -> File System, and click Next. Choose the files from the AddressBookPortletEAR folder and import them into the workbench.
  6. In the workspace, create a Java project called AddressBookLibraries. In the project settings, set JavaSource as a source folder, and build as the default output folder (see Figure 2). Again, select to import from the file system and import the Library project files from the AddressBookLibraries folder into the workbench.

Figure 2: Setting source and output folders for projects
Figure 2: Setting source and output folders for projects

After the setup is complete, your workspace should look like the sample workspace in Figure 1, and it should contain the files described in Figure 3.


Figure 3: Workbench layout for the sample project
Figure 3: Workbench layout for the sample project

The AddressBookDeployment project is the source for all build related activities. The project.xml, maven.xml and project.properties files define the basic layout of the build process. The fact that the same behaviour could be defined in any of these files can be confusing. For example, I set the source directory using this entry in project.xml:


<build>
<sourceDirectory>${basedir}/JavaSource</sourceDirectory>
</build>

You could also specify the source directory using the maven.build.src parameter in the project.properties file - the result is the same, no matter where you define the properties. The project.xml files in the other projects all extend the base project definition.

Table 1 describes some of the properties in project.properties that have been set to support this kind of project setup.

Table 1. Project setup properties

Property key and value Description
maven.build.dest=${basedir}/build Destination for compiled classes, overwritten locally in the portlet project.
maven.home.local=c:/apps/maven_1_0_2 Maven installation directory
maven.build.dir=c:/temp/maven_output3/${pom.artifactId} Place artifacts not in the project structure
maven.repo.local=c:/apps/maven_1_0_2/repository Where to install downloaded libraries
maven.jar.build.dir=c:/temp/maven_output3 Where to build jar files
maven.war.webapp.dir=${basedir}/WebContent Where to find webapp resources
maven.war.webxml=${basedir}/WebContent/WEB-INF/web.xml Where to find the appropriate web.xml file
maven.war.build.dir=c:/temp/maven_output3 Where to build war files
wps.install.dir=c:/apps/RAD60/runtimes/portal_v51 Installation directory of WebSphere Portal
maven.jar.wps = ${wps.home}/wps.jar Manual registration of specific jar files

The main project.xml file in the AddressBookDeployment project contains the settings that apply to all projects, such as general project information or dependencies that apply to all projects. All local project.xml files can either override the properties set in the main project or they can define new or special settings for the individual sub-project.

For example, consider the setting for the *.class directory: The general setting is ${basedir}/build but in a web project. In the example, I want this value to be ${basedir}/WebContent/WEB-INF/classes, to comply with the Application Developer workspace settings and J2EE standards. Therefore, this property is overwritten in a local project.properties file.


Back to top


Refining the maven.xml file

The maven.xml file contains all task definitions that are specific to a particular project and that are not covered by the default functionality of maven plugins. The task definitions in Maven are called goals and can be viewed as equivalent of targets in Ant.

The more familiar you are with Maven, the smaller your maven.xml tends to be, because you learn how to use the built-in functionality. Initially, you might be inclined to write your tasks manually, just as you did in Ant. This is feasible, because you can use Ant scripts in Maven and you can extend these through the use of jelly constructs such as loops and conditions. In most cases, however, it is useful to check the capabilities of the plugins, because they might already have what you need.

In our example the maven.xml file contains the following goal definitions:

updateSource Perform a cvs update for all projects
buildAll Build all projects (optional)
deploy Deploy shared libraries and portlets to WebSphere Portal
nightly-build Perform a full generation of all code and documentation

Because I want the example to be valid for more than one project of the same type, the portlet and library projects are defined as iterated comma-separated lists:

lib_projects Comma separated list of all library projects
portlet_projects Comma separated list of all portlet projects

The tags used in maven.xml could be of various types referring to different plugins. For example, to use Ant you need a namespace definition (xmlns:ant="jelly:ant") and then all ant tasks can be executed by referring to the namespace prefix (<ant:exec executable="cvs">).


Back to top


Running Maven

For this example, you can run Maven either from the command line or from the workbench in Application Developer. The issue to consider here is which goals can be executed from which folder. You can run all aggregation goals (such as multiproject:site or the custom goals) from the folder containing the deployment project. You can also run single goals, such as jar or war goals, directly from the subproject's folder.

If you run Maven from the command line, Maven expects to find a project.xml definition in the current folder, similar to the way Ant expects to find a build.xml file.

The Mevenide plugin makes all goals available in an extra view, when the focus is on the maven.xml file. Alternatively, as shown in Figure 4, when you select a project.xml file, the goals are in a context menu in the project navigator view.


Figure 4: You can run Maven goals from the workbench with the Mevenide plugin
Figure 4: You can run Maven goals from the workbench with the Mevenide plugin

Back to top


Building the project

To perform a build, a goal called buildAll in the maven.xml file combines all functions that are needed for the build. It performs the jar and jar:install goals for library projects, and then performs the war goal on all portlet projects. The jar and war tasks build the appropriate artifacts with corresponding names, such as addressbookportlet.war. The jar:install task puts the jars into the local repository to be available for the build of the portlets.

Maven automatically compiles classes that have changed before packaging the artifacts, so you do not have to worry about this. As a comparison, building a jar in Ant would require the following steps:

  1. Compile classes.
  2. Copy properties to the destination directory.
  3. Run the jar task in Ant.

Most of the most work in larger projects is typically spent on scripting these tasks for each project. This adds complexity because looping in Ant is tricky.

If a dependency to an open source library exists, Maven can download this library automatically. Because the IBM products are not available on the Web, the local dependencies must be defined. For the portlet project in the example, I defined the following dependencies in the local project.xml:

  • portlet-api
  • dynacache
  • j2ee
  • addressbooklibraries

For example, the portlet-api and dynacache dependencies cannot be satisfied from the open repository Maven initially contacts (they are part of the WebSphere Portal distribution), you must define these dependencies manually in the project.properties file of the deployment project.

In this case I defined a variable called wps.home to point to the shared library directory for the local WebSphere Portal installation:


wps.home=c:/apps/RAD60/runtimes/portal_v50/shared/app

We also defined a variable called maven.jar.portlet-api which defines the jar location relative to wps.home:


maven.jar.wps = ${wps.home}/portlet-api.jar

Similarly, the j2ee jar has been set relative to a local WebSphere Application Server installation.

The addressbooklibraries dependency is satisfied, because this artefact is built from the AddressBookLibrary project, and through the execution of jar:install. This dependency is copied to the local Maven repository, and is therefore available for other projects, after jar:install has been executed.


Back to top


Deploying the project

The deployment of the sample project includes deploying shared libraries on WebSphere Portal, and then deploying the portlets. Before starting the automatic and daily deployment process, you need to define a directory as a shared library, and then register this library with the classloader of the application server WebSphere_Portal.

To define the shared library:

  1. On the command line, in the config directory of the WebSphere Portal Server installation, run the command: wpsconfig start-admin-server.
  2. After the start process has completed, access the WebSphere Administrative Console by opening the following in a Web browser:

    https://localhost:9043/admin/logon.jsp
  3. Open Environment -> Shared libraries. Select localhost as node and WebSphere_Portal as server, and then click Apply.
  4. Create a new shared library, assign a name and description, and select a directory as the classpath (such as c:\apps\RAD60\runtimes\shared_libs\ . For example, see Figure 5.
    Figure 5: Defining shared libraries for WebSphere Portal
    Figure 5: Defining shared libraries for WebSphere Portal
  5. Save the settings.
  6. Now assign the shared library to the portal classloader:
    • In the console, open Servers => Application Servers=> WebSphere Portal. The portal server configuration displays.
    • Select classloader from the additional properties section, and select the classloader displayed here.
    • Open the Libraries section from the additional properties section and add a new shared library.
    • Select the library you created above, and save your settings.

You can now stop the administrative server because it is not needed anymore.

To deploy the shared libraries, a goal called deploySharedLibraries in the maven.xml file stops the server WebSphere_Portal, copies the shared libraries to the directory specified by the wps.shared.libs property, and starts the portal server again.

To deploy the portlets, the portlet project deployment folder contains two XMLAccess files: one for deploying and one for starting the portlet applications. You could use these files as models for deploying other portlet projects. You could copy and then edit the files to specify the appropriate settings for the of the new portlet projects (such as the name, uid, and filename). The deployPortlet goal in the maven.xml file deploys the generated portlet with the help of these two files. After you place your portlets on the pages in WebSphere Portal, these portlets are updated during the nightly build.

In addition to the single deployment goals, the maven.xml file defines a common deploy goal that runs the goals described above for all library and portlet projects.


Back to top


Reporting

One of most useful features of Maven is its ability to automatically run tests on the projects and to aggregate the test results into overview pages. This documentation can be directly deployed to a Web server so that all developers have the results of a nightly-build available in the morning.

The choice of reports to generate for each project depends on the settings in the global project.xml file:


<reports>
...
<report>maven-checkstyle-plugin</report>
...
</reports>

In our example, I include the following report definitions in the project setup:

maven-checkstyle-plugin Produce Checkstyle report
maven-javadoc-plugin Produce Javadocs and report
maven-jdepend-plugin Produce project metrics
maven-junit-report-plugin Generates reports from JUnit tests
maven-jxr-plugin Create cross-references from source to Javadoc
maven-license-plugin Includes license information in the project
maven-linkcheck-plugin Validates links
maven-pmd-plugin PMD scans Java source code for potential problems
maven-multiproject-plugin Generates reports for multiple projects
maven-dashboard-plugin Aggregates results from several projects

Most of the reports are generated for each project. The multiproject and dashboard plugins combine the reports for the general overview in our deployment project. Those two plugins are the hardest to configure because the project structure is different from the default structure maven expects.

An overview page of the central project is displayed in Figure 6. The navigation has an entry for each subproject under the Projects header. Individual reports can be found in the Project Documentation section. Individual subproject reports (such as Junit) are important to the developers. The dashboard report for the deployment project is important for the project manager or the lead architect because it gives an overview of all project activities.


Figure 6: Dashboard view of the central deployment project
Figure 6: Dashboard view of the central deployment project

To set up the aggregated reports for the example, I defined the following properties in the global project.properties file:


maven.multiproject.basedir=${basedir}/../
maven.multiproject.excludes=AddressBookDeployment/project.xml
maven.multiproject.includes=*/project.xml
maven.multiproject.site.goals=site,dashboard:report-single

You define the base directory for multiprojects one level above each subproject, and you exclude the AddressBookDeployment project, because this is the top level project that is only relevant for aggregated results. To run the multiproject:site goal, the site goal and the dashboard:report-single goal run for each project.

Important: Exclude the AddressBookDeployment/project.xml. Including it can lead to an infinite loop when Maven iterates over subprojects and finds the main project again among the subprojects.

To aggregate the results in the dashboard view of the deployment project, some more properties are required in the project.properties file:


maven.dashboard.basedir=${basedir}/../
maven.dashboard.runreactor = false
maven.dashboard.rungoals = false
maven.dashboard.aggregators=
csall,csfiles,cserrors,cswarnings,junittests,juniterrors,junitfailures,junitpassrate,
pmdfiles,pmdviolations,tasklistclass,tasklistmethod,tasklist
maven.dashboard.includes=*/project.xml

The maven.dashboard.basedir property specifies where to start to the dashboard task--in this case one level up from the deployment project. The maven.dashboard.aggregators property defines which types of reports are to be aggregated in the dashboard view.

You can access individual project reports through the Projects navigation in the main view. An example of a detailed report is displayed in Figure 7, which is the JUnit view of the detailed report. This report gives details about all JUnit tests that were run for this individual project and their results.


Figure 7: Detailed view of a subproject
Figure 7: Detailed view of a subproject

To generate this project documentation just, open a command window and navigate to the AddressBookDeployment directory of the workbench. Run the maven multiproject:site command, which generates the reports on all projects and, similar to the jar generation, runs all tasks that are required before generating the reports, such as compiling classes, unit test classes, and then running unit tests.

After all documentation has been generated, the documentation can be accessed at ${maven.build.dir}/AdressBookDeployment/docs/index.html. The deployDocumentation goal, defined in maven.xml, copies all files to the directory of a Web server. The documentation can now be accessed by any team member in a Web browser.


Back to top


Defining the nightly-build goal

The nightly-build goal in the sample maven.xml file runs all goals described. You can configure the running of the maven nightly-build as a scheduled task on Windows or as a cronjob on UNIX-like systems.

This goal performs the following steps:

  1. Update sources from cvs.
  2. Build and deploy all artifacts to WebSphere Portal.
  3. Generate the documentation Web server.

Back to top


Conclusion

Through its rich set of plugins that are already available, Maven is an amazing tool for all build-related activities that need automated tasks. Because it also includes Ant as a plugin, it should be a moderate effort to migrate build procedures from Ant to Maven. Maven’s ability to run tests and generate reports is a very useful feature to implement quality assurance and automated testing in J2EE projects, and can be a big help for build processes.

One drawback when using Maven is the fact that Maven is not yet extensively documented; therefore, the usage of Maven in critical projects still needs some evaluation. In addition, Maven support is primarily available only through mailing lists. This form of support can be a risk for big project. However, the overall picture of Maven suggests that this tool will be used in more and more projects in the future and the community will grow fast.



Back to top


Download

Description Name Size Download method
Code samples in zip format 0503_boog-maven-examples.zip 26KB FTP|HTTP
Information about download methods Get Adobe® Reader®

Back to top


Resources


Back to top


About the author

Author photo

Hinrich Boog is an IT Specialist in the IBM e-business Innovation Center in Hamburg, Germany, where he is engaged in architecture, development and operational aspects of enterprise portal and content management projects across EMEA. He holds a masters degree in Computer Science from Freie Universität Berlin and is currently pursuing a master's degree in Total Quality Management at Universi

 

RAD에서 Maven 을 이용할 수 있는 예제...

http://www-128.ibm.com/developerworks/websphere/library/techarticles/0503_boog/0503_boog.html?ca=dgr-lnxw97Maven

이 글은 스프링노트에서 작성되었습니다.

Posted by 아프락사스

 

IBM


Redbooks Technote

Changed Statistics Views in the Profiler of IBM Rational Application Developer V6.0.1, TIPS0600

Abstract

IBM Rational Application Developer V6 gives you the ability to profile Java applications. Profiling gives you insight into the performance characteristics of your application. Knowing more about your application's run-time behavior promotes a better understanding of its resource requirements and potential bottlenecks.

See chapter 15 of WebSphere Application Server V6 Scalability and Performance Handbook, SG24-6392-00 for detailed information on the Profiler itself, for information on how to prepare application servers for profiling, and to learn how to set up the profiling function in IBM Rational Application Developer V6.

For related information about this topic, refer to the following IBM Redbooks publication:
WebSphere Application Server V6 Scalability and Performance Handbook, SG24-6392-00
Contents

IBM Rational Application Developer V6 gives you the ability to profile Java applications. Profiling gives you insight into the performance characteristics of your application. Knowing more about your application's run-time behavior promotes a better understanding of its resource requirements and potential bottlenecks.

Profiler views
In order to understand the behavior of an application, there are a number of different views that you can display in the Profiling Perspective.
Use the following steps to open a view:
  1. Right-click and select Monitoring.
  2. Select Collecting->Profiling (date) ->Open With. You have several options/views to choose from. The available views differ between the Java Profiler and the J2EE Profiler.

Statistics views in Rational Application Developer V6.0.1
There is a significant change in the way you access statistics views in the Profiler in Rational Application Developer V6.0 compared to V6.0.1. In V6.0 you could select Package statistics, Class statistics, Method statistics, and Instance statistics right from the context menu of the appropriate profiling agent. In V6.0.1 this was regrouped to three different kinds of views, each one with up to four different levels.

The three statistics views are:
  • Code Coverage Statistics
  • Execution Statistics
  • Memory Statistics

The four levels are:
  • Package Package icon
  • Class Class icon
  • Method (not available for Memory Statistics) Method icon
  • Instance (only available for Execution and Memory Statistics) Instance icon

You can switch between the package, class, method, and instance levels by selecting one of the toolbar controls.

Opening other views
While working in the statistics views, you can select to open the source code of a selected item, choose the columns to display, or export the data to a file in HTML format using the toolbar controls.

Filtering
You can use the filter function (first icon on the toolbar Filter function on toolbar) to filter out data.

Working with columns
There are different controls available that allow you to manipulate the columns displayed in a view. You can specify the columns to display in the view, show the change in each numeric column, and sort the column data.

To specify which columns to display in the view:
  1. Select the Choose Column button in the toolbar.
  2. In the Choose Columns dialog, select the columns that you want displayed in the view.
  3. Click OK to apply the changes.

To show the change in each numeric column since the last refresh, select Show Delta Columns in the toolbar.

To sort column data:
  1. Click the title of a column.
  2. Click the title of the column again to sort it in reverse order. The title of the column is prefixed with < if the column is sorted in ascending order. It is prefixed with > if it is sorted in descending order.

Memory Statistics
The Memory Statistics view displays statistics about the application heap. It provides detailed information about what is currently loaded into the JVM memory. For example, you can see the names of the classes currently loaded, the number of instances that are alive, and the memory size allocated by every class. Memory statistics are available at the package, class, and instance level.

You can display information such as Class, Package, Total Instances, Live Instances, Collected, Total Size (bytes), and Active Size (bytes) in the Memory Statistics views.
The data can also be shown as percentages. To display the data as percentages, select the Show as Percentage icon (Show as Percentage icon) in the toolbar.
You can access the other views from the Memory Statistics views:

To access Object references of a selected object:
  1. Right-click the object.
  2. select Show Object References. The Object References view is opened and populated with data for the selected object.

To access the Source code view of a selected object:
  1. Right-click the object.
  2. Select Open Source.

Access the Memory Statistics view via the Java Profiling Agent:
  1. Right-click and select Monitoring.
  2. Select Collecting->Open With -> Memory Statistics, or click the appropriate icon in the toolbar.
  3. Select the Package, Class, or Instance level icons to display the appropriate information.

Memory Statistics Table - Package level

Execution Statistics
The Execution Statistics view displays statistics about the application execution time. It provides data such as the number of methods called and the amount of time taken to execute every method. Execution statistics are available at the package, class, method, and instance level.

Information such as Method, Class, Package, Base Time (seconds), Inherited Base Time (seconds), Average Base Time (seconds), Cumulative Time (seconds), Inherited Cumulative Time (seconds), Calls, Inherited Calls and Cumulative CPU Time (seconds) can be displayed in the Execution Statistics views. The available selection depends on the level. For example, you cannot select Method when looking at the class level information.

The data can also be shown as percentages.

Following are other profiling views and source code views that can be opened from the Execution Statistics view:
  • Object references view.
  • The Method Invocation view. You need to switch to the Package, Class, or Method display mode. Select a method, right-click, and select Show Method Invocation.
  • Source code view.

Access the Execution Statistics via the J2EE Request Profiler:
  1. Right-click, and select Monitoring.
  2. Select Collecting -> Open With -> Execution Statistics. Select the Package, Class, or Instance level icons to display the appropriate information. You can use the filter function (first icon on the toolbar) to filter out data.

Execution Statistics view - Method level

Code Coverage Statistics

The Coverage Statistics view displays usage statistics for a selected type of object. Coverage statistics are available at the Package, Class, Method, and Instance levels.

Using this view, you can easily identify classes that are fully utilized and those that are underutilized, which in turn allows you to focus test efforts on those underutilized classes. The Code Coverage Statistics view also provides an overview of the classes and methods referenced for a particular task. This can be useful in identifying unexpected method calls.

The available information is Item names, Class, Package, Calls, Methods missed, Methods hit, % Methods Hit, Units Hit, Total Units and, % Units Hit.

You can only select to open the source code view. No other views can be accessed from the Coverage Statistics.

Access the Execution Statistics via the J2EE Request Profiler.
  1. Right-click, and select Monitoring.
  2. Select Collecting->Open With ->Coverage Statistics. Select the Package, Class, or Method level icons and the filter function to display the desired information.

Coverage Statistics view - Class level
Special Notices

This material has not been submitted to any formal IBM test and is published AS IS. It has not been the subject of rigorous review. IBM assumes no responsibility for its accuracy or completeness. The use of this information or the implementation of any of these techniques is a customer responsibility and depends upon the customer's ability to evaluate and integrate them into the customers operational environment.

 

 

http://www.redbooks.ibm.com/Redbooks.nsf/RedbookAbstracts/tips0600.html?Open&printable

이 글은 스프링노트에서 작성되었습니다.

Posted by 아프락사스

Eclipse 런타임 옵션

최종 수정 날짜: 2004년 8월 4일 수요일 14:45

Eclipse 플랫폼은 구성 가능성이 높습니다. 구성 입력은 시스템 특성 설정 및 명령행 인수의 양식을 취합니다. 대부분의 경우 명령행 인수는 단순히 관련 시스템 특성을 설정하는 데 필요한 바로 가기입니다. 실제로 명령행 인수보다 시스템 특성 설정이 더 많습니다.

명령행 인수

Eclipse 런타임의 다양한 부분에서 처리하는 명령행 인수가 아래에 나열됩니다. -D VM 인수를 사용하는 명령행에서 시스템 특성을 사용하거나 config.ini 파일에서 값을 지정하여 이러한 값 대부분을 지정할 수도 있습니다. 후자의 방법을 사용하면 명령행 인수를 사용하지 않고 Eclipse를 사용자 정의할 수 있습니다.

목록의 각 인수에서 해당 시스템 특성 키를 {}로 묶어 지정합니다. 또한 ()로 묶인 명령행 인수를 처리할 Eclipse 런타임 계층도 지정됩니다. 이 방법은 런타임 부분을 특수한 요구에 맞게 바꾸는 사용자에게 유용합니다.

-application <id> (Runtime)
eclipse.application을 <id>로 설정하는 것과 동등함
-arch <architecture> (OSGi)
osgi.arch를 <architecture>로 설정하는 것과 동등함
-clean (OSGi) NEW
osgi.clean을 "true"로 설정하는 것과 동등함
-configuration <location> (Main)
osgi.configuration.area를 <location>으로 설정하는 것과 동등함
-console [port] (OSGi) NEW
osgi.console을 [port] 또는 기본 포트를 사용할 경우(즉, 포트가 지정되지 않은 경우) 빈 문자열로 설정하는 것과 동등함
-consoleLog (Runtime)
eclispe.consoleLog를 "true"로 설정하는 것과 동등함
-data <location> (OSGi)
osgi.instance.area를 <location>으로 설정하는 것과 동등함
-debug [options file] (OSGi)
osgi.debug를 [options file] 또는 예를 들어 옵션 파일 위치를 지정하지 않은 경우 간단히 디버그를 사용할 수 있도록 빈 문자열로 설정하는 것과 동등함
-dev [entries] (OSGi)
osgi.dev를 [entries] 또는 예를 들어 항목을 지정하지 않은 경우 간단히 dev 모드를 사용할 수 있도록 빈 문자열로 설정하는 것과 동등함
 
 
-endSplash <command> (Main)
스플래시 화면을 아래로 내릴 때 사용할 명령을 지정합니다. 보통 Eclipse 실행 파일에서 제공합니다.
-feature <feature id> (Runtime)
eclipse.product를 <feature id>로 설정하는 것과 동등함
-framework <location> (Main) NEW
osgi.framework를 <location>으로 설정하는 것과 동등함
-initialize (Main)
실행 중인 구성을 초기화합니다. 모든 런타임 관련 데이터 구조 및 캐시를 새로 고칩니다. 모든 사용자/플러그인의 정의된 구성 데이터가 제거되지 않습니다. 모든 응용프로그램이 실행되지 않고 모든 제품 스펙이 무시되며 UI가 표시되지 않습니다. 예를 들어 스플래시 화면이 그려지지 않습니다.
-install <location> (Main)
osgi.install.area를 <location>으로 설정하는 것과 동등함
-keyring <location> (Runtime)
디스크에서 권한 데이터베이스의 위치입니다. 이 인수는 -password 인수와 함께 사용해야 합니다.
 
-nl <locale> (OSGi)
osgi.nl을 <locale>로 설정하는 것과 동등함
 
 
-noLazyRegistryCacheLoading (Runtime)
eclipse.noLazyRegistryCacheLoading을 "true"로 설정하는 것과 동등함
-noRegistryCache (Runtime)
eclipse.noRegistryCache를 "true"로 설정하는 것과 동등함
 
 
-noSplash (Executable, Main)
스플래시 화면의 표시 여부를 제어합니다.
-os <operating system> (OSGi)
osgi.os를 <operating system>으로 설정하는 것과 동등함
 
-password <password> (Runtime)
권한 데이터베이스의 암호
 
 
-pluginCustomization <location> (Runtime)
eclipse.pluginCustomization을 <location>으로 설정하는 것과 동등함
-product <id> (OSGi) NEW
eclipse.product를 <id>로 설정하는 것과 동등함
-showSplash <command> (Main)
스플래시 화면을 표시할 때 사용할 명령을 지정합니다. 보통 Eclipse 실행 파일에서 제공합니다.
 
-user <location> (OSGi) NEW
osgi.user.area를 <location>으로 설정하는 것과 동등함
-vm <path to java executable> (Executable, Main) NEW
Eclipse 실행 파일에 전달하는 경우 이 옵션은 Eclipse 실행에 사용할 Java VM 위치를 찾는 데 사용됩니다. 이 때 찾는 위치는 해당 Java 실행 파일의 전체 파일 시스템 경로여야 합니다. 경로를 지정하지 않으면 Eclipse 실행 파일은 검색 알고리즘을 사용하여 적절한 VM을 찾습니다. 모든 경우 실행 파일은 -vm 인수를 사용하여 Java 기본에 사용된 실제 VM의 경로를 전달합니다. 그 다음 Java 기본은 이 값을 eclipse.vm에 저장합니다.
-vmargs [vmargs*] (Executable, Main) NEW
Eclipse에 전달하는 경우 이 옵션은 Eclipse 실행에 사용할 Java VM 조작 위치를 찾는 데 사용됩니다. 위치를 지정하는 경우 이 옵션은 명령행의 끝에 와야 합니다. 위치를 실행 파일 명령행에 지정하지 않는 경우에도 실행 파일은 -vmargs 인수를 사용하는 Java로 전달된 명령행에 실행 중인 클래스를 포함한 관련 인수를 자동으로 추가합니다. 그 다음 Java 기본은 이 값을 eclipse.vmargs에 저장합니다.
-ws <window system> (OSGi)
osgi.ws를 <window system>으로 설정하는 것과 동등함

더 이상 사용하지 않는 명령행 인수

다음 명령행 인수는 더 이상 관련이 없거나 대체된 상태이고 역방향 호환성을 유지보수하도록 런타임에서 이용되며 실행 중인 응용프로그램에 전달되지 않습니다.

-boot
-configuration 참조
-classLoaderProperties
더 이상 관련 없음
 
-firstUse
더 이상 관련 없음
 
-newUpdates
더 이상 관련 없음
 
-noPackagePrefixes
더 이상 관련 없음
 
 
-noUpdate
더 이상 관련 없음
 
-plugins
더 이상 관련 없음
-update
더 이상 관련 없음

기타

다음 명령행 인수는 다양한 Eclipse 플러그인에서 정의되며 정의하는 플러그인이 설치, 해석 및 활성화된 경우에만 지원됩니다.

-noVersionCheck (workbench)
<description>
-perspective (workbench)
<description>
-refresh (org.eclipse.core.resources)
<description>
-showLocation (org.eclipse.ui.ide.workbench)
<description>
-allowDeadlock
<description>

시스템 특성

다음 시스템 특성은 Eclipse 런타임에서 사용됩니다. "osgi"로 시작하는 이러한 시스템 특성은 OSGi 프레임워크 구현에 특정하지만 "eclipse"로 시작하는 일부 시스템 특성은 OSGi 프레임워크의 맨 위에 계층화된 Eclipse 런타임에 특정함에 유의하십시오.

이러한 특성 대부분은 명령행과 동등합니다({} 중괄호의 값 및 명령행 인수 섹션 참조). 사용자는 명령행 또는 특성 설정을 사용하여 값을 지정할 수 있습니다. 특성은 다음과 같은 방법으로 설정될 수 있습니다.

  • -DpropName=propValue를 Java VM의 VM 인수로 사용
  • 해당 구성 영역에서 config.ini 파일에 필요한 특성 설정
eclipse.application {-application}
실행할 응용프로그램 ID입니다. 여기에 지정된 값은 실행 중인 제품(eclipse.product 참조)에서 정의한 응용프로그램을 대체합니다.
eclipse.commands
sdf
eclipse.consoleLog
"true"인 경우 로그 출력도 Java의 System.out에 송신됩니다. 보통 명령 쉘에 다시 송신됩니다. -debug와 함께 결합하면 유용합니다.
eclipse.debug.startupTime
이 세션에서 Java VM이 시작된 시간(밀리 초)
eclipse.exitcode
<description>
 
eclipse.exitdata
<description>
 
eclipse.manifestConverter
레거시 plugin.xml 파일을 manifest.mf 파일로 변환할 때 사용할 manifest 변환기의 클래스 이름
eclipse.noExtensionMunging
"true"인 경우 레거시 레지스트리 확장은 그대로 남아 있습니다. 기본적으로 이러한 확장은 갱신하여 Eclipse 3.0에 있는 새 확장점 ID를 사용합니다.
eclipse.noLazyRegistryCacheLoading {-noLazyRegistryCacheLoading}
"true"인 경우 플랫폼의 플러그인 레지스트리 캐시 로드 최적화가 비활성화됩니다. 기본적으로 구성 요소는 레지스트리 캐시가 사용 가능한 경우 요청할 때에만 해당 레지스트리 캐시에서 로드되어 메모리 예정 범위를 줄입니다. 이 옵션은 시작할 때 레지스트리 캐시를 전체적으로 로드하도록 강제 실행합니다.
eclipse.noRegistryCache {-noRegistryCache}
"true"인 경우 내부 확장 레지스트리 캐시의 읽기 및 쓰기가 불가능합니다.
eclipse.pluginCustomization {-pluginCustomization}
플러그인 환경 설정의 기본 설정이 들어 있는 특성 파일의 파일 시스템 위치입니다. 이 기본 설정은 1차 기능에 지정된 기본 설정을 대체합니다. 상대 경로는 Eclipse 자체의 현재 작업 디렉토리에 따라 해석됩니다.
eclipse.product {-product}
실행 중인 제품 ID입니다. 이 ID를 통해 다양한 브랜딩 정보 및 사용되는 응용프로그램을 제어합니다.
eclipse.vm {-vm}
Eclipse 실행에 사용한 Java 실행 파일의 경로입니다. 이 정보는 재실행 명령행을 구성하는 데 사용됩니다.
eclipse.vmargs {-vmargs}
Eclipse 실행에 사용한 VM 인수를 나열합니다. 이 정보는 재실행 명령행을 구성하는 데 사용됩니다.
osgi.adaptor
사용할 OSGi 프레임워크 어댑터의 클래스 이름
osgi.arch {-arch}
-arch 참조
osgi.baseConfiguration.area
asf
osgi.bundles
시스템을 가동하여 실행하면 자동으로 설치되어 선택적으로 시작되는 쉼표로 구분된 번들 목록입니다. 다음은 각 항목 양식입니다.
    <URL | simple bundle location>[@ [<start-level>] [":start"]]
시 작 레벨(>0인 정수)이 누락되면 프레임워크에서는 번들의 기본 시작 레벨을 사용합니다. "start" 태그를 추가하면 번들은 설치 후 시작됨으로 표시됩니다. 단순 번들 위치는 프레임워크의 상위 디렉토리에 상대적으로 해석됩니다. 시작 레벨은 번들을 실행해야 하는 경우에 OSGi 시작 레벨을 표시합니다. 이 값이 설정되지 않으면 시스템에서 적절한 기본값을 계산합니다.
osgi.clean
"true"로 설정하면 OSGi 프레임워크 및 Eclipse 런타임에 사용되는 캐시된 데이터가 정리됩니다. 그러면 번들 종속성 분석 및 eclipse 확장 레지스트리 데이터를 저장하기 위해 사용되는 캐시가 정리됩니다. 이 옵션을 사용하면 eclipse는 이 캐시들을 다시 초기화하게 됩니다.
osgi.configuration.cascaded
"true"로 설정하면 이 구성은 상위 구성에 계단식으로 설정됩니다. 자세한 내용은 위치 섹션을 참조하십시오.
osgi.configuration.area {-configuration}
이러한 플랫폼을 실행하는 데 사용할 구성 위치입니다. 구성에서는 실행한 플러그인 및 다양한 기타 시스템 설정을 판별합니다. 자세한 내용은 위치 섹션을 참조하십시오.
 
osgi.configuration.area.default
이러한 플랫폼을 실행하는 데 사용할 기본 구성 위치입니다. 구성에서는 실행한 플러그인 및 다양한 기타 시스템 설정을 판별합니다. 이 값, 즉 기본 설정은 osgi.configuration.area에 설정된 값이 없는 경우에만 사용됩니다. 자세한 내용은 위치 섹션을 참조하십시오.
 
osgi.console {-console}
널이 아닌 값으로 설정하면 OSGi 콘솔을 설치한 경우 해당 콘솔이 사용 가능합니다. 값이 적절한 정수인 경우 이 값은 콘솔이 청취하는 포트로 해석되어 지정된 포트로 해당 출력을 지정합니다. 시스템 상태를 조사할 때 유용합니다.
 
osgi.console.class
요청할 경우 실행할 콘솔의 클래스 이름
osgi.debug {-debug}
널이 아닌 값으로 설정하면 플랫폼은 디버그 모드가 됩니다. 값이 문자열인 경우 이 값은 .options 파일 위치로 해석됩니다. 이 파일은 플러그인에서 사용 가능한 디버그 확장점 및 이러한 확장점의 사용 가능 여부를 표시합니다. 위치를 지정되지 않은 경우 플랫폼에서는 설치 디렉토리 아래의 .options 파일을 검색합니다.
osgi.dev {-dev}
빈 문자열로 설정하면 dev 모드가 간단히 켜집니다. 또한 이 특성은 플러그인 세트의 사용자 정의 클래스 경로 추가가 들어 있는 Java 특성 파일의 URL 또는 각 플러그인의 클래스 경로에 추가되는 쉼표로 구분된 클래스 항목에 설정됩니다. 사용자 정의된 dev 시간 클래스 경로를 요구하는 각 플러그인의 경우 해당 파일에 다음 양식의 항목이 들어 있습니다.
    <plug-in id>=<추가할 쉼표로 구분된 클래스 경로 항목>
여기서 plug-in id "*"는 별도의 언급이 없는 한 모든 플러그인과 일치합니다.
osgi.framework
OSGi 프레임워크 URL 위치입니다. Eclipse 설치를 해체할 경우 유용합니다. 자세한 내용은 위치 섹션을 참조하십시오.
osgi.frameworkClassPath
OSGi 프레임워크 구현에 사용할 쉼표로 구분된 클래스 경로 항목 목록입니다. 상대 위치는 프레임워크 위치에 따라 해석됩니다(osgi.framework 참조).
osgi.install.area {-install}
플랫폼의 설치 위치입니다. 이 설정은 기본 Eclipse 플러그인의 위치를 표시하며 Eclipse 설치를 해체할 경우 유용합니다. 자세한 내용은 위치 섹션을 참조하십시오.
osgi.instance.area {-data}
이 세션에서의 인스턴스 데이터 위치입니다. 플러그인에서는 이 위치를 사용하여 데이터를 저장합니다. 예를 들어 자원 플러그인에서는 이 위치를 프로젝트(작업공간이라고도 함)의 기본 위치로 사용합니다. 자세한 내용은 위치 섹션을 참조하십시오.
 
osgi.instance.area.default
이 세션에서의 기본 인스턴스 데이터 위치입니다. 플러그인에서는 이 위치를 사용하여 데이터를 저장합니다. 예를 들어 자원 플러그인에서는 이 위치를 프로젝트(작업공간이라고도 함)의 기본 위치로 사용합니다. 이 값, 즉 기본 설정은 osgi.instance.area에 설정된 값이 없는 경우에만 사용됩니다. 자세한 내용은 위치 섹션을 참조하십시오.
 
osgi.manifest.cache
생성된 Manifest가 발견 및 생성된 위치입니다. 기본값은 구성 영역이지만 Manifest 캐시를 별도로 저장할 수 있습니다.
osgi.nl {-nl}
Eclipse 플랫폼을 실행할 로케일 이름입니다. NL 값은 표준 Java 로케일 이름 지정 규칙을 따라야 합니다.
osgi.os {-os}
운영 체제 값입니다. 이 값은 Eclipse에 알려진 Eclipse 프로세서 아키텍처 이름 중 하나여야 합니다(예: x86, sparc, ...).
osgi.splashLocation
Eclipse를 시작할 때 표시할 스플래시 화면(.bmp 파일)의 절대 URL 위치입니다. 이 특성은 osgi.splashPath에 설정된 값을 대체합니다.
osgi.splashPath
splash.bmp 파일을 검색하는 쉼표로 구분된 URL 목록입니다. 이 특성은 osgi.splashLocation에 설정된 값으로 대체됩니다.
osgi.user.area {-user}
사용자 영역의 위치입니다. 사용자 영역은 OS 사용자에게 특정한 데이터(예: 환경 설정)를 포함하고 Eclipse 설치, 구성 또는 인스턴스와는 독립되어 있습니다. 자세한 내용은 위치 섹션을 참조하십시오.
osgi.user.area.default
사용자 영역의 기본 위치입니다. 사용자 영역은 OS 사용자에게 특정한 데이터(예: 환경 설정)를 포함하고 Eclipse 설치, 구성 또는 인스턴스와는 독립되어 있습니다. 이 값, 즉 기본 설정은 osgi.user.area에 설정된 값이 없는 경우에만 사용됩니다. 자세한 내용은 위치 섹션을 참조하십시오.
osgi.ws {-ws}
창 시스템 값입니다. 이 값은 Eclipse에 알려진 Eclipse 창 시스템 이름 중 하나여야 합니다(예: win32, motif, ...).
osgi.syspath
<xxx가 계속 사용됩니다. 이름을 고정합니다.>

위치

Eclipse 런타임에서는 플러그인 개발자에게 데이터를 읽거나 저장하는 컨텍스트를, Eclipse 사용자에게 데이터 공유 및 가시성의 범위에 대한 제어를 제공하는 위치 수를 정의합니다. Eclipse는 다음과 같이 위치 개념을 정의합니다.

User (-user) {osgi.user.area} [@none, @noDefault, @user.home, @user.dir, filepath, url]
사용자 위치는 사용자에게 특정된 위치입니다. 보통 사용자 위치는 Java user.home 시스템 특성의 값에 기초하지만 해당 위치를 대체할 수 있습니다. 사용자 범위의 환경 설정과 같은 정보 및 로그인 정보는 사용자 위치에서 찾을 수 있습니다.
Install (-install) {osgi.install.area} [@user.home, @user.dir, filepath, url]
설치 위치는 Eclipse 자체가 설치된 위치입니다. 실제로 이 위치는 실행 중인 startup.jar 또는 eclipse.exe의 상위 디렉토리(보통 "eclipse")입니다. 여러 사용자가 설치를 공유할 수 있으므로 이 위치는 일반 사용자에게 읽기 전용으로 간주됩니다. 설치 위치를 설정하고 나머지 Eclipse에서 startup.jar를 분리할 수 있습니다.
Configuration (-configuration) {osgi.configuration.area} [@none, @noDefault, @user.home, @user.dir, filepath, url]
구성 위치에는 실행할 설치 세트(또는 서브세트)를 식별 및 관리하는 파일이 들어 있습니다. 이와 같이 한 설치에 여러 구성이 있을 수 있습니다. 설치는 기본 구성 영역과 함께 제공될 수 있지만 일반 시작 시나리오는 쓰기 가능한 구성 위치를 더 찾으려는 런타임과 연관되어 있습니다.
Instance (-data) {osgi.instance.area} [@none, @noDefault, @user.home, @user.dir, filepath, url]
인스턴스 위치에는 사용자 정의 데이터 아티팩트가 들어 있습니다. 예를 들어 자원 플러그인에서는 인스턴스 영역을 작업공간 위치로 사용하므로 프로젝트의 기본 홈을 사용합니다. 기타 플러그인에서는 이 위치에서 필요한 모든 파일을 쓸 수 있습니다.

사용자는 이러한 모든 위치를 설정할 수 있지만 Eclipse에서는 값이 지정되지 않으면 올바른 기본값을 계산합니다. 위치를 설정하는 가장 일반적인 사용 케이스는 인스턴스 영역 또는 IDE 컨텍스트의 경우 작업공간입니다. 다음을 지정하여 특정 데이터 세트에서 기본 Eclipse 구성을 실행할 수 있습니다.

    eclipse -data c:\mydata

세부사항

위치는 URL입니다. 위치를 단순하게 표시하도록 파일 경로도 허용되고 자동으로 file: URL 형식으로 변환됩니다. 효율적인 제어 및 편의를 제공하는 사용 가능한 여러 사전 정의된 기호 위치도 있습니다. 위치 유형 및 기호 값을 조합한 모든 경우가 올바르지는 않음에 유의하십시오. 아래의 테이블에서는 가능한 조합을 자세히 표시합니다. 기본 케이스가 모든 위치에서 올바르고 쓰기 가능한 조합으로 설정되었으므로 일부 플러그인은 가능한 경우로 나열되었어도 다른 설정에서 실패할 수 있습니다. 예를 들어 인스턴스 영역을 정의하지 않으면 사용자 데이터에 초점을 맞춘 플러그인(예: Eclipse 자원 플러그인)에서 많은 작업을 수행할 수는 없습니다. 플러그인 개발자가 필요한 경우 지원한 설정을 선택하고 해당 기능을 설계해야 합니다.

@none
해당 위치를 명시적으로 설정하거나 기본값으로 설정할 수 없음을 표시합니다. 예를 들어 사용자 데이터가 없는 RCP 스타일 응용프로그램에서는 osgi.instance.area=@none을 사용하여 외부 파일이 디스크에 작성되지 않도록 할 수 있습니다. @none 뒤에 추가 경로 세그먼트가 올 수 없습니다.
@noDefault
정의되지 않거나 명시적으로 정의된 위치를 강제 실행합니다. 즉, Eclipse에서는 기본값을 자동으로 계산하지 않습니다. 이 방법은 해당 위치에 있는 데이터는 허용하려고 할 때 Eclipse 기본값이 적절하지 않은 경우 유용합니다. @noDefault 뒤에 추가 경로 세그먼트가 올 수 없습니다.
@user.home
Eclipse를 사용자 홈 디렉토리와 관련된 위치 값을 계산하도록 지정합니다. @user.home 뒤에 추가 경로 세그먼트가 올 수 없습니다. 모든 경우 "@user.home" 문자열이 Java "user.home" 시스템 특성 값으로 간단히 바뀝니다. 예를 들어 다음과 같이 설정합니다.
osgi.instance.area=@user.home/myWorkspace
다음은 이 때의 결과 값입니다.
file:/users/bob/myWorkspace
@user.dir
Eclipse를 현재 작업 디렉토리와 관련된 위치 값을 계산하도록 지정합니다. @user.dir 뒤에 추가 경로 세그먼트가 올 수 없습니다. 모든 경우 "@user.dir" 문자열이 Java "user.dir" 시스템 특성 값으로 간단히 바뀝니다. 예를 들어 다음과 같이 설정합니다.
osgi.instance.area=@user.dir/myWorkspace
다음은 이 때의 결과 값입니다.
file:/usr/share/eclipse/myWorkspace
위치/값
기본값 지원
파일/URL
@none
@noDefault
@user.home
@user.dir
인스턴스
예(기본값)
구성
예*
예*
설치
아니오
아니오
아니오
사용자

*는 이 설정이 기술적으로는 가능하지만 실용적으로는 관리에 어려움이 있음을 표시합니다. 특히 구성 위치가 없는 경우 Eclipse 런타임은 OSGi 프레임워크를 시작하는 경우에만 가져올 수 있습니다.

법적 주의사항.


 

이 글은 스프링노트에서 작성되었습니다.

Posted by 아프락사스

BLOG main image

공지사항

카테고리

분류 전체보기 (155)
Architect이야기 (1)
Rational Products (94)
Patterns (0)
JEE Technologies (3)
Methodology (0)
Apache Project (0)
Open Project (4)
Knowhow (52)
Etc (0)