Using Oracle JDeveloper with Oracle Developer Cloud Service
Oracle JDeveloper enables you to develop applications and commit the files to the Oracle Developer Cloud Service Git repository. Similar to NetBeans IDE, JDeveloper also uses the Oracle Developer Cloud Service Team Server plugin to access Oracle Developer Cloud Service projects. The plugin is installed by default in JDeveloper.
Logging In to Oracle Developer Cloud Service
You can log in to Oracle Developer Cloud Service from the Team window.
Using the Oracle Developer Cloud Service Team Server
After you log in, the Team window lists all projects of which you are a member. For each project, JDeveloper displays project information about build jobs, issues, and Git repositories.
From the Oracle Developer Cloud Service team server, you can do the following:
-
Create an Oracle Developer Cloud Service project
-
Open an existing project
-
Switch to another project
-
Log out from the Oracle Developer Cloud Service team server
Click the Oracle Developer Cloud Service team server icon to perform the above actions.
Description of the illustration jdev_odcs_gearmenu.png
Note:
By default, JDeveloper synchronizes information from all recently selected or opened projects of which you are a member or own. The information includes all issues, builds, and Git repositories. If you want to synchronize information for the selected project, click the
Creating an Oracle Developer Cloud Service Project in JDeveloper
You can create an Oracle Developer Cloud Service project in JDeveloper and then push its files to the hosted Git repository. You can also push an existing JDeveloper application to an empty Oracle Developer Cloud Service project Git repository.
If you did not add an existing project in Step 4, then follow the steps described in Opening an Oracle Developer Cloud Service Project in JDeveloper to clone the hosted Git repository of the new project. After cloning the Git repository, add files to the project, commit them to the local Git repository branch and then push the branch to the hosted Git repository.
Opening an Oracle Developer Cloud Service Project in JDeveloper
You can open an Oracle Developer Cloud Service project in JDeveloper from the Team window. After opening the project, you can clone the hosted Git repository.
If you have a long list of projects, click the Oracle Developer Cloud Service team server icon and select Open Project. In the Search field of the Open Project dialog, enter the name of the project that you want to open, and click Search. To view all projects, leave the Search field empty and click Search.
Using Git in Oracle JDeveloper
Using the Git extension, you can perform various Git actions such as cloning a Git repository, checking out and updating files, committing and pushing, and creating and merging branches.
Watch a short video to learn more about using Git in Oracle JDeveloper.
You can download the Git extension from the Help menu. Open the Help menu and select Check for Updates. See the JDeveloper documentation for more information.
For more information about Git actions in JDeveloper, read the Versioning Applications with Source Control chapter of Oracle Fusion Middleware Developing Applications with Oracle JDeveloper on http://docs.oracle.com/middleware
.
Updating Oracle Developer Cloud Service Issues in JDeveloper
When you open a project in the Oracle Developer Cloud Service team server, the Tasks window displays the default issue search queries.
The issue queries include:
-
All tasks
-
Assigned to me
-
Open tasks
-
Related to me
-
User defined custom queries
Click the issue query link to open the query result in the Tasks window. If the Tasks window is not visible, open it from the Window menu.
In the Tasks window, double-click the issue to open it in the Task editor. Make your edits, and then click Submit to push the updates to Oracle Developer Cloud Service issue repository.
Create an Oracle Developer Cloud Service Issue
You can create an Oracle Developer Cloud Service task from the Tasks window.
Create an Oracle Developer Cloud Service Issue Query in JDeveloper
You can create an Oracle Developer Cloud Service issue query from the Tasks window.
Tip:
You may also create an issue query from the Team menu. Open the Team menu and select Find Tasks. In Task Repository, select the project for which you want to create the issue query, enter the criteria, and click Search.
Associating an Issue with a Commit
You can associate an issue and update it in Oracle Developer Cloud Service when you commit files.
Monitoring Project Builds in JDeveloper
When you open a project in the Oracle Developer Cloud Service team window, it displays all builds and jobs of the project along with their status.
To view a particular build's details, double-click the job name in the Team window to view its builds in the Oracle Developer Cloud Service web interface.
Building Oracle ADF Applications with Oracle Developer Cloud Service
You can develop Oracle ADF applications in JDeveloper and then build them using OJMake and OJDeploy tools with Ant or Maven in Oracle Developer Cloud Service.
Building with Ant
To build an Oracle ADF application using Ant in Oracle Developer Cloud Service:
-
Create an Oracle ADF application in Oracle JDeveloper.
-
Add or configure the
build.properties
andbuild.xml
files.-
In
build.xml
, add<property environment="env"/>
immediately after the<project>
element to enable Ant to access the system environment variables and store them in properties, prefixed withenv
.Example:
<?xml version="1.0" encoding="windows-1252" ?> <project name="HelloWorldADFProject" basedir="."> <property environment="env" /> <property file="build.properties"/> ... </project>
Configure
build.properties
file to use Oracle Developer Cloud Service build executor environment variables to access the ant library, the OJDeploy tool, and the JDeveloper directory installed on the Oracle Developer Cloud Service build executor. See About the Build Executor Environment Variables.
-
-
Commit and push the application to the hosted Git repository.
-
In Oracle Developer Cloud Service, create and configure a job with an Ant build step.
-
Run a build of the job to generate the artifacts.
Using OJServer with OJDeploy
When you run a job configured to use multiple OJDeploy builds, the build starts, runs, and then shuts down JDeveloper ojdeploy
for each invocation. You can increase the OJDeploy performance by using OJServer, which eliminates the requirement to start and stop OJDeploy after each invocation.
To use OJServer with OJDeploy, you must configure the job and update the Ant script to use OJServer.
-
Configure the
build.xml
file of your application to add theojserver
argument (<arg value="-ojserver"/>
) before parameters are defined.Example:
<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"> <arg value="-ojserver"/> <ora:deploy> <ora:parameter name="workspace" value="${oracle.jdeveloper.workspace.path}"/> <ora:parameter name="profile" value="${oracle.jdeveloper.deploy.profile.name}"/> </ora:deploy> </ora:ojdeploy>
-
In Oracle Developer Cloud Service web interface, configure the job to run a Shell build step that starts OJServer before running OJDeploy commands.
Add a Shell build step to
ojserver
.Examples:
$ORACLE_HOME_SOA_12_1_3/jdev/bin/ojserver -start &
$ORACLE_HOME_SOA_12_2_1/jdev/bin/ojserver -start &
See Adding a Build Step that Runs a Shell Script.
Note:
-
In the command that invokes
ojserver
, the&
character is required at the end of the command to keepojserver
running in the background. In the command, use the correct environment variables that matches your JDeveloper 12c or above version. OJServer is not supported in JDeveloper 11g. For more information about environment variables, see About the Build Executor Environment Variables. -
In the Shell build step that starts the
ojserver
, use thesleep
command to add a 30 seconds or more wait time to allow theojserver
process to start before any other command runs.Example:
$ORACLE_HOME_SOA_12_1_3/jdev/bin/ojserver -start &
sleep 30
-
Configure the job to use JDK 8 (or above) as JDev 12.2.1 and above versions do not support JDK 7 (or lower).
-
-
ojserver
process automatically stops with any other remaining processes when the build executor is recycled/cleaned up for the next users job.
Building with Maven
You can configure the Maven POM file to access the Oracle Maven Repository to access JDeveloper and ADF libraries. You would also need Oracle SSO credentials to access the Oracle Maven repository.
To build an Oracle ADF application using Maven and Oracle Maven Repository in Oracle Developer Cloud Service:
-
Create an Oracle ADF application in Oracle JDeveloper.
-
Add and configure the Maven POM file of the ADF application. Use Oracle Developer Cloud Service build executor environment variables to access the OJMake and OJDeploy tools on the Oracle Developer Cloud Service build executor and the Oracle Maven Repository. See About the Build Executor Environment Variables.
-
Commit and push the application to the hosted Git repository.
-
In Oracle Developer Cloud Service, create and configure a job with a Maven build step.
See Using the Oracle Maven Repository and Configuring Build Steps.
-
Run a build of the job to generate the artifacts.