This documentation is for WSO2 App Factory 1.0.0. View documentation for the latest release.

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

At the time you create an application , App Factory also creates a trunk repository of the type given by you (e.g., GIT), and associates your (the app owner's) credentials with it. The trunk contains a skeleton application that you can deploy and test. When the app owner adds users to the team, they too receive access to the repository. App Factory supports three types of repositories - the trunk, branches and tags.

This section gives the following information:

Table of Contents

Checking in the source code to the trunk

The first step is to check out the trunk repository to your local folder, copy your existing source code and check it in to the trunk repository. If you plan to develop your application from scratch, you can skip this section.

  1. Log in to the App Factory portal (for the online version, try as a user who is assigned the  Application Owner  role or the  developer  role. Only these two user roles have permission to manage the source code and application versions. See  roles/permissions list
  2. Select an application from the list of apps that you own or are invited to participate in.
  3. The application opens. Click the Repos and Builds tab on the left panel.
  4. The Repositories and Builds page opens. It contains information of all versions of the application, which life-cycle stage each version is in and builds and deployment information of each version.
  5. Click the browse icon associated with the trunk to open its repository URL in a separate window. This allows you to browse the files in the skeleton trunk created in the remote repository.

  6. You are navigated to the repository. Log in with your App Factory credentials to see the repository files. For example, click the tree menu to see the folder structure as shown below:


    NOTE: You must not perform any updates to the repository (for example, creating a branch) from the repository window. Those actions must happen from the App Factory portal to make sure the life cycle of the application is managed properly.

  7. Next, let's check out the remote trunk repository to your local environment. To do that, copy the trunk URL using the Copy URL icon associated with the trunk.
  8. Install the repository client (e.g., GIT client) in your local machine. (See
  9. Take a copy of the trunk repository to your local environment.

    Code Block
    git clone <URL of the trunk>
  10. If you have already started developing the application, copy the contents of your existing application to the same folder that you cloned the trunk. Choose to replace any existing files such as the pom.xml.
  11. Change the following elements in the pom.xml file in your local folder:

    <groupId> :
    <artifactId> : change to the existing app key
    <version> : SNAPSHOT


    If you have resources associated with your application such a datasources, databases, endpoints, you must configure them before committing the source code to the trunk. See Configuring Resources.

  12. Add, commit and push your changes to the remote repository.

    Code Block
    git add <file or folder path>
    git commit -am "commit message"
    git push origin master

    App Factory automatically builds and deploys your application every time a commit happens to the remote repository. To change this, see Auto build and deployment.

At this point, you must have the source code of the application committed in the remote repository. If you are developing the application from scratch, you already have a skeleton code available in trunk. Next step is to create a branch from the trunk.

Creating a branch

Before you start developing the code, you must create a branch from the trunk. The code in trunk is always in Development stage (first stage of the default life cycle). Creating a branch allows you to manage the source code through the entire lifecycle of an application. A new branch is similar to a new version of the application.

  1. In the Repositories and Builds page, go to trunk, click Create Branch, provide the version number (e.g., 1.0.0) and click the Create Branch button in the pop-up screen.
    App Factory supports multiple versions of an application that can be in different lifecycle stages. You can create branches from the trunk or another branch.
  2. The branch contains a copy of the code checked in to trunk earlier. 
  3. Copy its repository URL as follows:
  4. Using the repository URL, check out the branch to your local development environment. 

You are now ready to develop the application code. See Developing the Code.