WebLogic Workshop integrates directly with the following source control
systems: CVS, Perforce, and IBM Rational ClearCase. Once you have added the
files in your WebLogic Workshop application to a respository managed by one
of these source control products, you can check files in and out using
commands available in WebLogic Workshop.
A D V E R T I S E M E N T
Enabling Source Control
Integration in WebLogic Workshop
If you are part of a team development project and the application you
are working on is already in a source control repository, you can simply
point at that repository from WebLogic Workshop to enable source control
integration from within the IDE. After you enable source control
integration, the source control module's commands are available to you
in WebLogic Workshop. For example, when you right-click on a file you
will see a menu item for the name of the source control module (CVS,
Perforce, or ClearCase), and beneath that menu item, the
commands available for working with the file.
For more information on enabling source control integration with one of
these source control systems,
To Configure WebLogic Workshop for Source Control
Configure your source control system as advised by your system
administrator. In most cases you will need at least a client
configuration that specifies how your computer interfaces with the
source control system.
From the Tools menu, select Application Properties.
Click the Source Control tab.
From the Source control module drop-down, select
Set the properties for the source control module to map to the
configuration on your computer.
If you want to enable source control integration only for a project
within your application, or if you have different projects within different
source control repositories, you can specify source control settings at the
project level. From the Tools menu, choose Project
Properties--><projectname>, click the Source Control
tab, and clear the Use application's source control settings
Using Source Control Commands from WebLogic Workshop
Once you've configured Workshop for source control integration, you can
perform commands against individual files in your application or project.
There are two ways to execute source control commands:
Right-click the file and choose the name of the source control system
you're using -- CVS, Perforce, or
ClearCase. The commands available for that file are
listed on the submenu.
Open the file in WebLogic Workshop. From the Tools
menu, choose your source control system; the available commands are
listed on the submenu.
Which Files Should You Add to Source Control?
There are a lot of files in a WebLogic Workshop application, and not all
of them need to be checked in. The files which should be checked in are
those that are not modified by the build process. These files include source
files and some other files that are created with the project but never
modified. The project can be built while any of these are read-only (for
source control systems that govern read/write access), so that you only have
to check out the files that you wish to modify.
The files to add to source control are:
The .work file that represents the application. It appears at the root
of the application directory.
All source files that you have added or modified -- JWS, JCX, JSX, JSP,
and so on.
Any XML schema files that you have added to the Schemas project.
The files in the Resources folder in a web project.
Any JAR files that you have added to the Modules folder. These
files are stored at the root of your application in the file system.
Any JAR files that you have added to the Libraries folder. These
files are stored in the APP-INF/lib
folder in the file system.
The following files in the WEB-INF
folder in a web project: web.xml,
The global.app file in the
The tag libraries that appear in the WEB-INF
folder in a web project, if you have page flows and JSP files in your
project. These files end with the .tld and .tldx extensions.
The JAR files that appear in the WEB-INF/lib
folder in a web project.
The files that are modified by the build process -- compiled classes, for
example -- do not need to be added to source control. You can add them, but
you'll have to check all of them out each time you build your application.
And since many of them are binary files and can't be modified directly, you
don't gain anything by keeping them under source control; if you're
developing your application as part of a team, putting these files under
source control is likely to generate confusion for team members.
The files that you do not need to add to source control are:
Files in the .workshop directory beneath the base application directory
Files in the META-INF directory
Files in the WEB-INF/.pageflow-struts-generated directory in a web
Files in the WEB-INF/classes directory in a web application project
Files in the WEB-INF/lib directory in a web application project
JAR files that are generated from a project in your application
Modifying the .work File Under Source Control
There is currently no way to check out the .work file manually from
within WebLogic Workshop in the same way that you can check out other files
in your application. However, if the .work file is read-only, and you make a
change that requires modifying the .work file, WebLogic Workshop will prompt
you to check it out.
Changes to your application which modify the .work file include:
Adding, importing, or deleting a project
Changing settings in the Application Properties dialog.
Changing settings in the Project Properties dialog.
Note: You should be careful about checking in the modified
.work file when you are working in a team development environment. When you
save the file, WebLogic Workshop may change the
server.path variable within the file from a relative path to an
absolute path to the server directory on your computer. Since it's unlikely
that other users have the exact same absolute path on their computers, the
application may not function properly after they sync to your change. Unless
you specifically want to check in a change to the .work file, you generally
want to revert your changes rather than checking them in. A good way to know
is to perform a diff operation between the file that's in the source control
repository and the modified file on your local computer. If you do want to
check in changes to the .work file, you may need to edit the .work file
manually using a text editor to change the
server.path variable back to a relative path value.
ClearCase Source Control Integration
WebLogic Workshop integrates with the IBM Rational ClearCase. This topic
describes how to put your Workshop application under source control with ClearCase.
WebLogic workshop integrates with these ClearCase products:
ClearCase, ClearCase MultiSite and ClearCase LT, versions V2003, V2002 and
Setting Up Source Control Integration with ClearCase
WebLogic Workshop supports integration with ClearCase for a Workshop
application and all of its projects, or for an individual project with an
application. In either case, all of the files of the Workshop application or
project must be associated with a single ClearCase Version Object Base
(VOB). This restriction also means that:
The mapping between the files in a Workshop application or project and
the ClearCase VOB must be defined by a single snapshot view.
The root directory for the application or project must reside beneath
the root directory for the ClearCase VOB. If the root directory for the
application or project is in a subdirectory of the VOB root directory, then
all of the parent directories must also exist in the VOB.
It's possible for a single Workshop application to contain multiple projects
that are mapped to different VOBs and have separate associated views.
Note: We recommend that you create a snapshot view in
ClearCase to map your Workshop project files to the ClearCase VOB. You may
encounter unexpected behavior with Workshop if you are using a dynamic view.
To Add Your Workshop Application or Project to
Make sure that you have a snapshot view that provides access to the VOB
where your application or project files will reside. If you need help
creating this view, see the ClearCase documentation or ask your system
Create a new Workshop application or project in a directory that is
beneath the root directory for the VOB. If you are copying or moving an
existing application or project, you should clean it before you add it to
source control, so that build artifacts are not added along with source
files. To clean an application, select the application name in the
Application pane, right-click, and select Clean Application.
To clean a project, select the project name in the Application
pane, right-click, and select Clean <projectname>.
If you're adding an application to source control, select
Tools-->Application Properties, then select the Source
Control tab. If you're adding a project, select
Tools-->Project Properties--><projectname>, then select the
Source Control tab and clear the Use application's source
control settings option.
Set the Source control module option to
Set the cleartool directory option to point to the
location of the ClearCase cleartool utility.
If you accepted the defaults on installation, the directory containing the
cleartool utility should look something like
Note that you should include the path only, not the file name. The
cleartool utility is the command-line
utility that WebLogic Workshop uses to integrate with ClearCase.
Set the ClearCase Version option to your server
version. Be sure to verify that you have specified the right version, as you
may experience problems with ClearCase integration if the version is
Set the ClearCase view type setting to
snapshot, if you are using a snapshot view.
Set other options in the properties dialog as desired.
When you click OK, WebLogic Workshop will verify the location of the
cleartool utility and will verify that the
application or project's root directory is beneath the ClearCase VOB. If
your view is a snapshot view, WebLogic Workshop will also prompt you to
perform an update against the parent directory of the application or project
Adding Files to ClearCase
After you've configured WebLogic Workshop to integrate with ClearCase, you
can add the files in your application or project to ClearCase through the IDE.
To add a file, select the file in the Application pane, right-click, and choose
ClearCase-->Add or Add and Checkin.
There are some differences between versions of ClearCase in terms of how
files and directories are added to source control. These differences are
outlined in the following sections:
With ClearCase version V2003, when you add a file to source control, its
parent directories are automatically added as elements and checked out. If you
add the application or project root directory, the parent of this directory,
which is not visible in the Workshop IDE, is automatically checked out. You must
use an external ClearCase tool to check this directory back in.
If you execute the Add and Checkin command on a file, the
parent directories of the file are automatically checked in.
If you execute the Add and Checkin command on a directory,
you must check in the parent directories of that directory manually in order to
commit the addition.
ClearCase V2002 or Earlier
With ClearCase version V2002 or earlier, all parent directories must already
exist in the VOB and must be checked out before you can add a file that resides
in a subdirectory. You must check in all checked out parent directories to
commit the operation.
Using External ClearCase Tools
In some situations you will need to use external ClearCase tools, such as
ClearCase Explorer or the cleartool utility, to
perform certain operations on files in your application or project. These
Adding the .work file to ClearCase or checking it in. However, once
you've added the .work file to source control, WebLogic Workshop will prompt
you to check it out if you make a change that affects the .work file.
Adding, checking out, or checking in the parent directory of the root
directory of the application or project. In version V2003 only, this
directory will be automatically checked out when the root directory is added
to ClearCase, but an external tool is required to check it back in.
Checking in a file that is not the most recent version on the branch.
The ClearCase Find Checkouts utility may be useful in conjunction with
WebLogic Workshop. This utility shows all checkouts in the view, including those
that are not visible in WebLogic Workshop, like the parent directory of the root
directory of the application or project.
Checking Out Files
To check out a file from within WebLogic Workshop, right-click on the file in
the Application pane and choose ClearCase-->Checkout.
If the file you are checking out is not the latest version in the VOB, you'll
see a warning in the checkout dialog. At this point it's recommended that you
dismiss the dialog and update the file before continuing. You can also choose to
check the file out and merge your changes in with the head version in the VOB
when you submit the file.
Note that you cannot check out a file that is writeable.
Stopping ClearCase Commands
Once in awhile a ClearCase command may fail to finish executing. If this
happens, you can halt the command by right-clicking in the ClearCase
window and choosing Stop. Once you've enabled ClearCase
integration, the ClearCase window is available by choosing
Warning: Use caution when halting executing ClearCase
commands, as doing so can have unpredictable or undesirable results.