JDeveloper

Oracle JDeveloper enables you to develop applications and commit the files to the Oracle Developer Cloud Service Git repository. JDeveloper also uses the Team Server plugin to access DevCS projects. The plugin is installed by default in JDeveloper.

Sign In to DevCS from JDeveloper

You use the Team window to sign in to DevCS.

  1. Open JDeveloper.
  2. From the Team menu, select Team Server, then Add Team Server.
  3. In the New Team Server dialog box, enter a unique name in Name and the DevCS URL in URL.
  4. Click OK.
  5. From the Window menu, select Team.
  6. In the Team window, click Click here to select project to see the list of team servers. Click Login under the DevCS team server.
  7. In the Login to Team Server dialog box, enter the user name and password, and click Login.

Use the Team Server

From the Team tab, you can access DevCS projects, create a project, search a project, access its Git repositories, issues, and builds.

Using the Configure the Gear icon menu, you can create or open a project, or logout of DevCS.

Action How To

Open the project’s dashboard

The project’s dashboard lists the recent activities and builds of the project. To open the Dashboard, in the Team tab, click Dashboard.

Open the project in the web browser

In the Team tab, click Project Web.

Create a DevCS project

Click Configure the Gear icon and select New Project. Follow the steps of the wizard to create the project.

Open a project

Click Configure the Gear icon and select Open Project. To switch to another project from an open project, you can also click the project name and select another project’s name from the list.

Create a DevCS Project in JDeveloper

You can create a DevCS project in JDeveloper and then push it to Oracle Cloud. You can also push an existing JDeveloper project to an empty repository of a DevCS project Git repository.

  1. Open JDeveloper.
  2. From the Team menu, select Team Server, select DevCS team server, and then select New Project.
    You may also select New Project from the DevCS team server Configure Gear menu.
  3. In the Name and License page of the New Project wizard, perform these steps:
    1. In Project Name, enter a unique project name.
    2. In Description, enter a brief description of the project.
    3. In Security, select the project's privacy.
    4. In Wiki Markup, select the wiki markup language.
  4. Click Next.
  5. In the Source Code and Issues page of the New Project wizard, specify the directory of source code files.

    If you haven’t created an IDE project, specify the directory on your computer to use as project’s Git repository. In Local Repository Folder, click Browse and select the local directory.

    If you’ve an IDE project that you want to upload to the DevCS project, specify the IDE project’s directory. In Folders or Projects, click Add Project, browse, select the project directory, and click Open Project. If you don’t want to add an existing project or directory, leave the Folders or Projects field empty.

  6. Click Next.
  7. In the Summary page, review the information and click Finish.
  8. After the project is successfully created in DevCS, a dialog box displays a message showing the local repository location. Click Close to close the dialog box.

Open a DevCS Project in JDeveloper

You can open an DevCS project in JDeveloper and update its source code files.

  1. Open the project in the Team window.
    To search for a project, from the Team menu, select Team Server, select the DevCS server, and then select Open Project. You can also click ConfigureGear and select Open Project.
  2. In the open project, expand Sources and click the get link of the Git repository you want to clone.
  3. In the Get Sources from Team Server dialog box, verify the Git repository URL and click Get From Developer Server.
  4. In the Remote Repository page of the Clone Repository wizard, verify the repository URL, and click Next.
    The user name and password are automatically picked from the Team Server you’re logged into and the wizard automatically moves to the Remote Branches page. To verify the details, click Back.
  5. If required, in the Remote Branches page of the Clone Repository wizard, select branches to clone and click Next.
  6. In the Destination Directory page of the Clone Repository wizard, perform these steps:
    1. In Parent Directory , specify the directory path .
    2. In the Clone Name , enter the name of the cloned repository.
    3. In Checkout Branch, select the default branch to checkout.
  7. Click Finish.

Use Git in JDeveloper

Using the Team menu or the Versions tab, you can commit files, create and merge branches, and push changes to the hosted Git repository.

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.

Watch a short video to learn more about using Git in Oracle JDeveloper.

This table describes some common actions you can perform to manage Git repositories from the NetBeans IDE.

Action How To

View Git repositories of a project

In the Team tab, expand the Sources node.

Access branches of a cloned project Git repository

From the Team menu, select Versions. Expand the repository node and then the Branches node to see local and remote branches.

Checkout a branch

Expand the Branches node, right-click the branch, and select Checkout.

Create a branch

Expand the Branches node, right-click the base branch, and select Create Branch. In the Create Branch dialog box, enter a branch name, configure other options, and click OK.

Add a file to index

In the Applications tab, select the file. From the Team menu, select Git, and then select Add.

Commit files

Select the IDE project in the Applications tab and then from the Team menu, select Git, and then select Commit. In the Commit dialog box, enter a message, verify the commit files, author and commiter, and then click Commit.

Push commits to the project’s Git repository

Select the IDE project in the Applications tab. From the Team menu, select Git, and then select Push.

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.

Manage DevCS Issues in JDeveloper

In JDeveloper, you can manage DevCS issues, create issues, update issues, and create a search query.

JDeveloper displays tasks in the Tasks tab. To open the tab, from the Window menu, select Tasks.

This table describes some common actions you can perform to manage issues from JDeveloper.

Action How To

View issues of the project

In the Tasks tab, expand Repositories. In the project name’s node, expand the filter to view its issues. By default, the Tasks tab displays issues of these filters:

  • All tasks

  • Assigned to me

  • Open tasks

  • Related to me

  • User defined custom queries

Open and update an issue

In the Tasks tab, double-click the issue. The issue’s details display in a new tab of the IDE. Update the issue’s properties and click Submit.

Create an issue

In the Tasks tab, select the project node, right-click, and select Create Task. Enter the details and click Submit. The issue is automatically synchronized with the DevCS project is available to other project members.

Create a query

In the Tasks tab, select the project node, right-click, and select Create Query. In the Find Tasks tab, enter the search criteria and click Save Query.

Associate an Issue with a Commit

When you commit files, you can associate an issue with a commit.

  1. In the Tasks tab, open and update the issue that you want to associate with the commit.
  2. From the Team menu, select Commit.
  3. In the Commit dialog box, enter the commit’s message and verify the files.
  4. In the Update Task section, select the issue from the Task list.
  5. Select the desired resolution check boxes and the commit option.
  6. Click Commit.
Open the issue in DevCS and verify the SHA-1 checksum hash of the commit is now available in Commits under Associations.

Monitor a Project’s Builds in JDeveloper

The Team tab 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 tab to view its builds in the web browser.

Build Oracle ADF Applications

You can develop Oracle ADF applications in JDeveloper and then build them using OJMake and OJDeploy tools with Ant or Maven in DevCS.

Build ADF Applications with Ant

  1. Create an Oracle ADF application in Oracle JDeveloper.
  2. Add or configure the build.properties and build.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 with env.

      Example:

      <?xml version="1.0" encoding="windows-1252" ?>
      <project name="HelloWorldADFProject" basedir=".">
        <property environment="env" />
        <property file="build.properties"/>
        ...
      </project>
      

      Configure the build.properties file to use DevCS build executor environment variables to access the Ant library, the OJDeploy tool, and the JDeveloper directory installed on the DevCS build executor.

  3. Commit and push the application to the hosted Git repository.
  4. In DevCS, create and configure a job with an Ant build step.
  5. Run a build of the job to generate the artifacts.
Use 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.

  1. Configure the build.xml file of your application to add the ojserver 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>
  2. In DevCS, configure the job to run a Shell build step that starts OJServer before running OJDeploy commands.

    Examples of commands:

    $ORACLE_HOME_SOA_12_1_3/jdev/bin/ojserver -start &

    $ORACLE_HOME_SOA_12_2_1/jdev/bin/ojserver -start &

    • In the command that runs ojserver, add a & character at the end of the command to keep ojserver running in the background. In the command, use the correct environment variables that matches your JDeveloper 12c or above version. OJServer isn’t supported in JDeveloper 11g. For more information about environment variables, see Build Executor Environment Variables.

    • In the Shell build step that starts the ojserver, use the sleep command to add a 30 seconds or more wait time to allow the ojserver 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 don’t support JDK 7 (or below).

    The ojserver process automatically stops with any other remaining processes when the build executor is recycled/cleaned up for the next users job. If you are using a Build VM, you must stop ojserver manually by adding another Shell build step at the end that runs after all build commands have run. Example: $ORACLE_HOME_SOA_12_1_3/jdev/bin/ojserver -stop.

Build ADF Applications with Maven

You can configure the Maven POM file to access the Oracle Maven Repository to access JDeveloper and ADF libraries. You’d also need Oracle SSO credentials to access the Oracle Maven repository.

  1. Create an Oracle ADF application in Oracle JDeveloper.
  2. Add and configure the Maven POM file of the ADF application. Use the DevCS build executor environment variables to access OJMake, OJDeploy, and the Oracle Maven Repository.
  3. Commit and push the application to the hosted Git repository.
  4. In DevCS, create and configure a job with a Maven build step.
  5. Run a build of the job to generate the artifacts.