此练习向您展示如何编辑 Apache Ant 脚本来发布 Web 和报告。
在开始之前,您必须完成练习 2:创建和配置 Ant 脚本。
<project default="foo">
<target name="foo">
<!-- ===================================================================
modelPath: required parameter, fully qualified path(FQP) to the model to publish
outputFolder: required parameter fully qualified path(FQP) to folder to publish to
=================================================================== -->
<com.ibm.xtools.publish.CLModelPublish
modelPath="C:\Documents and Settings\user1\ws1\SimpleUMLProject\SimpleUMLModel.emx"
outputFolder="C:\myWebs\FooWeb"
overwriteExisting="true"
preview="false"
showIcons="true"
diagramImageFormat="gif"
detailLevel="full"
errorHandling="ignore"/>
<!-- ===================================================================
modelPath: required parameter, fully qualified path(FQP) to the model to publish
targetOutputFolder: required parameter, fully qualified path(FQP) to folder to publish to
targetOutputFile: required parameter, file name of the report
=================================================================== -->
<com.ibm.xtools.publish.CLReportPublish
modelPath="C:\Documents and Settings\user1\ws1\SimpleUMLProject\SimpleUMLModel.emx"
targetOutputFolder="c:\myRpts\simpleRpt"
targetOutputFile="metric.pdf"
reportName="Sample UML Metric Report"
overwriteExisting="true"
autoShowPublishedOutput="false"
errorHandling="ignore"/>
</target>
</project>
现在,您可以开始练习 4:测试并设置 Ant 脚本的自动执行。