X

Shay Shmeltzer's Oracle Development Tools Tips

Oracle Developer Cloud Service - Automating Builds for Oracle ADF Applications

Shay Shmeltzer
Director of Product Management - Oracle

Following up on the previous blog that showed how to get your ADF application into the Developer Cloud Service git repository, this entry will show you the next step in the lifecycle - executing builds.

The Oracle Developer Cloud Service (DevCS) supports build automation with both Maven and Ant scripts - and in this demo I'm showing you how to use the Ant option. One of the unique aspects of DevCS for customers who are  using Oracle ADF and JDeveloper is that the cloud comes pre-configured with the ADF libraries needed to compile your code, and also with support for OJDeploy so you can leverage deployment profiles that you defined for your application.

In fact DevCS comes with support for two ADF versions - 11.1.1.7.1 and 12.1.3 (as of the time of this blog).

In the video below you'll see

  • How to add a build file for your ADF application
  • How to  configure the build file to work in the cloud environment
  • How to define a build job and execute it
  • How to look at the log files for the build job
  • How to automate the build execution to happen when changes are committed to the git repository

The build in the example above just does the packaging, but in more realistic scenarios you can use similar build processes to create ADF libraries from projects, automate testing, modify configuration and more.

There are a couple of files that are used in the demo that you might want to use in your implementation:

The build.xml file: 

  <property environment="env" /> <property file="build.properties"/><target name="deploy" description="Deploy JDeveloper profiles"><taskdef name="ojdeploy"
classname="oracle.jdeveloper.deploy.ant.OJDeployAntTask"
uri="oraclelib:OJDeployAntTask"
classpath="${oracle.jdeveloper.ant.library}"/><ora:ojdeploy xmlns:ora="oraclelib:OJDeployAntTask"
executable="${oracle.jdeveloper.ojdeploy.path}"
ora:buildscript="${oracle.jdeveloper.deploy.dir}/ojdeploy-build.xml"
ora:statuslog="${oracle.jdeveloper.deploy.dir}/ojdeploy-statuslog.xml"><ora:deploy><ora:parameter name="workspace"
value="${oracle.jdeveloper.workspace.path}"/><ora:parameter name="profile"
value="${oracle.jdeveloper.deploy.profile.name}"/><ora:parameter name="nocompile" value="false"/><ora:parameter name="outputfile"
value="${oracle.jdeveloper.deploy.outputfile}"/></ora:deploy></ora:ojdeploy></target>

The build.properties file I used can be found here.

The mask for the build automatic execution is */1 * * * *

Note that in the properties file there are references to environment variables that you will need to change if you are looking to deploy an 11.1.1.* app - specifically the options for 12 and 11 are:

WLS_HOME_12C3=/opt/Oracle/Middleware12c3/wlserver
WLS_HOME_11G=/opt/Oracle/Middleware/wlserver_10.3

MIDDLEWARE_HOME_12C3=/opt/Oracle/Middleware12c3

MIDDLEWARE_HOME_11G=/opt/Oracle/Middleware
ORACLE_HOME_12C3=/opt/Oracle/Middleware12c3/jdeveloper

ORACLE_HOME_11G=/opt/Oracle/Middleware/jdeveloper

The next logical step in your app lifecycle is to automate the deployment of the ADF application to the Oracle Java Cloud Service. If you are interested in this check out - Automating Deployment of the Summit ADF Sample Application to the Oracle Java Cloud Service

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.