XML我想将标记 DOMAIN 的值从111.111.111.111
更改为222.222.222.222
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!--
Licensed Materials - Property of IBM
5725-I43 (C) Copyright IBM Corp. 2011, 2013. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or
disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
-->
<wl:adapter xmlns:wl="http://www.ibm.com/mfp/integration" xmlns:http="http://www.ibm.com/mfp/integration/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="maximo">
<!--This adapter has been upgraded, For more information about the changes, see the "Adapter timeout and concurrency" topic in the product Knowledge Center.-->
<displayName>maximo</displayName>
<description>maximo</description>
<connectivity>
<connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
<protocol>http</protocol>
<domain>111.111.111.111</domain>
<port>80</port>
<!-- Following properties used by adapter's key manager for choosing specific certificate from key store
<sslCertificateAlias></sslCertificateAlias>
<sslCertificatePassword></sslCertificatePassword>
-->
<connectionTimeoutInMilliseconds>30000</connectionTimeoutInMilliseconds>
<socketTimeoutInMilliseconds>30000</socketTimeoutInMilliseconds>
<!--The previous elements: <connectionTimeoutInMilliseconds> and <socketTimeoutInMilliseconds>, were added to <connectionPolicy> element. These elements correspond to TCP connection and socket timeouts when connecting to the back-end. For more details, see HTTP protocol specifications and "Adapter timeout and concurrency" topic in the product Knowledge Center.-->
<maxConcurrentConnectionsPerNode>2</maxConcurrentConnectionsPerNode>
<!--The <maxConcurrentConnectionsPerNode> element has been moved from <loadConstraint> element (and loadConstraint has been commented out). This element sets the maximum number of concurrent requests to the backend. For more information, see the "Adapter timeout and concurrency" topic in the product Knowledge Center.-->
</connectionPolicy>
<!--<loadConstraints maxConcurrentConnectionsPerNode="2" />-->
</connectivity>
<!-- Service Request -->
<procedure name="getFree"/>
<procedure name="getFreee"/>
</wl:adapter>
Ant Build File build.xml文件
<project>
<property environment="env" />
<property file="project.properties"/>
<xmltask source="C:\IBMMF63\Rought\maximo.xml" dest="C:\IBMMF63\Rought\maximo.xml">
<replace path="wl:adapter/connectivity/domain[text()]" withText="${adapter.ip}" />
</xmltask>
<target name="build" >
<exec executable="C:\IBMMF63\Rought\arg.bat">
<arg value="${java.home}" />
<redirector output="Log.txt" alwayslog="true"/>
</exec>
</target>
</project>
如果我错了,我是蚂蚁脚本的新手。
执行build.xml文件时出错
Buildfile: ....\build.xml
BUILD FAILED
....\build.xml:4: Problem: failed to create task or type xmltask
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
答案 0 :(得分:0)
xmltask是一个蚂蚁插件,需要蚂蚁路径上的xmltask.jar,然后使用ant taskdef task将其带入游戏:
<project>
<!-- Import XMLTask -->
<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask"/>
[...]
</project>