< Previous | Next >

Lesson 5: Add an element for generating a report

This lesson shows you how to add an Ant script element to generate a report.

To add the element:

  1. Position the cursor before the closing </target> tag and type <pu.
  2. In the element completion window, double-click PublishUMLBIRTReport.
  3. For the value of the modelPath attribute, enter the fully qualified path to the SimpleUMLModel model. This is the same as the value that you entered for the modelPath attribute in the previous lesson.
  4. For the value for the targetOutputFolder attribute, type C:\temp\antrpt.
  5. For the value of the targetOutputFile attribute, type MetricReport.html.
  6. For the value of the reportDesignFile attribute, enter the fully qualified path to the UML Model Metric Report report design file. To find the path, do the following steps:
    1. Click Windows > Show View > Other, expand the Reporting node, and double-click Report Explorer to open the Report Explorer view.
    2. Expand UML Model.
    3. Right-click UML Model Metric Report; then click Properties.
    4. Copy the full URL, beginning at file:/, and then click Cancel.
    5. Paste the URL as the value for reportDesignFile.
  7. Leave the other attributes to use their default values.
  8. Click File > Save to save the file.

The Ant script should now contain the following elements. Note that some of your attribute values will be different.

<project default="MyTarget">
<target name="MyTarget">
        <com.ibm.xtools.publish.CLModelPublish
          modelPath="C:\workspace\SimpleUMLModel\models\SimpleUMLModel.emx"
          outputFolder="C:\temp\antpub"
          outputFilename="index.html"
          overwriteExisting="true"
          preview="false"
          showIcons="true"
          genDate = "false"
          diagramImageFormat="gif"
          detailLevel="full"
          errorHandling="ignore"/>
	    
       <com.ibm.ccl.erf.rsa.report.ic.ant.UMLBirtReportPublish 
          modelPath="C:\workspace\SimpleUMLModel\models\SimpleUMLModel.emx" 
          targetOutputFolder="C:\temp\antrpt" 
          targetOutputFile="MetricReport.html" 
          reportDesignFile="file:/C:/Program Files/IBM/SDPShared/plugins/com.ibm.ccl.erf.rsa.report.data/designs/umlModelMetrics.rptdesign" 
          overwriteExisting="true" 
          autoShowPublishedOutput="false" 
          errorHandling="ignore" 
          outputType="html"
          transform=""/>
	    
  </target></project>
< Previous | Next >

Feedback