Rational Asset Manager 的示例 Ant 文件

该页面包含可与 IBM® Rational® Asset Manager 一起使用的简单示例 Ant 文件。
<?xml version="1.0"?>
<project name="Ant sample" basedir="." xmlns:ram="antlib:com.ibm.ram.ant" default="submit">

    <ram:server id="ramServer" username="admin" password="admin" url="http://localhost:8080/com.ibm.ram.repository.web.ws.tomcat" />
    <property name="tempdir" value="${basedir}/build" />
    <delete dir="${tempdir}" />

    <!-- Download dependent assets that will be used to build our asset. -->
    <target name="download">
        <ram:download destdir="${tempdir}" server="ramServer" extract="true">
            <ram:search name="Credit Management Service Implementation" version="1.0" />
        </ram:download>
    </target>
    
    <!-- Submit our asset. -->
    <target name="submit" depends="download">
        <ram:submit server="ramServer" guidproperty="guid">
            <ram:asset>
                <ram:name>Sample Service Implementation</ram:name>
                <ram:version>1.0</ram:version>
                <ram:community>Service Development</ram:community>
                <ram:assetType>Service Impl</ram:assetType>
                <ram:shortDescription>An implementation of a sample service</ram:shortDescription>
                <ram:artifact file="${tempdir}/CreditMgmtServiceImplPackage/Binary/sbf_runtime.jar" label="Binary" />
                <ram:artifact file="${tempdir}/CreditMgmtServiceImplPackage/Deploy/application.xml" label="DeployDescriptor" />
                <ram:relatedAsset type="Specifies">
                    <ram:search name="Credit Management Service Interface" version="1.0" />
                </ram:relatedAsset>
                <ram:relatedAsset type="Depends">
                    <ram:search name="Account Management DB" version="1.0" />
                </ram:relatedAsset>
                <ram:attribute name="Development context">
                    <ram:value>Eclipse 3.3</ram:value>
                </ram:attribute>
                <ram:attribute name="Runtime context">
                    <ram:value>WAS 7.0</ram:value>
                </ram:attribute>
            </ram:asset>
        </ram:submit>
        <echo message="${guid}" />
    </target>

</project>