Discovery - how does it work?
Discovery is the second step in the Package action. Users of older versions of CAST will be familiar with the concept of Discovery, but for newcomers it can be described as follows:
Discovery is a process whereby the CAST Delivery Manager Tool will attempt to automatically identify projects (for example: an Eclipse Java project, or an SQL database) within your Source Package using a set of predefined rules. When the Package action is complete, you can view the projects that have been identified in the Package Content tab (in the List of projects that will be analyzed section).
When a successfully Packaged Source Code Package is subsequently deployed in the CAST Management Studio, an Analysis Unit will be created for each project that has been identified during the Discovery process and is not excluded by a rule or filter.
How does it work?
The Discovery step works as follows:
- the Discovery engine lists the files in each folder, then each sub-folder recursively
- the Discovery engine submits each file to the Discoverers (i.e. for each supported technology)
- each Discoverer can reply as follows:
- it is not interested in the file (the Discovery process continues)
- it created a Project from the file but the the Discovery process continues
- it owns the folder (no need to continue the Discovery process for this folder)
- the Project(s) created by the Discoverer has:
- a Root Path: the file or folder that was used to create this Project (for example: .project for Eclipse)
- a list of Significant Paths (optional): a sample of files that ensure that the project is still in existence (e.g.: for SAP, some ABAP files are discovered)
Discoverers
Below is a list of all current Discoverers for each supported technology:
ASP
Type | Notes | Discovered options |
Source-based support | Configures a project for the highest level source code folder using ASP extensions. | Root path |
.NET
Type | Notes |
C#/VB.NET project support | Configures a project for each Microsoft Visual Studio C# project (*.csproj file) or VB.NET (*.vbproj file) identified. |
C#/VB.NET Web Site support | Configures a project for each Microsoft Visual Studio C#/VB.NET Web Site identified. In order to be identified as a Web Site project, the root folder must contain a web.config file. If a .csproj or .vbproj file is found in a sub-folder of the root Web Site project folder, a corresponding C# or VB.NET project will be created and the sub-folder will not be included in the Web Site delivery. |
Note that an exclusion rule is active by default, which will force basic .NET web site projects to be discovered but ignored when a full .NET project exists:
C++
Type | Notes | Source Package configuration |
Visual Studio 20xx project support | Configures a project for each Microsoft Visual Studio 2003 - 2008 project (*.vcproj file) and each Visual Studio 2010/2012 project (*.vcxproj file) identified. Handles Inherited Property Sheets and standard Visual Studio macros:
Only the Release configuration is identified. If there is no Release, then the first configuration is identified instead. |
|
Please note the following: If a property sheet (.vsprops) is referenced from a Visual C++ project (.vcproj or .vcxproj) through the use of an environment variable, no alert (see Package Alert tab - Packaging alerts) is triggered for this variable when discovering the project and no remediation can be added for this alert. Therefore, the property sheet may not be found during the discovery (which leads to badly configured analyses). In the case an Environment Variable is used to reference a property sheet, you have several possibilities:
|
Forms
Type | Notes | Discovered options |
Option: Source-based support (extractor embedded in the CAST Delivery Manager Tool) | Configures a project for each of the following extracted files: FORMS Analysis Unit (pointing to .uaxdirectory file)
Oracle Reports Analysis Unit (pointing to .rex file)
| Project path only |
Option: extractor output |
J2EE
Type | Notes | Source Package configuration |
Eclipse project support | Configures a project for each Eclipse Java project (.project with Java nature) identified |
|
Maven project simplified support | Configures a project on each folder that contains a pom.xml file except when the type of packaging declared in the pom.xml is "pom". Note that project inheritance and project aggregation is supported |
|
Note that any Maven project whose type is set to "eclipse-plugin" will be ignored by the Maven discoverer. An "eclipse-plugin" project means that an associated Eclipse project also exists and therefore should be handled by the Eclipse discoverer. In this siutation, CAST highly recommends that you tick the following exclusion rule in the CAST Delivery Manager Tool:
Mainframe - when "Files on your system" option is used
Type | Notes | Discovered options | Stop conditions |
Source-based support | Configures a project for the highest level source code folder if one of the following file types is discovered:
| Root path | None |
PowerBuilder
Type | Notes | Discovered options | Stop conditions |
Source-based support | Configures a project for each .PBT file identified. |
| None |
SAP
Type | Notes | Discovered options | Stop conditions |
Source-based support | Configures a project for the highest level source code folder using ABAP extension. |
| Does not scan in sub-folders of a SAP Table extraction folder |
SQL
Type | Notes | Discovered options | Stop conditions |
Offline SQL extraction support (PL/SQL (Oracle) and T-SQL (Microsoft/Sybase)). | Configures a project for each extracted database/schema (or *.uaxdirectory / .castextraction files) | Database/schema name | Does not scan in sub-folders below .uaxdirectory file. |
VB
Type | Notes | Source Package configuration |
VB project support | Configures a project for each VB project identified (each *.vbp file identified) | Project path only |
Notes
- Some file extensions are ignored because they are used by multiple technologies supported by CAST. Currently these extensions are:
- .INC (Mainframe and C++ technologies)