The purpose of this project is to simplify the on-demand exporting and splitting of Oracle Application Express (APEX) code to facillitate granular version control.
My fellow developers prefer to avoid the command line, and aren't familiar with Java. This tool allows them to participate in our version control from stock Windows and stock OSX platforms.
The download includes example configuration files, but this repository is setup to ignore actual config files (to prevent accidentally pushing configuration to github). So, I reccommend versioning your config files separately, and linking them.
The actual exporting and splitting of the application is handled by Java classes provided by Oracle, as part of the APEX distribution, with database connectivity via JDBC.
Since I don't believe I can legally re-distributte Oracle's files, you must obtain those JARs yourself.
Download the APEX distribution from OTN's APEX Download Page
Once you've downloaded the .zip file, copy $zipbase/apex/utilities/oracle/apex/*.class to the ./APEX_Export_JARs/oracle/apex/ directory.
You'll also need to download the Oracle Instant Client, then locate ojdbc6.jar (likely in $zipbase/instant_client_*/ojdbc6.jar) and copy it to ./APEX_Export_JARs
If you understand Java and classpaths, you can place these files wherever you'd like. For example, if you have the instant client already installed and on your CLASSPATH, you don't have to copy objdbc6.jar into your install folder. To skip envirnoment validation run with the -SkipEnvChk flag by modifying the included shortcut (Windows), or in the APEXExportWrapper.command file (OSX).
The configuration files use the CSV format which is easy to parse in both PowerShell and Python.
You can use Excel (or any text editor) to modify the contents of the configuration files to match your environment, use the *.conf.example.csv files as a starting off point.
I recommend storing and versioning your config files in your main repository, then linking to it.
mklink AEWHosts.conf.csv ..\eahr\AEWHosts.conf.csv
mklink AEWApps.conf.csv ..\eahr\AEWApps.conf.csvNew-Item -Path AEWHosts.conf.csv -ItemType SymbolicLink -Value ..\eahr\AEWHosts.conf.csv
New-Item -Path AEWApps.conf.csv -ItemType SymbolicLink -value ..\eahr\AEWApps.conf.csvln -s ../eahr/AEWHosts.conf.csv ./AEWHosts.conf.csv
ln -s ../eahr/AEWApps.conf.csv ./AEWApps.conf.csv| sid | connect_string |
|---|---|
| prod | prodsystem.example.com:1521:prod |
| dev | devsystem.example.com:1521:dev |
| test | testsystem.example.com:1521:test |
| findev | finance_dev.example.com:1521:findev |
| finprod | finance.example.com:1521:finprod |
| NAME | APP_DIR | APP_ID | OWNER | dev | test | prod | findev | finprod |
|---|---|---|---|---|---|---|---|---|
| HR | ~/code/HR/APEX/ | 100 | HR_USER | Y | Y | Y | N | N |
| FIN | ~/code/FIN/APEX/ | 200 | FIN_USER | N | N | N | Y | Y |
PowerShell is included in Windows 7 and 8. Windows 8 comes with PowerShell 3.0, but these scripts target 2.0 to minimize requirements. The default security policy on Windows prevents execution of PowerShell scripts.
You can enable execution with the Set-ExecutionPolicy Cmdlet.
Running PowerShell as Administrator execute:
Set-ExecutionPolicy RemoteSignedOSX has included Python since 10.8 "Mountain Lion" released July 2012. You can run the script directly from the Finder by double clicking on the APEXExportWrapper.command file. You may need to run
chmod +x APEXExportWrapper.commandin the terminal to allow execution.
You can also run directly from the terminal in your favourite shell.