Cloning the Dependency Based Build samples and importing them into a z/OS project

Learn how to clone a GitHub repository from the Developer for z/OSĀ® client and import it into a z/OS project. Understand how the cloning and importing process enables Dependency Based Build (DBB) and Developer for z/OS tooling for the repository.

Cloning and importing the DBB samples repository

If you want to use the DBB sample code, you can clone the DBB sample repository in the Developer for z/OS client. DBB offers two samples repositories:
  • https://github.com/IBM/dbb

    A location for finding and sharing example DBB scripts and snippets.

  • Repository for zAppBuild, a generic solution for building z/OS applications using Apache Groovy build scripts and DBB APIs.

  1. To open the DBB samples repository, click this link: https://github.com/IBM/dbb-zappbuild.
  2. Click Code and then click the Copy button to copy the HTTPS repository URL.
    Clone a Git repository window
  3. On the Git Repositories tab of the z/OS Projects perspective, click the Clone a Git Repository toolbar button.
    Clone a Git Repository icon

    The Clone Git Repository wizard opens.

  4. In the URI field of the Location group box, paste the copied HTTPS repository URL. The Host and Repository path fields are filled in for you.
  5. Click Next twice until the Local Destination page opens.
  6. To import the repository into a local z/OS project, click Import all existing Eclipse projects after clone finishes.
    Local Destination page with an option to import Eclipse projects
  7. Click Finish.
    The cloned repository is added to the Git Repositories view. In the Git Repositories view, the structure of the cloned repository looks similar to the following example:
    A cloned repository in the Git Repositories view
    The source files are contained in the Working Tree folder, which contains one or more application folders, as in the following example:
    Working Tree folder
    If you selected the option to import projects, then any application folders that also contain a .project file are added to the z/OS Projects view.
    The .project file defines the application as an Eclipse project. In this example, the <natures> attribute contains two values:
    • com.ibm.ft.ui.views.project.navigator.local defines the folder as a local z/OS project. This attribute enables the z/OS integrated development environment tools that are available in the z/OS Projects view.
    • com.ibm.ftt.dbbz.integration.dbbzprojectnature defines the folder as a DBBz project. This attribute enables the DBBz tools that are available in the z/OS Projects view.
    A .project file in an application folder
    The applications that are defined as z/OS projects are added to the z/OS Projects view, as in this example:
    Git applications in the z/OS Projects view

What to do next

Creating a local property group for a user build