dcm:upload element - ibm-datapower/datapower-configuration-manager GitHub Wiki
The <dcm:upload>
element defines a set of files to upload:
<dcm:upload local="..." remotedir="..."/>
Required Attributes:
local - string suitable for an Ant FileSet <include> element
remotedir - fully qualified path for a directory on the target appliance
Upload all files and subdirectories to a directory on DP:
<dcm:upload local="${user.dir}/bob/**.*" remotedir="local:///something/bob">
Upload a specific file
<dcm:upload local="${user.dir}/bob/alice" remotedir="local:///something/bob">
The <dp:upload>
element is intended for the simple cases where you want to upload
a file, a directory, or a directory tree. A much more powerful technique is to
create your own Ant target that uses the <copy>
task with a complex FileSet
to prepare a temporary set of files and directories, then uses <dpupload>
to
upload that completed set of files. Here is an example based on the
dcm/build.xml build file:
<copy todir="/tmp/bob">
<fileset dir=".">
<include name="Apache*.txt"/>
<include name="build.xml"/>
<include name="deploy.ant.xml"/>
<include name="dist/**"/>
<include name="imports/**"/>
<include name="src/*.x*"/>
<include name="tests-deploy.ant/**"/>
<include name="tests-wdp/**"/>
</fileset>
</copy>
<dpupload dir="/tmp/bob" target="local:///somthing/bob" domain="${domain}" host="${host}" port="${port}" uid="${uid}" pwd="${pwd}"/>
(Okay, this is a highly contrived example since no one would actually want to upload DCM to DP. It saved me from coming up with a contrived DP-oriented example.)