Page tree
Skip to end of metadata
Go to start of metadata

Package


The Package option is found in the CAST Delivery Tool Manager regardless of which mode is in use.

Package is an action that will start a multi-step process to package the source code using the configuration settings you have defined in the Package Configuration tab. The end result of a successful Package action will be a source code package or packages that can be delivered to the CAST AI Administrator (if working via the CAST AIC Portal). These packages will then be subject to a source code analysis run from the CAST Management Studio.

Running the action

The Package action can be run from different locations and the location will determine what is included in the packaging process. The following table lists each location:

Location Toolbar option Behavior
Version page (note that you can also use the located in the Version section in the

Application page)

When launched from the Version page, all child source code packages (of the current Version) will be packaged and, in addition, a validation step will be performed (find out more about each step below).

The following dialog box will be displayed when you click the option - click Finish to continue the packaging process:

Force extraction

By default, if any of the the child source code packages have already been packaged and the configuration parameters (i.e. those selected in the Package Configuration tab) have not changed since this previous packaging, then the source code will not be extracted again and will be skipped in the current process.

For example, the source code package "DB2_ZOS" has been skipped while the source code package "J2EE_CASTPUBS" has been packaged:

If you want to force the source code package(s) to be extracted (for example when installing a CAST AIP extension or a new version of an extension), then you should select the Force extraction option. This will ensure the source code is re-extracted, regardless of whether they have been packaged before and whether their configuration parameters have changed.

You can find out more about each step in the process below.

Force scan

By default, if any of the the child source code packages have already been packaged and the configuration parameters (i.e. those selected in the Package Configuration tab) have not changed since the previous packaging, then the scan action (part of the source code discovery process) will be skipped.

If you have installed a CAST AIP Extension (for example a file discoverer) and want to force the source code package(s) to be scanned again, then you should select the Force scan option. This will ensure all source code packages are scanned during the packaging, regardless of whether they have been scanned.

Note however, that the previously packaged source code must exist on the workstation on which the package action is being run:

  • If the package action is being run in the CAST Delivery Manager Tool accessed directly from the CAST Management Studio (see modes for more information) then the source code will always be available.
  • If the package action is being run in the CAST Delivery Manager Tool accessed directly from the CAST AIC Portal (see modes for more information), then the packaged source code will have been deleted from the local workstation the end of the previous package action. In this scenario, you must choose the Force extraction option instead, which will extract the source code and scan it.

You can find out more about each step in the process below.

Source Code Package page When launched from the Source Code Package page, by default, the entire Version and all of its child source code packages will be packaged, in addition, a validation step will be performed (find out more about each step below).

The following dialog box will be displayed when you click the option - click Finish to continue the packaging process:

Force extraction / Force san

See explanation above.

Entire version / Current package

Use this option to choose whether you want to package the Version and all of its child source code packages (this is the default) or just the current source code package. You should choose the Current package option only when you want to package just the current package, for example, when there are multiple Delivery Managers working on the same Version.

You can find out more about each step in the process below.

Results and logs

When you run the Package action, results will first be displayed in the Progress dialog box:

If any steps display a warning you can select the step and click the Details link to view more information and a link to the log file that should identify the problem:

Note that an error in any of the steps may halt the packaging process completely - this usually occurs in the Extraction step as this step tries to access the database, SVN, repository or folder/file selected in the Package Configuration tab.

Results about the projects and files that have been discovered during the Package action are displayed in the Package Content tab. When you have completed the Package action for all source code packages and you have examined the Package Content tab to make sure that the projects you require are marked as "Selected", you can then use the Deliver action to upload the source code to the CAST AIC Portal (if you are working directly from the CAST Management Studio, this isn't necessary).

Note about packaging DB2 z/OS Note that during the packaging of a DB2 z/OS package, specific checks will be carried out to ensure the the package is valid. These are explained in DB2 z/OS.

Note about packaging PL/SQL / Oracle Server If an object is compiled during the Package action, then a warning is raised in the log and the extraction will successfully complete with the message Execution succeeded (this means that the .castextraction file will be generated and can be used without any further issue: compilation does not modify the object scripts). Example from the log:

2018-01-08 13:37:33.467 - Some objects from 'Schema A' have been compiled during the extraction: initial 'Last Compilation Date' is '2018-01-08 13:36:57.0', new 'Last Compilation Date' is '2018-01-08 13:37:13.0'
2018-01-08 13:37:33.470 - Disconnected!
Execution succeeded!


If an object is modified during the Package action, then an error is raised in the log and the extraction will fail with the message Execution failed (this means that the .castextraction file will be generated but must not be used: a modification will change the object scripts and the schema will therefore be inconsistent and the Package action must be re-run). Example from the log:

2018-01-08 13:39:27.742 - Invariance error #-10: 'Schema A' has been modified during the extraction: initial 'Last Modification Date' is '2017-07-17:11:22:08', new 'Last Modification Date' is '2018-01-08:13:39:09'
2018-01-08 13:39:27.743 - Some objects from 'Schema A' have been compiled during the extraction: initial 'Last Compilation Date' is '2018-01-08 13:37:13.0', new 'Last Compilation Date' is '2018-01-08 13:39:09.0'
2018-01-08 13:39:27.760 - Disconnected!
Error executing: Extraction -driver oracle.jdbc.OracleDriver -url jdbc:oracle:thin:@server:1521:TEST -user A -password **** -parameters schema=A;minimal_access_mode=all -target C:\TEST\exportResults => -1
Execution failed!

Information about each step

This section explain each step in the Package process:

Extraction This step corresponds to the CAST Delivery Manager Tool accessing the location of your source code as defined in Package Configuration tab - Where is your source code?

This step is skipped:

Scan During this step, the source code location (database/schema/folder/repository etc.) is scanned in order to identify the source code resources.

This step is skipped:

Discovery During this step the CAST Delivery Manager Tool uses a "discoverer" that matches the target source code type to identify what should be included in the source code package.

This step is skipped:

Selection During this step, the CAST Delivery Manager Tool computes a list of resources (source code files etc.) that will be included in the source code package. This is based on:

This step is skipped:

Validation During this step, the CAST Delivery Manager Tool will validate the resources that have been selected and extracted. Any missing resources will cause an alert to be generated - alerts are listed in the Package Content tab - Package generation alerts
Package and CAST Delivery Manager Tool modes

The Package action will function slightly differently depending on which mode you are working in:

Via CAST AIC Portal Package will store all extracted source code and logs locally in the CAST Delivery Manager Tool workspace (i.e. on the local hard disk). As such, you must use the Deliver action to upload the extracted source code and logs to the CAST AIC Portal (i.e. to the Source Code Delivery Folder).

Package will not function when a Version has been closed.

Direct from CAST Management Studio Package will store all extracted source code and logs in the Source Code Delivery Folder. The Deliver action does not "upload" anything, however it is used to Close the Version (mark it as "Deliver Done").

CAST Website

  • No labels