On this page:
Target audience:
CAST Administrators
Summary: This document provides technical information about the extension called DMT Framework Scanner (com.castsoftware.dmtxmlscanner).
Description
The DMT Framework Scanner (com.castsoftware.dmtxmlscanner) extension automatically generates information for the Source Code Delivery report that is available in the CAST Delivery Manager Tool. The extension can be downloaded on its own as a standalone extension and is also shipped and automatically installed with CAST 8.3.x where x ≥ 5.
What does it do
The extension will scan all source code it encounters during the packaging action (scan phase) in the CAST Delivery Manager Tool and will attempt to identify a framework based on predefined patterns provided with the extension. Information about any framework that is identified in the source code will be provided in the Source Code Delivery report that is available in the CAST Delivery Manager Tool:
Note that when an XML file is
Out of the box framework pattern support
The extension is shipped with a set of predefined pattern configuration files that are set up to identify the most common frameworks. When the extension is installed, the "active" pattern configuration files can be found in the following location:
<delivery_folder>\dmtxmlscanner-<version>\*.config
The following patterns are provided "out of the box" - please check each .config file to see which frameworks are supported:
Technology | Pattern file | Notes |
---|---|---|
C / C++ | ccpp_language.config | Identifies frameworks based on file extensions and other methods. |
.NET | dotnet_language.config | Identifies frameworks based on file extensions and other methods. |
JEE XML file | framework_doctypes.config | Identifies frameworks based on the URL referenced in the DOCTYPE element in the XML file. |
JEE XML file | framework_xmlnamespaces.config | Identifies frameworks based on the XMLNS attribute of the first node in the XML file, or the schema location. For example, the following is taken from a Spring Framework 3.1 for Spring Beans: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xmlns:jee="http://www.springframework.org/schema/jee" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.1.xsd" default-lazy-init="true"> The above would be matched by the following predefined pattern: springbeans;3.1;http://www.springframework.org/schema/beans/spring-beans-3.1.xsd Note that if a version number attribute is found in the XMLNS, then this number will be recorded, rather than the version number specified in the *.config file. |
JEE XML file | framework_xmlnodes.config | Identifies frameworks based on the first XML element in the XML file if it doesn't have any attributes. If it is not possible to identify the framework with the first element in the XML file, then the next child element will be used: this is targeted at build systems such as Maven and Ant which use an initial <project> element with attributes and then a child element called <target>, take for example this Ant XML file: <project name="simpleCompile" default="deploy" basedir="."> <target name="init"> <property name="sourceDir" value="src"/ > <property name="outputDir" value="classes" /> <property name="deployJSP" value="/web/deploy/jsp" /> <property name="deployProperties" value="/web/deploy/conf" /> </target> To match the above, use the following configuration in the .config file: ant;;project/target |
Java | java_language.config | Identifies frameworks based on file extensions and other methods. |
PHP | php_language.config | Identifies frameworks based on file extensions and other methods. |
Python | python_language.config | Identifies frameworks based on file extensions and other methods. |
Web related (AngularJS, jQuery etc.) | web_language.config | Identifies frameworks based on file extensions and other methods. |
Customizing framework support
If you would like to customize the list of frameworks identified by the extension, you can do so by modifying the appropriate *.config file located here:
<delivery_folder>\dmtxmlscanner-<version>\*.config
This will modify the extension in the current Delivery folder for all Applications managed in that Delivery folder. The majority of *.config files use the following format:
fileExtensions=<semi-colon_separated_list> <framework_name1>;<version>;<framework_identifier_pattern> <framework_name2>;<version>;<framework_identifier_pattern> etc.
framework_xmlnamespaces.config
When using the framework_xmlnamespaces.config to match XML namespaces, you can use a "wildcard" pattern when you want to match multiple different frameworks in the same XML file, as follows:
<framework>;x.y.z;<framework_identifier_pattern>
For example, to avoid entering the following in the .config file to match the specific versions of the ActiveMQ framework:
activemq;4.1.1;http://activemq.apache.org/schema/core/activemq-core-4.1.1.xsd activemq;4.1.2;http://activemq.apache.org/schema/core/activemq-core-4.1.2.xsd
you can use the following to match all versions of the framework:
activemq;x.y.z;http://activemq.apache.org/schema/core/activemq-core-x.y.z.xsd
XML file size limit
All XML files over 1MB in size will be ignored - this is to avoid performance issues when very large XML files are present in the source code.
CAST AIP compatibility
CAST AIP release | Supported |
---|---|
8.3.x where x ≥ 5 | |
8.2.x | |
8.1.x | |
8.0.x | |
7.3.x |
Supported DBMS servers
This extension is compatible with the following DBMS servers:
CAST AIP release | CSS | Oracle | Microsoft |
---|---|---|---|
All supported releases (see above) |
Prerequisites
An installation of any compatible release of CAST AIP (see table above) |
Download and installation instructions
Please see:
The latest release status of this extension can be seen when downloading it from the CAST Extend server.
CAST Delivery Manager Tool GUI
The extension provides two CAST Delivery Manager Tool "discoverers", these can be seen below:
Discoverer | Description |
---|---|
Source file scanner | Scans file extensions only as defined in the .config files named <technology>_language.config |
XML scanner | Scans only XML files as defined in the .config files named framework_<type>.config |
- If you have existing packages:
- and this extension (nor its predecessor the DMT XML Scanner 1.0) have been installed before, then both discoverers will not be automatically activated (i.e. ticked). If you would like to benefit from the information provided by the extension in the Source Code Delivery report, please enable them before the next package action.
- and the extension's predecessor (DMT XML Scanner 1.0) has been installed before, then the XML scanner discoverer will be ticked, but the Source file scanner will not.
- For all packages created after the installation of the extension, both discoverers will be automatically activated (i.e. ticked).
What results can you expect?
The results of the source code scan can be seen in the Source Code Delivery report in the CAST Delivery Manager Tool:
This report is an XML file and a specific section is dedicated to reporting any frameworks/versions that have been identified in the source code, for example: