BuildForge Help

Importing Projects via the Command Line

Use the bfimport.exe or bfimport.pl utility (found in your installation directory) to perform command-line imports. You can also use this utility to perform imports through a project. The bfimport command expects the following command line format:
bfimport -[L | other options] <filename.xml>

Use the -L option to list the data objects in the XML file, or use other options to specify the data objects to be imported. If you do not specify any object types, or if the specified types do not exist in the XML file, the command does not import any data.

Note: The command needs to be able to find the buildforge.conf file in order to access the database, so the command must either be executed from your installation directory or the environment variable BF_CONFIG_FILE must be set to the full path to the buildforge.conf file.

The following options are available:

Option

Description

-L

List contents. This option must be used by itself (all the other options can be used in combination with each other). This option lists the objects that are contained in the XML file. For example:
c:\Program Files\IBM\Build Forge>bfimport -L CallHelloWorld.xml
Import: 2004:
Project: CallHelloWorld
Project: Hello World
Server: Server3
Class: Production

-p

Import projects

-I

Include chained projects

-P

Purge logs if replacing projects of the same names

-s

Import servers. Note that the system does not export server passwords, so you must enter the password for an imported server manually.

-e

Import environments

-c

Import classes

-g

-u

Import users

-T

Import notification templates

-f

Import filters

-r

Replace rather than rename imported items

-A Import using all users and access groups defined in the import file. Do not map. Create the objects if necessary.
CAUTION:
Security Risk. Restrict access to the Build Forge host to trusted users. This option could be used with a counterfeit export file to introduce new users and access groups or change existing users and access groups.

The following example shows a command to import a project, along with the output produced by the command:

c:\Program Files\IBM\Build Forge>bfimport -p CallHelloWorld.xml
Import: 2644: Project import enabled.
Import: 2644:
Import: 2644: Adding project "CallHelloWorld"
Import: 2644: Tag variable "B" import complete.
Import: 2644: Step 1:\"CallHelloWorld\" import complete.
Import: 2644: Project import complete.