# Perforce Source Control Integration

WebLogic Workshop integrates with the Perforce Source Control Management System. Information about Perforce is available at http://www.perforce.com. This topic describes how to put your Workshop application under source control with Perforce.

## Setting Up Source Control Integration with Perforce

Before you put your application under source control with Perforce, you need a Perforce account and password and port information for the Perforce depot. You also need a client spec that includes the depot view where your application will reside. See your system administrator for assistance with these requirements.

To Add Your Workshop Application to Perforce

1. Create a new WebLogic Workshop application to add to source control, in the directory where you want it to reside in the depot. If you have an existing application, you should clean it before you add it to source control, so that build artifacts are not added along with source files. To clean your application, select the application name in the Application pane, right-click, and select Clean Application.
2. Add the files in your application to Perforce. For a list of the files that you should add and those that you should exclude, see Integrating with Source Control Systems. Because you are adding some files and excluding others, you don't want to add the entire application directory recursively; on the other hand, you probably don't want to add files one at a time either. One way to add individual directories recursively is to arrange the file system and Perforce windows side by side on your screen, and drag and drop each directory onto the Perforce changelist.
3. If you want to ensure that an empty directory is created in Perforce, create a .ignore file within that directory and add it to Perforce.
4. To test that you have added the appropriate files, you can submit your file additions to the Perforce depot, rename the application directory on your local file system, and re-sync to the same revision in Perforce. Then open the application in Workshop. You will be prompted to update missing or outdated libraries; after you do this, your application should build successfully, barring any build errors in your code.
5. In WebLogic Workshop, select Tools-->Application Properties, then select the Source Control tab.
6. Set the Source control module option to Perforce.
7. WebLogic Workshop will try to fill in the Port, ClientSpec, User name, and Password fields for you; you can modify these if you wish to use something other than the default settings.

Related Topics

Integrating with Source Control Systems