Command Line Applications (LDC)#

Installing LDC License#

LDC license is host based.

  1. Obtain the hostid, just as you did for Architect, and send it to Lattix.

  2. Once we have the hostid and the user email address, we will send you a license file: ldc.lic.

  3. Save this license file in the config directory where you installed Lattix.

Note that you can also use ldclicense to configure the license for ldc.

You should now be able to run the ldc applications.

Please note that for large projects, you can increase Java heap size by using the argument -Xmxsize. For instance, -Xmx8g will increase the maximum heap size to 8 GB.

What is LDC?#

The LDC command-line applications can be used to automate the process of checking and updating the dependency model. Currently, there are 7 LDC applications:

  • ldcupdate

  • ldcreport

  • ldcdiff

  • ldcscript

  • ldcget

  • ldcpublish

  • ldclicense

Here are some common uses intended for LDC applications:

  • Create a new model or update a current model while maintaining a history of dependency models.

  • Generate reports in a variety of formats and configured to contain a variety of information. Maintain a history of reports. The available formats include xml, html, text, xls, csv, jpg and png. The contents of the report include how the new model is different from the old one, what rule violations were found as well as a variety of data such as metrics, DSM, usage, worklist and a variety of other information.

  • Publish and extract projects into and from the repository respectively.

  • Run custom scripts on projects.

The LDC command-line applications can be readily integrated with Ant, Maven, Cruise Control and other IDEs and build systems. You can set up your build scripts that allow you to test if there were rule violations and to send out email.

Example Use#

Here is an example script that gets a project from the repository, updates it, generates an impact report and then publishes the updated snapshot to the repository.

REM ---- Set Path ----
set PATH="c:\Program files\Lattix8.0\bin";%PATH%

REM ---- Get the current project snapshot from the repository ----
ldcget -host:localhost -port:8080 -app:LattixWeb -track:AntDemo -output:LDC_Ant.ldz
      -user:name -password:password

REM ---- Update the snapshot with new datasource ----
ldcupdate LDC_Ant.ldz -module:java ant151.jar -deltatags -generatedetailedreport
      -report:html -reportFile:ant151update.html -deltaviolations:dviolations.xml

REM ---- Produce an impact report on what's new and changed ----
ldcreport LDC_Ant.ldz -report:html -impact -source:UpdateDelta -closure

REM ---- Publish the new snapshot to the repository ----
ldcpublish LDC_Ant.ldz -host:localhost -port:8080 -app:LattixWeb -track:AntDemo
      -user:name -password:password