# DCjdev.ctl:367:Collects Oracle JDeveloper Information # $Id: DCjdev.ctl,v 1.20 2015/10/28 14:51:34 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/OFM/DCjdev.ctl,v 1.20 2015/10/28 14:51:34 RDA Exp $ # # Change History # 20151027 KRA Improve 'Product Information' report. =head1 NAME OFM:DCjdev - Collects Oracle JDeveloper Information =head1 DESCRIPTION This module collects Oracle JDeveloper-related diagnostic information. The following reports can be generated and are regrouped under C: =head1 REPORTS =cut echo tput('bold'),'Processing OFM.JDEV module ...',tput('off') # Initialization var $APPL_ROOT = ${D_APPL_ROOT:''} var $JDEV_HOME = ${D_HOME:''} var $MW_HOME = ${D_MW_HOME:''} var $MOD = cond(isUnix(),'fx','fr') var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' toc '1:Oracle JDeveloper' # Load the libraries run RDA:INVinfo() run RDA:library() # Set the JDEV symbols if ${B_REQ_WREQ/E} call setSymbol('$MH',$MW_HOME) =head1 ORACLE HOME COLLECTIONS =head2 abbr - Abbreviations Displays the RDA abbreviations defined for the Oracle JDeveloper home collection. =cut debug ' Inside JDEV module, collecting defined abbreviations' report abbr prefix {write '---+ Oracle JDeveloper Home Abbreviations' write '|*Abbreviation*|*Location*|' } var %hsh = getSymbols() loop $key (keys(%hsh)) write '|',$key,' |',$hsh{$key},' |' if isCreated(true) toc '2:[[',getFile(),'][rda_report][Abbreviations]]' =head2 product_info - Product Information Gathers the Oracle JDeveloper product information. =cut if ?nvl(testDir('d',catDir($dir = $MW_HOME,'inventory')),\ testDir('d',catDir($dir = $JDEV_HOME,'inventory'))) {debug ' Inside JDEV module, processing Product Information (can take time)' report product_info title '---+!! JDeveloper Oracle Home Product Information' title '---## From ',encode($dir),' ' title $TOC prefix write '---+ Files in JDeveloper Home' call statDir('an',$JDEV_HOME) if hasOutput(true) write $TOP call inventory_details(lastTestDir(),true) if isCreated() toc '2:[[',getFile(),'][rda_report][Product Information]]' } =head2 env - Environment Variables Collects important environment variables. =cut debug ' Inside JDEV module, collecting important environment variables' report env write '---+ Important Environment Variables' write '|*Variable*|*Value*|' loop $key ('JDEV_USER_DIR','JDEV_USER_HOME') write '|',$key,' |',getEnv($key),' |' if isCreated() toc '2:[[',getFile(),'][rda_report][Environment Variables]]' =head2 jdk_version - JDK Version For Oracle JDeveloper version 11g and later, determine the available JDK version. =cut # Macro to get the JDK version macro get_jdk_version {var ($dir,$ttl) = @arg import $JAVA_CMD,$MOD,$TOP keep $JAVA_CMD,$MOD,$TOP if ?testFile($MOD,catFile($dir,'bin',${AS.EXE:'java'})) {var $cmd = last write '---+ ',$ttl write '---## JDK Location: ',encode(addSymbol($cmd)) call statFile('b',$cmd) write '---++!! JDK Full Version' call writeCommand(concat($cmd = quote($cmd),' -fullversion 2>&1')) write $TOP if !?$JAVA_CMD var $JAVA_CMD = $cmd } } debug ' Inside JDEV module, gathering JDK version' var $JAVA_CMD = undef report jdk_version title '---+!! JDK Version Information' title $TOC call get_jdk_version(first(findDir($MW_HOME,'^jdk','p')),\ 'OFM Environment (jdk)') call get_jdk_version(first(findDir($MW_HOME,'^jrockit_','p')),\ 'OFM Environment (jrockit)') call get_jdk_version(catDir($MW_HOME,'oracle_common','jdk'),\ 'OFM Environment (jdk)') if grepFile(catFile($JDEV_HOME,'.product.properties'),\ '^JDEV_JAVA_HOME=\s*(.*)\s*$','f1') call get_jdk_version(first(last),'JDeveloper IDE') if !hasOutput(true) write '**No JDK found.**' if isCreated() toc '2:[[',getFile(),'][rda_report][JDK Version]]' =head2 adf_version - ADF Run-Time Version Determines the ADF run-time version information. =cut if ?$JAVA_CMD var $cmd = last elsif ?findCommand('java') var $cmd = last else var $cmd = undef if ?$cmd {debug ' Inside JDEV module, gathering ADF run-time version' if ?nvl(testFile('fr',\ catFile($MW_HOME,'oracle_common','modules',\ "oracle.adf.model_\061\062\056\061\056\063",'adfm.jar')),\ testFile('fr',\ catFile($MW_HOME,'oracle_common','modules',\ "oracle.adf.model_\061\062\056\061\056\062",'adfm.jar')),\ testFile('fr',\ catFile($MW_HOME,'oracle_common','modules',\ "oracle.adf.model_\061\061\056\061\056\061",'adfm.jar')),\ testFile('fr',catFile($JDEV_HOME,'BC4J','lib','bc4jmt.jar'))) {var $cmd = concat($cmd,' -cp ',lastTestCommand(),\ ' oracle.jbo.common.PrintVersion') report adf_version prefix {write '---+ ADF Run-Time Version Information' write '---## Using: ',encode($cmd) } call writeCommand($cmd) if isCreated(true) toc '2:[[',getFile(),'][rda_report][ADF Run-Time Version]]' } } =head2 adfdi_hc - ADF Desktop Integration Health Check Collects the ADF desktop integration health check information (Windows only). =cut if ?testFile($MOD,${F_ADFDI}) {debug ' Inside JDEV module, gathering ADFDI health check information' var $out = newTemp('ADFDI') if loadCommand($cmd = concat(lastTestCommand(),' ',$out,' 2>&1')) {report adfdi_hc prefix {write '---+ ADF Desktop Integration Health Check Information' write '---## Using: ',encode($cmd) } call writeFile($out,['C','AdfdiHealthCheck']) if isCreated(true) {write $TOP toc '2:[[',getFile(),'][rda_report][ADF Desktop Integration Health Check]]' } } call unlinkTemp('ADFDI') } =head2 Installation Files For Oracle JDeveloper 11g and later, gathers following JDeveloper installation files: =over 4 =item o F<$JDEV_HOME/.home> =item o F<$JDEV_HOME/.product.properties> =item o F<$JDEV_HOME/cfgtoollogs/opatch/*.log> =item o F<$JDEV_HOME/cfgtoollogs/opatch/*.txt> =item o F<$MW_HOME/cfgtoollogs/opatch/*.log> =item o F<$MW_HOME/cfgtoollogs/opatch/*.txt> =item o F<$MW_HOME/registry.xml> =item o F<$MW_HOME/logs/log.txt> =back =cut debug ' Inside JDEV module, gathering JDeveloper installation files' pretoc '2:Installation Files' call sort_files(3,0,\ catFile($JDEV_HOME,'.home'),\ catFile($JDEV_HOME,'.product.properties'),\ grepDir(catDir($JDEV_HOME,'cfgtoollogs','opatch'),'\.(log|txt)$','np'),\ grepDir(catDir($MW_HOME,'cfgtoollogs','opatch'),'\.(log|txt)$','np'),\ catFile($MW_HOME,'registry.xml'),\ catFile($MW_HOME,'logs','log.txt')) unpretoc =head2 Script Files Collects the script files from the following directories: =over 4 =item o F<$JDEV_HOME/ide/bin> =item o F<$JDEV_HOME/jdev/bin> =back =cut debug ' Inside JDEV module, gathering script files' pretoc '2:Script Files' call sort_files(3,0,grepDir(catDir($JDEV_HOME,'ide','bin'),'^\.+$','npv'),\ grepDir(catDir($JDEV_HOME,'jdev','bin'),'^\.+$','npv')) unpretoc =head2 Oracle JDeveloper Libraries Lists the Oracle JDeveloper libraries present in the following directories: =over 4 =item o F<$JDEV_HOME/jdev/extensions> =item o F<$JDEV_HOME/jdev/lib> =item o F<$JDEV_HOME/jdev/lib/patches> =item o F<$JDEV_HOME/soa/modules> =item o F<$JDEV_HOME/uddi/lib> =item o F<$JDEV_HOME/webservices/lib> =back =cut # Macro to list the files macro stat_files {var ($lvl,$rpt,$dir,$pat,$opt) = @arg import $TOC,$TOP keep $TOC,$TOP report concat('lib_',$rpt) title '---+!! Information Taken from ',encode($dir) if compare('eq',$rpt,'soa_modules') {title $TOC loop $sub (findDir($dir,'^\.+$','npv')) {prefix write '---+ ',encode(addSymbol($sub)) call statFile('b',grepDir($sub,nvl($pat,'\.jar$'),nvl($opt,'inp'))) if hasOutput(true) write $TOP } } else {call statFile('b',grepDir($dir,nvl($pat,'\.jar$'),nvl($opt,'inp'))) if hasOutput(true) write $TOP } if isCreated(true) toc $lvl,':[[',getFile(),'][rda_report][',encode(addSymbol($dir)),']]' } debug ' Inside JDEV module, listing the jdeveloper libraries' pretoc '2:Oracle JDeveloper Libraries' call stat_files(3,'jdev_extn',catDir($JDEV_HOME,'jdev','extensions')) call stat_files(3,'jdev',catDir($JDEV_HOME,'jdev','lib')) call stat_files(3,'jdev_patch',catDir($JDEV_HOME,'jdev','lib','patches')) call stat_files(3,'soa_modules',catDir($JDEV_HOME,'soa','modules')) call stat_files(3,'uddi',catDir($JDEV_HOME,'uddi','lib')) call stat_files(3,'webservices',catDir($JDEV_HOME,'webservices','lib')) unpretoc =head2 ide_extn - IDE Extensions Overview Lists the Oracle JDeveloper IDE extension files from the F<$JDEV_HOME/ide/extensions> directory. =cut debug ' Inside JDEV module, listing the IDE extensions' var $dir = catDir($JDEV_HOME,'ide','extensions') report ide_extn prefix write '---+ Oracle JDeveloper IDE Extensions Overview' call statDir('n',$dir) if isCreated(true) {write $TOP toc '2:[[',getFile(),'][rda_report][IDE Extensions Overview]]' } =head2 ide_macro - IDE Macros Overview Lists the Oracle JDeveloper IDE macro files from the F<$JDEV_HOME/ide/macros> directory. =cut debug ' Inside JDEV module, listing the IDE macros' var $dir = catDir($JDEV_HOME,'ide','macros') report ide_macro prefix write '---+ Oracle JDeveloper IDE Macros Overview' call statDir('n',$dir) if isCreated(true) {write $TOP toc '2:[[',getFile(),'][rda_report][IDE Macros Overview]]' } =head2 ch_modules - Common Modules Overview Lists the Oracle JDeveloper common modules files from the F<$MW_HOME/oracle_common/modules> directory. =cut debug ' Inside JDEV module, listing the common modules' var $dir = catDir($MW_HOME,'oracle_common','modules') report ch_modules prefix write '---+ Oracle JDeveloper Common Modules Overview' call statDir('n',$dir) if isCreated(true) {write $TOP toc '2:[[',getFile(),'][rda_report][Common Modules Overview]]' } =head2 manifest - Manifest Information Extracts the manifest information from the following location depending upon the version. =over 4 =item o F<$MW_HOME/oracle_common/modules/oracle.adf.model_12.1.2/adfm.jar> =item o F<$MW_HOME/oracle_common/modules/oracle.adf.model_11.1.1/adfm.jar> =item o F<$JDEV_HOME/BC4J/lib/bc4jct.jar> =back Information is extracted when F is available. =cut if ?nvl(testFile('fr',\ catFile($MW_HOME,'oracle_common','modules',\ "oracle.adf.model_\061\062\056\061\056\062",'adfm.jar')),\ testFile('fr',\ catFile($MW_HOME,'oracle_common','modules',\ "oracle.adf.model_\061\061\056\061\056\061",'adfm.jar')),\ testFile('fr',catFile($JDEV_HOME,'BC4J','lib','bc4jct.jar'))) {if ?findCommand('unzip') {var ($cmd,$src) = (last,lastTestCommand()) report manifest debug ' Inside JDEV module, extracting the manifest' var $cmd = concat($cmd,' -p ',$src,' META-INF/MANIFEST.MF') prefix {write '---+ Manifest Information' write '---## Information Taken from ',encode($src) } call writeCommand($cmd) if isCreated(true) toc '2:[[',getFile(),'][rda_report][Manifest Information]]' } } =head2 Configuration Files Collects the configuration files. =cut if ??$APPL_ROOT {debug ' Inside JDEV module, gathering configuration files' pretoc '2:Configuration Files' loop $app (@{T_APPLICATIONS}) {pretoc "3:'",$app,"' Application" var $dir = catDir($APPL_ROOT,$app) call sort_files(4,0,\ catFile($dir,'Model.jpr'),\ catFile($dir,'ViewController.jpr'),\ grepDir($dir,'\.jws$','inp'),\ grepDir(catDir($dir,'.adf','META-INF'),\ '^(adf-config|connections)\.xml$','inp'),\ catFile($dir,'Models','src','model','common','bc4j.xcfg'),\ grepDir(catDir($dir,'ViewController','public_html','WEB-INF'),\ '^(((adfc|faces|trinidad)-config)|web)\.xml$','inp'),\ grepDir(catDir($dir,'ViewController','adfmsrc','view','pageDefs'),\ 'pagedef\.xml$','inp')) unpretoc } unpretoc } =head1 COMMON HOME INFORMATION Includes the reports generated by the L module about the common home. =cut toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Common Product Home")%' toc '%INCLUDE("OFM_IREQ_OFM_JDEV_CH_TF.toc")%' toc '%POP2%' =head1 ORACLE WEBLOGIC SERVER DOMAIN COLLECTIONS Includes the Oracle WebLogic reports generated by the L module. =cut toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Overview")%' toc '%INCLUDE("OFM_WREQ_OFM_JDEV_WH_TF.toc")%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Domain")%' toc '%INCLUDE("OFM_WREQ_OFM_JDEV_DOM_TF.toc")%' toc '%POP2%' =head1 SEE ALSO L, L, L, L =begin credits =over 10 =item RDA 4.17: Anjani Sankar, Miguel Hernandez. =item RDA 4.27: Miguel Hernandez, Yogesh Sontakke. =item RDA 4.31: Andrew Salt, Yogesh Sontakke. =item RDA 8.00: Yogesh Sontakke. =item RDA 8.04: James Pierce, Ian Reid. =item RDA 8.06: James Pierce. =item RDA 8.07: Laxmi Prasanna Madu, James Pierce. =item RDA 8.08: James Pierce. =item RDA 8.09: James Pierce. =item RDA 8.10: James Pierce. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. =head1 TRADEMARK NOTICE Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. =cut