htsDeployTool.bat 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. @echo off
  2. rem *********************************************************************************************************************************
  3. rem * Licensed Materials - Property of IBM *
  4. rem * *
  5. rem * IBM Cognos Products: HTS *
  6. rem * *
  7. rem * (C) Copyright IBM Corp. 2005, 2019 *
  8. rem * *
  9. rem * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. *
  10. rem *********************************************************************************************************************************
  11. rem *************** HTS Export *********************
  12. rem ** This batch is designed to export Human task service task data
  13. rem ** -exportFile
  14. rem ** the exportFile will be created in deployment folder and given a .xml.gz extension if you dont provide one
  15. rem ** -password
  16. rem ** this file will be encrypted if you provide this argument, in which case it will necessary to supply the password when you import
  17. rem ** -camNamespace, -camUsername, -camPassword
  18. rem ** when running deploy from bin the server must be running and if a secure namespace is defined, the details entered with these parameters
  19. rem ** -persistenceUnit
  20. rem ** defaults to humanTaskService but can be annotations
  21. rem ************************************************
  22. rem *************** HTS Import *********************
  23. rem ** This batch is designed to import Human task service task data
  24. rem ** -importFile
  25. rem ** the importFile must point to a valid Human task service export file
  26. rem ** -password
  27. rem ** this file may be encrypted, in which case it is necessary to supply the password with the -password argument
  28. rem ** -camNamespace, -camUsername, -camPassword
  29. rem ** when running deploy from bin the server must be running and if a secure namespace is defined, the details entered with these parameters
  30. rem ** -overwrite
  31. rem ** still a work in progress
  32. rem ** -persistenceUnit
  33. rem ** defaults to humanTaskService but can be annotations
  34. rem ************************************************
  35. rem ---------------------------------------------------------------------------
  36. rem Shell script (Windows) to invoke jre and launch IBM Cognos Human task service import.
  37. rem
  38. rem When exporting, all human tasks will be sent to an xml file in the deployment folder.
  39. rem at export time, cm is called to resolve all store ids into search paths.
  40. rem use the htsExportAll batch to export
  41. rem
  42. rem to import the deployment file must be physically moved to the deployment folder of the target system
  43. rem When importing all search paths will be resolved into store ids on the target system.
  44. rem use the htsImporttAll batch to import
  45. rem
  46. rem
  47. rem J_HOME is the location of the Java RE installation; if JAVA_HOME is
  48. rem defined, use it. Otherwise default to the local distribution.
  49. rem J_OPTS are the Java options to be passed into the JAVA VM (optional)
  50. rem ---------------------------------------------------------------------------
  51. rem If the argument -java:{env | local} is present as first argument then the required JRE will be
  52. rem loaded: -java:env will force the script to look for JRE using JAVA_HOME environment variable.
  53. rem If not found then it will end by an error. The argument -java:local will force it to look
  54. rem for JRE within the local distribution. If not found then it will end by an error.
  55. rem Otherwise, the script will default by looking for a JRE using the JAVA_HOME environment
  56. rem variable, then if cannot find one, it will try to use the local distribution.
  57. rem ----- Verify and Set Required Environment Variables -----------------------
  58. rem check if we need to run the local jre
  59. rem Shift the first argument: -java:local
  60. if "%1" == "-java:local" (shift & goto useLocal)
  61. rem Try first the use of JAVA_HOME
  62. goto useEnvVar
  63. :useEnvVarOnly
  64. rem JAVA_HOME should be defined first.
  65. if "%JAVA_HOME%" == "" goto JavaHomeError
  66. set J_HOME=%JAVA_HOME%
  67. echo Looking for JRE in: %J_HOME%\bin...
  68. if exist "%J_HOME%\bin\java.exe" goto gotJava
  69. set J_HOME=%JAVA_HOME%\jre
  70. echo Looking for JRE in: %J_HOME%\jre\bin...
  71. if exist "%J_HOME%\bin\java.exe" goto gotJava
  72. :JavaHomeError
  73. echo You have specified the argument '-java:env'.
  74. echo However, the environment variable JAVA_HOME is not defined or incorrectly defined.
  75. echo Please define JAVA_HOME first before using the argument '-java:env'.
  76. goto finish
  77. :useLocal
  78. rem Using the local distribution either because -java:local was
  79. rem specified or because the JAVA_HOME environment variable
  80. rem is not defined or if the JAVA_HOME location doesn't have a JRE.
  81. set J_HOME=..\ibm-jre\jre
  82. echo Looking for JRE in: %J_HOME%\bin...
  83. if exist "%J_HOME%\bin\java.exe" goto gotJava
  84. rem Did not find a JRE in the local location, display error and exit.
  85. goto error
  86. :useEnvVar
  87. rem Shift the first argument: -java:env
  88. if "%1" == "-java:env" (shift & goto useEnvVarOnly)
  89. rem Using the distribution referred by JAVA_HOME because
  90. rem -java:local was NOT specified and the JAVA_HOME environment
  91. rem variable is defined.
  92. set J_HOME=%JAVA_HOME%
  93. echo Looking for JRE in: %J_HOME%\bin...
  94. if exist "%J_HOME%\bin\java.exe" goto gotJava
  95. set J_HOME=%JAVA_HOME%\jre
  96. echo Looking for JRE in: %J_HOME%\bin...
  97. if exist "%J_HOME%\bin\java.exe" goto gotJava
  98. rem Did not find a JRE in the environment variable's location. If the
  99. rem -java:env argument was not specified, try the local distribution.
  100. if not "%1" == "-java:env" goto useLocal
  101. :error
  102. echo Could not find a JRE. Cannot run IBM Cognos Configuration.
  103. goto finish
  104. :gotJava
  105. rem ----- Prepare Appropriate Java Execution Commands -------------------------
  106. set _RUNJAVA="%J_HOME%\bin\java"
  107. echo java is %_RUNJAVA%
  108. set CP=../webapps/p2pd/WEB-INF/classes;../webapps/p2pd/WEB-INF/lib/hts.jar;../webapps/p2pd/WEB-INF/lib/JSQLConnect.jar;../webapps/p2pd/WEB-INF/lib/zipi.jar;../webapps/p2pd/WEB-INF/lib/activation.jar;../webapps/p2pd/WEB-INF/lib/axis.jar;../webapps/p2pd/WEB-INF/lib/axisCrnpClient.jar;../webapps/p2pd/WEB-INF/lib/cclcfgapi.jar;../webapps/p2pd/WEB-INF/lib/cclcoreutil.jar;../webapps/p2pd/WEB-INF/lib/CognosIPF.jar;../webapps/p2pd/WEB-INF/lib/commons-configuration-1.5.jar;../webapps/p2pd/WEB-INF/lib/commons-discovery-0.2.jar;../webapps/p2pd/WEB-INF/lib/commons-httpclient-3.1.jar;../webapps/p2pd/WEB-INF/lib/commons-codec-1.3.jar;../webapps/p2pd/WEB-INF/lib/commons-io-2.4.jar;../webapps/p2pd/WEB-INF/lib/commons-lang-2.6.jar;../webapps/p2pd/WEB-INF/lib/commons-logging-1.1.jar;../webapps/p2pd/WEB-INF/lib/commons-pool-1.3.jar;../webapps/p2pd/WEB-INF/lib/concurrent.jar;../webapps/p2pd/WEB-INF/lib/dom4j-1.6.1.jar;../webapps/p2pd/WEB-INF/lib/i18nj.jar;../webapps/p2pd/WEB-INF/lib/jakarta-oro-2.0.8.jar;../webapps/p2pd/WEB-INF/lib/javacc.jar;../webapps/p2pd/WEB-INF/lib/jaxrpc.jar;../webapps/p2pd/WEB-INF/lib/jcam_crypto.jar;./jcam_jni.jar;../webapps/p2pd/WEB-INF/lib/log4j-1.2.8.jar;../webapps/p2pd/WEB-INF/lib/logkit-1.2.jar;../webapps/p2pd/WEB-INF/lib/mail.jar;../webapps/p2pd/WEB-INF/lib/p2pd.jar;../webapps/p2pd/WEB-INF/lib/saaj.jar;../webapps/p2pd/WEB-INF/lib/soap.jar;../webapps/p2pd/WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar;../webapps/p2pd/WEB-INF/lib/wsdl4j-1.5.1.jar;../webapps/p2pd/WEB-INF/lib/wsif.jar;../webapps/p2pd/WEB-INF/lib/xalan.jar;../webapps/p2pd/WEB-INF/lib/xml-apis.jar;../webapps/p2pd/WEB-INF/lib/xmlsec-1.4.3.jar;../webapps/p2pd/WEB-INF/lib/xts.jar;../webapps/p2pd/WEB-INF/lib/xtsext.jar;../tomcat/lib/tools.jar;../tomcat/lib/servlet-api.jar;.//ant.jar;.//cclcfgapi.jar;../webapps/p2pd/WEB-INF/lib/rdsclient.jar;../webapps/p2pd/WEB-INF/lib/uddi4j.jar;../webapps/p2pd/WEB-INF/lib/serp-1.13.1.jar;../webapps/p2pd/WEB-INF/lib/commons-collections-3.2.1.jar;../webapps/p2pd/WEB-INF/lib/commons-pool-1.3.jar;../webapps/p2pd/WEB-INF/lib/geronimo-jta_1.1_spec-1.1.jar;../webapps/p2pd/WEB-INF/lib/openjpa-1.2.1.jar;../webapps/p2pd/WEB-INF/lib/pf.jar;../webapps/p2pd/WEB-INF/lib/json.jar;../webapps/p2pd/WEB-INF/lib/caf.jar;../webapps/p2pd/WEB-INF/lib/jsm-common.jar;../webapps/p2pd/WEB-INF/lib/noticecast.jar;../webapps/p2pd/WEB-INF/lib/geronimo-jpa_3.0_spec-1.0.jar;../webapps/p2pd/WEB-INF/lib/cognos-ws-ht.jar;../webapps/p2pd/WEB-INF/lib/xbean.jar;../bin/slf4j-api-1.7.23.jar;../bin/slf4j-nop-1.7.23.jar;./*.jar
  109. %_RUNJAVA% -cp %CP% %J_OPTS% com.ibm.cognos.internal.hts.deployment.DeploymentTool %*
  110. :finish