Creating a scan configuration for a stream

You can create a source code data scan configuration with Engineering Workflow Management in the Eclipse client.

About this task

To create a source code data scan configuration, do the following:


  1. In the Team Artifacts view, expand the project area folder in which to create a scan configuration.
  2. Expand the Enterprise Extensions node, then right-click Source Code Data and select Open Scan Configurations to open the scan configurations editor.
  3. In the Scan Configurations editor, select the stream for which to run the scan. If no streams are listed, click Create.
  4. In the scan configurations editor, verify or change the configuration values.
    Enabled for background scan
    Select this box to run update scans on the stream at regularly scheduled intervals.
    Delay interval
    Specify the number of seconds to wait after a scan before another background scan begins. The default is 3600 seconds (1 hour).
    Run background scans only if changes
    Select this box if you do not want background scans to run if the stream has not changed since the previous scan.
    Maximum wait time
    Specify the maximum number of seconds that a scan request remains in a pending state while waiting for a previous scan request to finish. If the number of seconds is reached, the scan request times out with an error. The default is 600 seconds (10 minutes).
    Continue on error
    Select this box to continue scanning even if an exception is thrown during a file scan.
    Excluded components
    If there are components that do not need to be scanned for this configuration, click Add to list those components. Conversely, if there are components listed in the Excluded components list that should be scanned for this configuration, select the component and click Delete.
    Pruning Policy fields
    Specify how many successful scan results of each type to keep before they are automatically deleted.
    Advanced Settings
    Enter scan arguments for troubleshooting and debugging in the Advanced Settings field. Do not save arguments in a scan configuration, but only enter them as part of a scan request for a single scan. The format of a scan argument is -argument modifier, where the argument starts with a dash and the modifier, if there is one, follows the argument. Arguments and modifiers are case sensitive. The supported arguments are:
    Adds additional debug statements to the scan log. This argument can create large logs.
    -dump optional modifiers
    Dumps the raw source code data into the scan log. The amount of source code data dumped is determined by the scope of the scan. A stream scan dumps all the source code data for the stream. A component scan dumps the source code data only for the components listed. A language definition scan dumps the source code data for the files associated to the language definitions listed. You can specify the following optional modifiers:
    Runs a scan and dumps all the source code data to the scan log. This is the default dump action.
    Runs the scan and dumps only the source code data that has been modified during the scan to the scan log.
    Does not scan the source code data. This modifier dumps the source code data to the scan log.
    Adds a timestamp prefix to every statement in the scan log.
    Specifies how long the scan will wait for the indexes to update. By default, the scan waits for 30 seconds for the indexes to update before the scan times out and terminates with a warning. The warning means that the indexes are not complete but have no impact on the scanning of the files. The indexes complete the updates eventually.

    Background and user-requested scans are not complete until the JFS indexes are up to date after a scan. However, this does not apply to dependency build scans that skip the indexing phase. You can use this argument to determine whether to increase the time out value for the scan to enable indexing to complete.

    Helps determine why the JFS indexes are too large. The -orphanedFragments argument overrides the scan process and only runs the query.
    Creates a scan log without updating the source code data.
    Deletes source code data from the repository. The -delete argument applies to component and language definition reset scans. For component scans, the modifier deletes all source code data for the components listed in the scan request. For language definition scans, the modifier deletes all the source code data for all the files associated with the language definitions listed, both explicitly and implicitly, in the scan request.

    If you use the -delete argument with a stream scan, an error occurs. To delete all source code data for an entire stream, delete the scan configuration for the stream, which has its own project area permission setting. The -delete argument overrides the scan process and only deletes source code data.

    -share source stream URL
    Force a stream to share the source code data from another stream. You might specify the -share source stream URL argument when you have two or more streams used in a promotion, such as in development, test, and production. The source code data for test and production should be identical, which enables the source code data to be shared between the streams and reduces the amount of storage used in the repository. Some actions might cause the source code data to not be shared, which results in duplicate source code data being stored. The -share source stream URL argument forces the stream to share the source code data with the source stream. An update scan is performed during a share scan, in case there are file state differences that would require source code data for some files to be different. The source stream URL modifier in this case is the source stream URL, which can be found by right mouse clicking the source stream and selecting Copy URL. For example:
  5. Click the Save icon (Save configuration icon) in the toolbar to save the configuration.


When you click Source Code Data > Open Scan Configurations from the Enterprise Extensions node in the Team Artifacts view, the stream for which you created the configuration is listed under Streams.