пятница, 4 мая 2012 г.

Непрерывная интеграция для Oracle SOA Suite 11g. Альтернативный вариант

Программное обеспечение:
  • Сервер непрерывной интеграции: Oracle Enterprise Linux 5.7, JDeveloper 11.1.1.5, Hudson 2.2.0;
  • Сервер SOA: Oracle SOA Suite 11.1.1.5.
Пояснение:
В предыдущей статье (см. здесь) описана конфигурация в которой предполагалось, что в SOA-приложениях не много SOA-проектов (например, 1-3), а на уровне системы непрерывной интеграции (в нашем случае - Hudson) производится опрос системы контроля версий (в нашем случае - SVN) на уровне SOA-приложения. Эта стратегия не оптимальна, при условии что в SOA-приложении большое количество (например, 5-15) SOA-проектов, т.к. при изменении одного из проектов будут собраны, развернуты и запущенны автотесты всех проектов в приложении. В данной статье описана конфигурация на уровне SOA-проекта.
Последовательность шагов:
  1. Скачиваем дистрибутив Hudson с официального сайта и устанавливаем его.
  2. Создать тестовое SOA-приложение (в нашем случае это HelloWorldApplication), включая автотесты для этого приложения (подробнее об их создании для Oracle SOA Suite здесь).
  3. Добавим в SOA-проект директорию tools, а в неё конфигурационный файл с именем project.properties:
    Следующего содержания:
     project.name=HelloWorldProject
     project.revision=1.0
     project.partition=test  
    
  4. Для композита сгенерировать "Configuration Plan":
  5. Отредактировать конфигурационный файл build.properties находящийся в директории SOA-проект/tools/ant/:
     # global  
     wn.bea.home=/u01/jdeveloper11.1.1.5  
     oracle.home=${wn.bea.home}/jdeveloper  
     java.passed.home=/u01/jdk1.6.0_30  
     wl_home=${wn.bea.home}/wlserver_10.3
      
     # temp  
     tmp.output.dir=/u01/tmp  
     junit.output.dir=../..  
      
     deployment.plan.environment=dev 
     
     # dev deployment server weblogic  
     dev.serverURL=http://192.168.2.130:9030   
     dev.user=weblogic    
     dev.password=welcome1   
     dev.overwrite=true 
     dev.forceDefault=true
     
     # testing deployment server weblogic  
     test.serverURL=http://192.168.2.130:8801  
     test.overwrite=true  
     test.user=weblogic  
     test.password=welcome1  
     test.forceDefault=true 
     
     # production deployment server weblogic  
     prod.serverURL=http://192.168.2.130:8001  
     prod.overwrite=true  
     prod.user=weblogic  
     prod.password=welcome1  
     prod.forceDefault=true  
    
    Если структура SVN-репозитория идентична структуре описанной на шаге 2, то изменить значения параметров выделенных красным и настройки развертывания.
  6. Отредактировать конфигурационный файл для каждого окружения (в нашем тестовом примере будем использовать только dev) - файл с именем <окружение>.jndi.properties (в нашем случае это dev.jndi.properties) в директорию SOA-проект/tools/ant/:
     java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory  
     java.naming.provider.url=t3://192.168.2.130:9030/soa-infra  
     java.naming.security.principal=weblogic  
     java.naming.security.credentials=welcome1  
     dedicated.connection=true  
     dedicated.rmicontext=true  
    
  7. Теперь настроим Hudson на наш тестовый пример.
    1. Зайти в консоль Hudson, затем "Настроить Hudson" -> "Конфигурирование системы":
    2. Добавляем в секцию JDK используемую версию, а в секцию Ant добавляем входящий в состав JDeveloper из директории jdeveloper/ant:
    3. Создать новую задачу для нашего SOA-проекта (для этого нажать "Новая задача" в консоли Hudson):
    4. Откроется меня настройки проекта (или нажать "Настроить проект"). В "Управление исходным кодом" выбрать "Subversion" и ввести "URL репозитория" - в нашем случае указываем путь до SOA-проекта:
      Если используется авторизация, то нажать "enter credential" и ввести параметры авторизации:
    5. В секции "Триггеры сборки" выбрать "Опрашивать SCM об изменениях" и ввести в поле расписание значение "* * * * *" (это значит что опрашивать каждую минуту):
    6. В секции "Сборка" выбрать "Добавить шаг сборки" и далее выбрать "Вызвать Ant":
    7. Заполнить поля следующим образом:
      • Версия Ant - jdev_ant;
      • Цели - deployProject;
      • Сборочный файл - tools/ant/build.xml;
      • Опции Java - -Dbasedir=/u01/jdeveloper11.1.1.5/jdeveloper/bin
    8. В секции "Послесборочные операции" выбрать "Publish JUnit test result report" и ввести значение "*.xml":
    9. Сохранить все настройки.
  8. Протестируем работоспособность.
    1. Изменяем любой файл в SVN-репозитории (в течении одной минуты будет запущена сборка);
    2. Нажав на кнопку "Собрать сейчас":
    Для просмотра технической информации по сборке, развертыванию, выполнению тестов можно увидеть в консоли задачи:
    Пример:
     Started by user sdevyatov  
     Reverting /var/lib/hudson/jobs/HelloWorldProject/workspace/. ignoreExternals: false  
     Updating http://127.0.0.1/repo/TestingApplication/HelloWorldProject revision: May 3, 2012 2:48:07 PM depth:infinity ignoreExternals: false  
     At revision 93  
     no change for http://127.0.0.1/repo/TestingApplication/HelloWorldProject since the previous build  
     [ant] $ /u01/jdeveloper11.1.1.5/jdeveloper/ant/bin/ant -file build.xml deployProject  
     Buildfile: build.xml  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] Please enter composite directory:  
       [input] Please enter composite name:  
       [input] Please enter composite revision:  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     deployProject:  
        [echo] deploy project HelloWorldProject for environment dev  
        [echo] deploy compositeName HelloWorldProject  
        [echo] deploy compositeDir /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../..  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] skipping input as property compositeDir has already been set.  
       [input] skipping input as property compositeName has already been set.  
       [input] skipping input as property revision has already been set.  
     Trying to override old definition of task scac  
     Trying to override old definition of task attachplan  
     Trying to override old definition of task extractplan  
     Trying to override old definition of task generateplan  
     Trying to override old definition of task validateplan  
     Trying to override old definition of task replaceRevision  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     clean:  
        [echo] deleting /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../deploy/sca_HelloWorldProject_rev1.0.jar  
       [delete] Deleting: /var/lib/hudson/jobs/HelloWorldProject/workspace/deploy/sca_HelloWorldProject_rev1.0.jar  
       
     init:  
       
     scac-validate:  
        [echo] Running scac-validate in /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../composite.xml  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] skipping input as property compositeDir has already been set.  
       [input] skipping input as property compositeName has already been set.  
       [input] skipping input as property revision has already been set.  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     scac:  
        [scac] Validating composite "/var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../composite.xml"  
        [scac] BPEL 2.0 validation of "BPELProcess1" took 99.9 milliseconds  
        [scac] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  
        [scac] >> modified xmlbean locale class in use  
        [scac] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  
        [scac] info: Validating composite "/var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../composite.xml"  
        [scac] info: Pass  
        [scac] info: File to validate does not exist fault-policies.xml:/var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../fault-policies.xml (No such file or directory)  
        [scac] info: Checking validateMessages....testsuites/TestCase2/messages  
        [scac] info: Begin validateIncludes....testsuites/TestCase2/includes  
        [scac] info: Begin validateTests....testsuites/TestCase2/tests  
        [scac] info:      Check validateTestDocument....testsuites/TestCase2/tests/Test2.1.xml  
        [scac] info:      Check doSchemaValidation....testsuites/TestCase2/tests/Test2.1.xml  
        [scac] info:      Check isSetInitiate ....testsuites/TestCase2/tests/Test2.1.xml  
        [scac] info:      Check WireActionsModel ....testsuites/TestCase2/tests/Test2.1.xml  
        [scac] info:      validateTestDocument Pass  
        [scac] info: validateTests Pass  
        [scac] info: Checking validateMessages....testsuites/TestCase1/messages  
        [scac] info: Begin validateIncludes....testsuites/TestCase1/includes  
        [scac] info: Begin validateTests....testsuites/TestCase1/tests  
        [scac] info:      Check validateTestDocument....testsuites/TestCase1/tests/Test1.xml  
        [scac] info:      Check doSchemaValidation....testsuites/TestCase1/tests/Test1.xml  
        [scac] info:      Check isSetInitiate ....testsuites/TestCase1/tests/Test1.xml  
        [scac] info:      Check WireActionsModel ....testsuites/TestCase1/tests/Test1.xml  
        [scac] info:      validateTestDocument Pass  
        [scac] info:      Check validateTestDocument....testsuites/TestCase1/tests/Test2.xml  
        [scac] info:      Check doSchemaValidation....testsuites/TestCase1/tests/Test2.xml  
        [scac] info:      Check isSetInitiate ....testsuites/TestCase1/tests/Test2.xml  
        [scac] info:      Check WireActionsModel ....testsuites/TestCase1/tests/Test2.xml  
        [scac] info:      validateTestDocument Pass  
        [scac] info: validateTests Pass  
       
     package:  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] skipping input as property compositeDir has already been set.  
       [input] skipping input as property compositeName has already been set.  
       [input] skipping input as property revision has already been set.  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     compile-source:  
       [mkdir] Created dir: /var/lib/hudson/jobs/HelloWorldProject/workspace/dist  
        [copy] Copying 28 files to /var/lib/hudson/jobs/HelloWorldProject/workspace/dist  
        [copy] Warning: /var/lib/hudson/jobs/HelloWorldProject/.adf not found.  
        [copy] Warning: /var/lib/hudson/jobs/HelloWorldProject/src not found.  
        [copy] Warning: /var/lib/hudson/jobs/HelloWorldProject/workspace/src not found.  
        [jar] Building jar: /var/lib/hudson/jobs/HelloWorldProject/workspace/deploy/sca_HelloWorldProject_rev1.0.jar  
       [delete] Deleting directory /var/lib/hudson/jobs/HelloWorldProject/workspace/dist  
        [echo] deploy on http://192.168.2.130:9030 with user weblogic  
        [echo] deploy sarFile /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../deploy/sca_HelloWorldProject_rev1.0.jar  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] Please enter composite directory:  
       [input] Please enter composite name:  
       [input] Please enter composite revision:  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     deploy:  
       [input] skipping input as property serverURL has already been set.  
       [input] skipping input as property sarLocation has already been set.  
     [deployComposite] setting user/password..., user=weblogic  
     [deployComposite] Processing sar=/var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../deploy/sca_HelloWorldProject_rev1.0.jar  
     [deployComposite] Adding sar file - /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../deploy/sca_HelloWorldProject_rev1.0.jar  
     [deployComposite] INFO: Creating HTTP connection to host:192.168.2.130, port:9030  
     [deployComposite] INFO: Received HTTP response from the server, response code=200  
     [deployComposite] ---->Deploying composite success.  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] Please enter composite directory:  
       [input] Please enter composite name:  
       [input] Please enter composite revision:  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     test:  
        [echo] Classpth = /u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-ext.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/oracle-soa-client-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel-common.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel.jar:/u01/jdeveloper11.1.1.5/wlserver_10.3/server/lib/weblogic.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-api.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-common.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-internal.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jrf_11.1.1/jrf-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-client-stubs-was.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.ejb.thinclient_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.orb_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/plugins/com.ibm.ws.runtime.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.admin.client_7.0.0.jar  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper HelloWorldProject  
        [echo] Using context = build.properties  
        [echo] Using path = /u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-ext.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/oracle-soa-client-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel-common.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel.jar:/u01/jdeveloper11.1.1.5/wlserver_10.3/server/lib/weblogic.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-api.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-common.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-internal.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jrf_11.1.1/jrf-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-client-stubs-was.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.ejb.thinclient_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.orb_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/plugins/com.ibm.ws.runtime.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.admin.client_7.0.0.jar  
       [input] skipping input as property scatest.input has already been set.  
       [input] skipping input as property jndi.properties.input has already been set.  
      [scatest] Junit formatting  
      [scatest] <testsuite name="sca.test-HelloWorldProject.TestCase1" tests="2" errors="0" failures="0" time="0.132"><properties><property name="db.type" value="oracle"/><property name="bpel.host.name" value="oracle-sb.tsretail.ru"/><property name="soa.oracle.home" value="/opt/Middleware/soa_11.1"/><property name="suite.start.date" value="2012-05-03T14:42:30.978+04:00"/><property name="suite.end.date" value="2012-05-03T14:42:31.110+04:00"/><property name="run.start.date" value="2012-05-03T14:42:30.978+04:00"/><property name="run.end.date" value="2012-05-03T14:42:31.163+04:00"/></properties><testcase name="Test1" classname="sca.test-HelloWorldProject.TestCase1.Test1" time="0.132"/><testcase name="Test2" classname="sca.test-HelloWorldProject.TestCase1.Test2" time="0.052"/></testsuite>  
      [scatest] /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../BPEL-sca.test-HelloWorldProject.TestCase1.xml  
      [scatest] <testsuite name="sca.test-HelloWorldProject.TestCase2" tests="1" errors="0" failures="0" time="0.102"><properties><property name="db.type" value="oracle"/><property name="bpel.host.name" value="oracle-sb.tsretail.ru"/><property name="soa.oracle.home" value="/opt/Middleware/soa_11.1"/><property name="suite.start.date" value="2012-05-03T14:42:31.061+04:00"/><property name="suite.end.date" value="2012-05-03T14:42:31.163+04:00"/><property name="run.start.date" value="2012-05-03T14:42:30.978+04:00"/><property name="run.end.date" value="2012-05-03T14:42:31.163+04:00"/></properties><testcase name="Test2.1" classname="sca.test-HelloWorldProject.TestCase2.Test2.1" time="0.102"/></testsuite>  
      [scatest] /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../BPEL-sca.test-HelloWorldProject.TestCase2.xml  
      [scatest] <testsuite name="sca.test-HelloWorldProject.codeCoverages" errors="0" failures="0" tests="0" time="0.0"/>  
      [scatest] /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../BPEL-sca.test-HelloWorldProject.codeCoverages.xml  
       
     BUILD SUCCESSFUL  
     Total time: 13 seconds  
     Recording test results   
     Finished: SUCCESS  
    
Исходные тексты используемого SOA-проекта здесь.

четверг, 3 мая 2012 г.

Виртуальная машина с Hudson и JDeveloper для целей непрерывной интеграции

В продолжении статьи об непрерывной интеграции Oracle SOA Suite выкладываю ссылки на загрузку сконфигурированной виртуальной машины VMware в соответствии с данным постом.
Установленное ПО:
  • Операционная система - Oracle Enterprise Linux 5 Update 7;
  • Сервер непрерывной интеграции - Hudson 2.2.0;
  • Система контроля версии - Subversion;
  • Oracle JDeveloper 11.1.1.5.
Ссылки на скачивание:
Явки и пароли:
  • Операционная система:
    • root/welcome1
    • oracle/welcome1
  • Subversion:
    • oracle/welcome1
P.S. если ссылки станут не валидны - напишите - выложу/обновлю.

пятница, 27 апреля 2012 г.

Автоматизация бэкапа проекта в JDeveloper

Пояснение: иногда требуется забэкапить текущий проект (это более актуально при SOA и BPM приложениям), но коммитить в систему контроля версии ещё нельзя (например, если сервер непрерывной интеграции слушает систему контроля версии и по изменениям запускается сборка, развертывание и тесты).
  • Настройка:
    1. Запустить JDeveloper;
    2. В меню "Tools" выбрать "External Tools...":
    3. Выбрать тип "External Program":
    4. Далее заполнить поля аналогично:
      В данном случае бэкапы будут складываться в директорию C:\JDeveloper\backups, если требуется то изменить на другую.
    5. Переименовать метку на кнопке:
    6. Поставить галку "Main Toolbar":
  • Проверка:
    1. Нажать на созданную кнопку "Backup Project" - появится окно с запросом ввода метки для данного бэкапа:
    2. В JDeveloper можно увидеть лог выполнения бэкапа:
    3. В директории указанной для бэкапа появится zip-архив проекта с меткой в имени файла:

вторник, 24 апреля 2012 г.

Непрерывная интеграция для Oracle SOA Suite 11g

Программное обеспечение:
  • Сервер непрерывной интеграции: Oracle Enterprise Linux 5.7, JDeveloper 11.1.1.5, Hudson 2.2.0;
  • Сервер SOA: Oracle SOA Suite 11.1.1.5.
С общим понятием об непрерывной интеграции можно ознакомиться здесь, так же рекомендую данную книгу.
В нашем примере к качестве интеграционного сервера будет использоваться Hudson и он будет последовательно выполнять следующие действия:
  1. Периодический опрос SVN-репозитория, в случае наличия изменений выполнение последующих шагов;
  2. Сборка композитов;
  3. Развертываение композитов на SOA-сервере;
  4. Выполнение автотестов;
  5. Публикация отчетов о тестировании.
Последовательность шагов:
  1. Скачиваем дистрибутив Hudson с официального сайта и устанавливаем его.
  2. Создадим в репозитории SNV следующую структуру:
  3. Создать тестовое SOA-приложение (в нашем случае это HelloWorldApplication), включая автотесты для этого приложения (подробнее об их создании для Oracle SOA Suite здесь).
  4. Добавим в SOA-приложение конфигурационный файл с именем build.properties:
    Следующего содержания:
     projects=HelloWorldProject,TestingProject  
     HelloWorldProject.revision=1.0  
     HelloWorldProject.partition=default  
     TestingProject.revision=1.0  
     TestingProject.partition=default  
    
  5. Для каждого композита сгенерировать "Configuration Plan":
    В наименование добавить суффикс dev (для разработческого окружения):
  6. Отредактировать конфигурационный файл build.properties находящийся в директории tools/ant/:
     # global  
     wn.bea.home=/u01/jdeveloper11.1.1.5  
     oracle.home=${wn.bea.home}/jdeveloper  
     java.passed.home=/u01/jdk1.6.0_30  
     wl_home=${wn.bea.home}/wlserver_10.3
      
     # temp  
     tmp.output.dir=/u01/tmp  
     junit.output.dir=../..  
     applications.home=../../apps  
     applications=HelloWorldApplication
      
     deployment.plan.environment=dev 
     
     # dev deployment server weblogic  
     dev.serverURL=http://192.168.2.130:9030   
     dev.user=weblogic    
     dev.password=welcome1   
     dev.overwrite=true 
     dev.forceDefault=true
     
     # testing deployment server weblogic  
     test.serverURL=http://192.168.2.130:8801  
     test.overwrite=true  
     test.user=weblogic  
     test.password=welcome1  
     test.forceDefault=true 
     
     # production deployment server weblogic  
     prod.serverURL=http://192.168.2.130:8001  
     prod.overwrite=true  
     prod.user=weblogic  
     prod.password=welcome1  
     prod.forceDefault=true  
    
    Если структура SVN-репозитория идентична структуре описанной на шаге 2, то изменить значения параметров выделенных красным и настройки развертывания.
  7. Отредактировать конфигурационный файл для каждого окружения (в нашем тестовом примере будем использовать только dev) - файл с именем <окружение>.jndi.properties (в нашем случае это dev.jndi.properties) в директорию tools/ant/:
     java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory  
     java.naming.provider.url=t3://192.168.2.130:9030/soa-infra  
     java.naming.security.principal=weblogic  
     java.naming.security.credentials=welcome1  
     dedicated.connection=true  
     dedicated.rmicontext=true  
    
  8. Теперь настроим Hudson на наш тестовый пример.
    1. Зайти в консоль Hudson, затем "Настроить Hudson" -> "Конфигурирование системы":
    2. Добавляем в секцию JDK используемую версию, а в секцию Ant добавляем входящий в состав JDeveloper из директории jdeveloper/ant:
    3. Создать новую задачу для нашего SOA-приложения (для этого нажать "Новая задача" в консоли Hudson):
    4. Откроется меня настройки проекта (или нажать "Настроить проект"). В "Управление исходным кодом" выбрать "Subversion" и ввести "URL репозитория":
      Если используется авторизация, то нажать "enter credential" и ввести параметры авторизации:
    5. В секции "Триггеры сборки" выбрать "Опрашивать SCM об изменениях" и ввести в поле расписание значение "* * * * *" (это значит что опрашивать каждую минуту):
    6. В секции "Сборка" выбрать "Добавить шаг сборки" и далее выбрать "Вызвать Ant":
    7. Заполнить поля следующим образом:
    8. В секции "Послесборочные операции" выбрать "Publish JUnit test result report" и ввести значение "*.xml":
    9. Сохранить все настройки.
  9. Протестируем работоспособность.
    1. Изменяем любой файл в SVN-репозитории (в течении одной минуты будет запущена сборка);
    2. Нажав на кнопку "Собрать сейчас":
    Для просмотра технической информации по сборке, развертыванию, выполнению тестов можно увидеть в консоли задачи:
    Пример:
     Started by user oracle  
     Updating http://autoteststand/repo/Projects revision: Apr 20, 2012 21:53:53 AM depth:infinity ignoreExternals: false  
     At revision 49  
     no change for http://autoteststand/repo/Projects since the previous build  
     [ant] $ /u01/jdeveloper11.1.1.5/jdeveloper/ant/bin/ant -file build.xml deployAll  
     Buildfile: build.xml  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] Please enter composite directory:  
       [input] Please enter composite name:  
       [input] Please enter composite revision:  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     deployAll:  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] Please enter composite directory:  
       [input] Please enter composite name:  
       [input] Please enter composite revision:  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     deployApplication:  
        [echo] deploy application HelloWorldApplication  
        [echo] deploy application.home ../../apps  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] Please enter composite directory:  
       [input] Please enter composite name:  
       [input] Please enter composite revision:  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     deployProject:  
        [echo] deploy project HelloWorldProject for environment dev  
        [echo] deploy compositeName HelloWorldProject  
        [echo] deploy compositeDir /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] skipping input as property compositeDir has already been set.  
       [input] skipping input as property compositeName has already been set.  
       [input] skipping input as property revision has already been set.  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     clean:  
        [echo] deleting /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/HelloWorldProject/deploy/sca_HelloWorldProject_rev1.0.jar  
       
     init:  
       [mkdir] Created dir: /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/HelloWorldProject/deploy  
       
     scac-validate:  
        [echo] Running scac-validate in /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/HelloWorldProject/composite.xml  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] skipping input as property compositeDir has already been set.  
       [input] skipping input as property compositeName has already been set.  
       [input] skipping input as property revision has already been set.  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     scac:  
        [scac] Validating composite "/var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/HelloWorldProject/composite.xml"  
        [scac] BPEL 2.0 validation of "BPELProcess1" took 136.1 milliseconds  
        [scac] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  
        [scac] >> modified xmlbean locale class in use  
        [scac] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  
        [scac] info: Validating composite "/var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/HelloWorldProject/composite.xml"  
        [scac] info: Pass  
        [scac] info: File to validate does not exist fault-policies.xml:/var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/HelloWorldProject/fault-policies.xml (No such file or directory)  
        [scac] info: Checking validateMessages....testsuites/TestCase2/messages  
        [scac] info: Begin validateIncludes....testsuites/TestCase2/includes  
        [scac] info: Begin validateTests....testsuites/TestCase2/tests  
        [scac] info:      Check validateTestDocument....testsuites/TestCase2/tests/Test2.1.xml  
        [scac] info:      Check doSchemaValidation....testsuites/TestCase2/tests/Test2.1.xml  
        [scac] info:      Check isSetInitiate ....testsuites/TestCase2/tests/Test2.1.xml  
        [scac] info:      Check WireActionsModel ....testsuites/TestCase2/tests/Test2.1.xml  
        [scac] info:      validateTestDocument Pass  
        [scac] info: validateTests Pass  
        [scac] info: Checking validateMessages....testsuites/TestCase1/messages  
        [scac] info: Begin validateIncludes....testsuites/TestCase1/includes  
        [scac] info: Begin validateTests....testsuites/TestCase1/tests  
        [scac] info:      Check validateTestDocument....testsuites/TestCase1/tests/Test1.xml  
        [scac] info:      Check doSchemaValidation....testsuites/TestCase1/tests/Test1.xml  
        [scac] info:      Check isSetInitiate ....testsuites/TestCase1/tests/Test1.xml  
        [scac] info:      Check WireActionsModel ....testsuites/TestCase1/tests/Test1.xml  
        [scac] info:      validateTestDocument Pass  
        [scac] info:      Check validateTestDocument....testsuites/TestCase1/tests/Test2.xml  
        [scac] info:      Check doSchemaValidation....testsuites/TestCase1/tests/Test2.xml  
        [scac] info:      Check isSetInitiate ....testsuites/TestCase1/tests/Test2.xml  
        [scac] info:      Check WireActionsModel ....testsuites/TestCase1/tests/Test2.xml  
        [scac] info:      validateTestDocument Pass  
        [scac] info: validateTests Pass  
       
     package:  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] skipping input as property compositeDir has already been set.  
       [input] skipping input as property compositeName has already been set.  
       [input] skipping input as property revision has already been set.  
     Trying to override old definition of task scac  
     Trying to override old definition of task attachplan  
     Trying to override old definition of task extractplan  
     Trying to override old definition of task generateplan  
     Trying to override old definition of task validateplan  
     Trying to override old definition of task replaceRevision  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     compile-source:  
       [mkdir] Created dir: /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/HelloWorldProject/dist  
        [copy] Copying 19 files to /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/HelloWorldProject/dist  
        [copy] Warning: /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/HelloWorldProject/src not found.  
        [copy] Copying 2 files to /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/HelloWorldProject/dist/SCA-INF/classes  
        [jar] Building jar: /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/HelloWorldProject/deploy/sca_HelloWorldProject_rev1.0.jar  
       [delete] Deleting directory /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/HelloWorldProject/dist  
        [echo] deploy on http://192.168.2.130:9030 with user weblogic  
        [echo] deploy sarFile /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/HelloWorldProject/deploy/sca_HelloWorldProject_rev1.0.jar  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] Please enter composite directory:  
       [input] Please enter composite name:  
       [input] Please enter composite revision:  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     deploy:  
       [input] skipping input as property serverURL has already been set.  
       [input] skipping input as property sarLocation has already been set.  
     [deployComposite] setting user/password..., user=weblogic  
     [deployComposite] Processing sar=/var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/HelloWorldProject/deploy/sca_HelloWorldProject_rev1.0.jar  
     [deployComposite] Adding sar file - /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/HelloWorldProject/deploy/sca_HelloWorldProject_rev1.0.jar  
     [deployComposite] INFO: Creating HTTP connection to host:192.168.2.130, port:9030  
     [deployComposite] INFO: Received HTTP response from the server, response code=200  
     [deployComposite] ---->Deploying composite success.  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] Please enter composite directory:  
       [input] Please enter composite name:  
       [input] Please enter composite revision:  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     test:  
        [echo] Classpth = /u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-ext.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/oracle-soa-client-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel-common.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel.jar:/u01/jdeveloper11.1.1.5/wlserver_10.3/server/lib/weblogic.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-api.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-common.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-internal.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jrf_11.1.1/jrf-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-client-stubs-was.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.ejb.thinclient_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.orb_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/plugins/com.ibm.ws.runtime.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.admin.client_7.0.0.jar  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper HelloWorldProject  
        [echo] Using context = build.properties  
        [echo] Using path = /u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-ext.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/oracle-soa-client-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel-common.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel.jar:/u01/jdeveloper11.1.1.5/wlserver_10.3/server/lib/weblogic.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-api.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-common.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-internal.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jrf_11.1.1/jrf-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-client-stubs-was.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.ejb.thinclient_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.orb_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/plugins/com.ibm.ws.runtime.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.admin.client_7.0.0.jar  
       [input] skipping input as property scatest.input has already been set.  
       [input] skipping input as property jndi.properties.input has already been set.  
      [scatest] Junit formatting  
      [scatest] <testsuite name="sca.test-HelloWorldProject.TestCase1" tests="2" errors="0" failures="0" time="0.313"><properties><property name="db.type" value="oracle"/><property name="bpel.host.name" value="oracle-sb.tsretail.ru"/><property name="soa.oracle.home" value="/opt/Middleware/soa_11.1"/><property name="suite.start.date" value="2012-04-20T11:51:18.297+04:00"/><property name="suite.end.date" value="2012-04-20T11:51:18.610+04:00"/><property name="run.start.date" value="2012-04-20T11:51:18.297+04:00"/><property name="run.end.date" value="2012-04-20T11:51:18.644+04:00"/></properties><testcase name="Test1" classname="sca.test-HelloWorldProject.TestCase1.Test1" time="0.313"/><testcase name="Test2" classname="sca.test-HelloWorldProject.TestCase1.Test2" time="0.067"/></testsuite>  
      [scatest] /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../BPEL-sca.test-HelloWorldProject.TestCase1.xml  
      [scatest] <testsuite name="sca.test-HelloWorldProject.TestCase2" tests="1" errors="0" failures="0" time="0.115"><properties><property name="db.type" value="oracle"/><property name="bpel.host.name" value="oracle-sb.tsretail.ru"/><property name="soa.oracle.home" value="/opt/Middleware/soa_11.1"/><property name="suite.start.date" value="2012-04-20T11:51:18.529+04:00"/><property name="suite.end.date" value="2012-04-20T11:51:18.644+04:00"/><property name="run.start.date" value="2012-04-20T11:51:18.297+04:00"/><property name="run.end.date" value="2012-04-20T11:51:18.644+04:00"/></properties><testcase name="Test2.1" classname="sca.test-HelloWorldProject.TestCase2.Test2.1" time="0.115"/></testsuite>  
      [scatest] /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../BPEL-sca.test-HelloWorldProject.TestCase2.xml  
      [scatest] <testsuite name="sca.test-HelloWorldProject.codeCoverages" errors="0" failures="0" tests="0" time="0.0"/>  
      [scatest] /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../BPEL-sca.test-HelloWorldProject.codeCoverages.xml  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] Please enter composite directory:  
       [input] Please enter composite name:  
       [input] Please enter composite revision:  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     deployProject:  
        [echo] deploy project TestingProject for environment dev  
        [echo] deploy compositeName TestingProject  
        [echo] deploy compositeDir /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] skipping input as property compositeDir has already been set.  
       [input] skipping input as property compositeName has already been set.  
       [input] skipping input as property revision has already been set.  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     clean:  
        [echo] deleting /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/TestingProject/deploy/sca_TestingProject_rev1.0.jar  
       
     init:  
       [mkdir] Created dir: /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/TestingProject/deploy  
       
     scac-validate:  
        [echo] Running scac-validate in /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/TestingProject/composite.xml  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] skipping input as property compositeDir has already been set.  
       [input] skipping input as property compositeName has already been set.  
       [input] skipping input as property revision has already been set.  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     scac:  
        [scac] Validating composite "/var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/TestingProject/composite.xml"  
        [scac] BPEL 2.0 validation of "TestBPELProcess" took 1.412 seconds  
        [scac] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  
        [scac] >> modified xmlbean locale class in use  
        [scac] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  
        [scac] info: Validating composite "/var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/TestingProject/composite.xml"  
        [scac] info: Pass  
        [scac] info: File to validate does not exist fault-policies.xml:/var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/TestingProject/fault-policies.xml (No such file or directory)  
        [scac] info: Checking validateMessages....testsuites/TestSuite1/messages  
        [scac] info: Begin validateIncludes....testsuites/TestSuite1/includes  
        [scac] info: Begin validateTests....testsuites/TestSuite1/tests  
        [scac] info:      Check validateTestDocument....testsuites/TestSuite1/tests/Test2.1.xml  
        [scac] info:      Check doSchemaValidation....testsuites/TestSuite1/tests/Test2.1.xml  
        [scac] info:      Check isSetInitiate ....testsuites/TestSuite1/tests/Test2.1.xml  
        [scac] info:      Check WireActionsModel ....testsuites/TestSuite1/tests/Test2.1.xml  
        [scac] info:      Check WireActionsModel ....testsuites/TestSuite1/tests/Test2.1.xml  
        [scac] info:      validateTestDocument Pass  
        [scac] info:      Check validateTestDocument....testsuites/TestSuite1/tests/Test2.2.xml  
        [scac] info:      Check doSchemaValidation....testsuites/TestSuite1/tests/Test2.2.xml  
        [scac] info:      Check isSetInitiate ....testsuites/TestSuite1/tests/Test2.2.xml  
        [scac] info:      Check WireActionsModel ....testsuites/TestSuite1/tests/Test2.2.xml  
        [scac] info:      validateTestDocument Pass  
        [scac] info:      Check validateTestDocument....testsuites/TestSuite1/tests/Test3.0.xml  
        [scac] info:      Check doSchemaValidation....testsuites/TestSuite1/tests/Test3.0.xml  
        [scac] info:      Check isSetInitiate ....testsuites/TestSuite1/tests/Test3.0.xml  
        [scac] info:      Check WireActionsModel ....testsuites/TestSuite1/tests/Test3.0.xml  
        [scac] info:      Check WireActionsModel ....testsuites/TestSuite1/tests/Test3.0.xml  
        [scac] info:      validateTestDocument Pass  
        [scac] info:      Check validateTestDocument....testsuites/TestSuite1/tests/Test1.1.xml  
        [scac] info:      Check doSchemaValidation....testsuites/TestSuite1/tests/Test1.1.xml  
        [scac] info:      Check isSetInitiate ....testsuites/TestSuite1/tests/Test1.1.xml  
        [scac] info:      Check WireActionsModel ....testsuites/TestSuite1/tests/Test1.1.xml  
        [scac] info:      validateTestDocument Pass  
        [scac] info: validateTests Pass  
       
     package:  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] skipping input as property compositeDir has already been set.  
       [input] skipping input as property compositeName has already been set.  
       [input] skipping input as property revision has already been set.  
     Trying to override old definition of task scac  
     Trying to override old definition of task attachplan  
     Trying to override old definition of task extractplan  
     Trying to override old definition of task generateplan  
     Trying to override old definition of task validateplan  
     Trying to override old definition of task replaceRevision  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     compile-source:  
       [mkdir] Created dir: /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/TestingProject/dist  
        [copy] Copying 18 files to /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/TestingProject/dist  
        [copy] Warning: /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/TestingProject/src not found.  
        [copy] Copying 2 files to /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/TestingProject/dist/SCA-INF/classes  
        [jar] Building jar: /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/TestingProject/deploy/sca_TestingProject_rev1.0.jar  
       [delete] Deleting directory /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/TestingProject/dist  
        [echo] deploy on http://192.168.2.130:9030 with user weblogic  
        [echo] deploy sarFile /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/TestingProject/deploy/sca_TestingProject_rev1.0.jar  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] Please enter composite directory:  
       [input] Please enter composite name:  
       [input] Please enter composite revision:  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     deploy:  
       [input] skipping input as property serverURL has already been set.  
       [input] skipping input as property sarLocation has already been set.  
     [deployComposite] setting user/password..., user=weblogic  
     [deployComposite] Processing sar=/var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/TestingProject/deploy/sca_TestingProject_rev1.0.jar  
     [deployComposite] Adding sar file - /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/TestingProject/deploy/sca_TestingProject_rev1.0.jar  
     [deployComposite] INFO: Creating HTTP connection to host:192.168.2.130, port:9030  
     [deployComposite] INFO: Received HTTP response from the server, response code=200  
     [deployComposite] ---->Deploying composite success.  
        [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin  
        [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
        [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       [input] Please enter composite directory:  
       [input] Please enter composite name:  
       [input] Please enter composite revision:  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper  
       
     test:  
        [echo] Classpth = /u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-ext.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/oracle-soa-client-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel-common.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel.jar:/u01/jdeveloper11.1.1.5/wlserver_10.3/server/lib/weblogic.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-api.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-common.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-internal.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jrf_11.1.1/jrf-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-client-stubs-was.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.ejb.thinclient_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.orb_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/plugins/com.ibm.ws.runtime.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.admin.client_7.0.0.jar  
        [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper TestingProject  
        [echo] Using context = build.properties  
        [echo] Using path = /u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-ext.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/oracle-soa-client-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel-common.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel.jar:/u01/jdeveloper11.1.1.5/wlserver_10.3/server/lib/weblogic.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-api.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-common.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-internal.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jrf_11.1.1/jrf-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-client-stubs-was.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.ejb.thinclient_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.orb_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/plugins/com.ibm.ws.runtime.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.admin.client_7.0.0.jar  
       [input] skipping input as property scatest.input has already been set.  
       [input] skipping input as property jndi.properties.input has already been set.  
      [scatest] Junit formatting  
      [scatest] <testsuite name="sca.test-TestingProject.TestSuite1" tests="4" errors="0" failures="0" time="7.389"><properties><property name="db.type" value="oracle"/><property name="bpel.host.name" value="oracle-sb.tsretail.ru"/><property name="soa.oracle.home" value="/opt/Middleware/soa_11.1"/><property name="suite.start.date" value="2012-04-20T11:51:46.894+04:00"/><property name="suite.end.date" value="2012-04-20T11:51:54.283+04:00"/><property name="run.start.date" value="2012-04-20T11:51:46.894+04:00"/><property name="run.end.date" value="2012-04-20T11:51:54.283+04:00"/></properties><testcase name="Test3.0" classname="sca.test-TestingProject.TestSuite1.Test3.0" time="0.166"/><testcase name="Test2.1" classname="sca.test-TestingProject.TestSuite1.Test2.1" time="0.224"/><testcase name="Test1.1" classname="sca.test-TestingProject.TestSuite1.Test1.1" time="7.346"/><testcase name="Test2.2" classname="sca.test-TestingProject.TestSuite1.Test2.2" time="7.304"/></testsuite>  
      [scatest] /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../BPEL-sca.test-TestingProject.TestSuite1.xml  
      [scatest] <testsuite name="sca.test-TestingProject.codeCoverages" errors="0" failures="0" tests="0" time="0.0"/>  
      [scatest] /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../BPEL-sca.test-TestingProject.codeCoverages.xml  
       
     BUILD SUCCESSFUL  
     Total time: 1 minute 7 seconds  
     Recording test results  
     [DEBUG] Skipping watched dependency update; build not configured with trigger: HelloWorldApplication #2  
     Finished: SUCCESS  
    
Экспорт из SVN-репозитория здесь.

P.S. см. так же статью Непрерывная интеграция для Oracle SOA Suite 11g. Альтернативный вариант

воскресенье, 22 апреля 2012 г.

Рекомендации по настройке JVM для Weblogic Server в промышленном окружении

Внимание: описанные ниже рекомендации являются общими без учёта специфики конкретных приложений выполняющихся на сервере приложений Weblogic (например: некоторые фреймворки генерируют большое количество временных объектов, для этого случая, рекомендуется сделать размер nursery больше чем в общей рекомендации, но после проведения мониторинга JVM).

Общие рекомендации для любой JVM:
  • Установите одинаковый размер для initial heap size (параметр -Xms) и maximum heap size (параметр -Xmx);
  • Установить размер heap-а немного больше того, с которого нагрузочные тесты перестают получают исключение Out-of-Memory;
  • Не устанавливайте суммарный размер heap-а всех сервером на физической машине (с точки зрения ОС) больше чем 75% доступной памята.
Рекомендации для JRockit JVM:
  • Установите размер nursery (параметр -Xns) примерно 25-40% от размера heap-а;
  • Установите приоритетный уровень (параметр -XgcPrio) для сборщика мусора на значение по-умолчанию, т.е. throughput.
Рекомендации для Sun JVM:
  • Установите одинаковый размер для initial New Space (параметр -XX:NewSize) и maximum New Space (параметр -XX:MaxNewSize);
  • Установите значение New Space примерно 25% от размера heap-а;
  • Установите Survivor Ratio (параметр -XX:SurvivorRatio) значение 8.