![]() ![]() ![]() ![]() ![]() ![]() |
This chapter describes the attributes, modifiers, and usage of the propagation Ant tasks. The Ant tasks are broken down into online and offline tasks. Online tasks interact directly with a WebLogic Portal application that is running on a server. Offline tasks interact with previously exported inventory files.
Tip: | For a general overview of the Ant tasks, including use cases and examples, see Using the Propagation Ant Tasks. |
This chapter includes the following sections:
This section describes each of the online propagation Ant tasks. For an introduction to online tasks, see Overview of Online Tasks. The online tasks described in this section include:
Verify that the propagation servlet is not currently in use by another process. The mutex is scoped to the application, and is cluster aware. This means that if anyone is using the servlet in a particular application on any node in the cluster, the mutex is enforced: another user cannot use the servlet for that application on another node.
Tip: | The propagation servlet executes propagation tasks on the server. This servlet performs operations on WebLogic Portal data, and therefore does not allow more than one thread of execution at a time. For more information on the propagation servlet, see Deploying the Propagation Servlet. |
true
, allows the propagation management servlet specified by servletURL
to use HTTP. If set to false
, allows the URL to use HTTPS. Default: false
. See also Using Online Tasks with HTTPS and Deploying the Propagation Servlet. true
, the task ends in the event of an error. If set to false
, the task does not terminate. Typically, you set this attribute to false
in cases where you use Ant conditionals to control the flow in a series of propagation tasks. Default: true
. failOnError
attribute is set to false
.
Where earProjectName
is the name of the EAR project that contains the portal application that you are propagating. For example:
See also Using Online Tasks with HTTPS and Deploying the Propagation Servlet.
This task supports the Ant condition task. The condition task’s property is set if the Ant task succeeds.
If the failOnError
attribute is set to true
(the default), the script terminates if another thread has the mutex. The script must wait for the other thread to complete. See also Troubleshooting Online Tasks.
Listing 9-1 checks to see if the propagation servlet is in use. The script retries 10 times. Listing 9-2 uses an Ant conditional to test for success. If the task succeeds, a message is printed.
<target name="checkMutexDest" description="checks to see if the mutex is available">
<onlineCheckMutex
servletURL="http://localhost:7001/myProjectPropagation
/inventorymanagement"
username="weblogic"
password="weblogic"
allowHttp="true"
failOnError="false"
retryTimes="10"
/>
</target>
<target name="checkMutexDest" description="checks to see if the mutex is available">
<condition property="mutex_success">
<onlineMutex
servletURL="http://localhost:7001/myProjectPropagation
/inventorymanagement"
username="weblogic"
password="weblogic"
allowHttp="true"
failOnError="false"
retryTimes="10"
/>
</condition>
<antcall target="mutex_success" />
</target>
<target name="mutex_success" if="mutex_success">
<echo message="The mutex is available." />
</target>
This task performs two operations:
WARNING: | This task modifies the target application’s configuration. Any users with active sessions may experience unwanted behavior depending on the changes that are being committed. The risk to users is similar to the behavior they would see if an administrator made the same changes with the WebLogic Portal Administration Console. |
true
, allows the propagation management servlet specified by servletURL
to use HTTP. If set to false
, allows the URL to use HTTPS. Default: false
. See also Using Online Tasks with HTTPS and Deploying the Propagation Servlet. true
, the task ends in the event of an error. If set to false
, the task does not terminate. Typically, you set this attribute to false
in cases where you use Ant conditionals to control the flow in a series of propagation tasks. Default: true
.
This section describes the <modifier>
attributes available for this task. Each <modifier>
attribute has a name
and a value
. See the Usage section for an example of using modifiers.
Specifies a comment to use when new revisions of content are checked into a content management repository as a result of the propagation.
value = A single line of text.
Specifies what action to take when the task tries to update or delete a content item in a content management repository if that content item is already checked out.
(default) Do not update or delete the content item and write a message to the log.
Overrides the checked out content item, and adds or updates the content in the repository. This option reverts any changes made by the user who currently has the content item checked out and the changes in the change manifest are applied.
Specifies what action to take if the name of a workflow on the source system does not match the expected workflow name on the destination. This modifier lets you choose how to handle the situations by letting you choose whether to retain the workflow on the destination, or to abort the propagation of the source node that includes the workflow.
Tip: | Because WebLogic Portal does not propagate workflows, it is a best practice to ensure that the source and destination systems use exactly the same workflow. This practice ensures that nodes and types can be propagated with the least risk. |
(default) If the workflow name associated with a content node differs between the source and destination, retain the workflow on the destination.
If the workflow name associated with a content node differs between the source and destination, do not propagate the node. Note that if any nodes on the source system depend on the aborted node, they cannot be propagated either.
Specifies what action to take if a workflow name on the source system does not match the expected workflow name on the destination. This modifier lets you choose how to handle the situations by letting you choose whether to retain the workflow on the destination, or to abort the propagation of the source content type that includes the workflow.
Tip: | Because WebLogic Portal does not propagate workflows, it is a best practice to ensure that the source and destination systems use exactly the same workflow. This practice ensures that nodes and types can be propagated with the least risk. |
(default) If the workflow name associated with a content type differs between the source and destination, retain the workflow on the destination.
If the workflow name associated with a content type differs between the source and destination, do not propagate the type. Note that if any types on the source system depend on the aborted type, they cannot be propagated either.
Specifies how the propagation management servlet obtains the list of differences to process before the final inventory is committed to the server.
(default) The propagation servlet computes the differences between the uploaded inventory and the application inventory. It then applies those differences according to the policy and scope settings provided with the uploaded inventory. Pessimistic causes differences to be re-computed in real time based on the current state of the destination. Pessismistic differencing generally takes longer than optimistic. See also Understanding a Scope Property File and Understanding a Policies Property File.
The propagation servlet looks for the changemanifest.xml
file in the inventory. If the change manifest exists, it applies the specified elections from the manifest without recomputing the differences. With this option, the servlet does not honor scope or policy settings provided with the inventory. If this option is specified, but the changemanifest.xml
file does not exist, the servlet defaults to pessimistic.
This task supports the Ant condition task. The condition task’s property is set if the Ant task succeeds.
If the failOnError
attribute is set to true
(the default), the script terminates if the inventory is not committed successfully. Check the log files for additional information. See also Troubleshooting Online Tasks.
The following example commits the inventory file uploaded to the destination server with the OnlineUploadTask, which places the file in a standard location.
<target name="commitOpt">
<onlineCommit
servletURL="http://localhost:7001/myProjectPropagation/inventorymanagement"
username="weblogic"
password="weblogic"
allowHttp="true"
>
<modifier name="differenceStrategy" value="optimistic" />
<modifier name="cm_checkinComment" value="My sample checkin comment." />
</onlineCommit>
</target>
Download the inventory from a currently running WebLogic Portal application to a specified ZIP file.
Note: | This task extracts the portal inventory and attempts to write it to a ZIP file. If the ZIP file created exceeds 4 GB, this task fails and a message is written to the server log and the verbose log. If this occurs, try scoping your inventory to limit the size of the resulting archive file. See Understanding Scope for more information. |
true
, allows the propagation management servlet specified by servletURL
to use HTTP. If set to false
, allows the URL to use HTTPS. Default: false
. See also Using Online Tasks with HTTPS and Deploying the Propagation Servlet. true
, the task ends in the event of an error. If set to false
, the task does not terminate. Typically, you set this attribute to false
in cases where you use Ant conditionals to control the flow in a series of propagation tasks. Default: true
. outputToServerFileSystem
is false
, the file is saved locally, the name can include a relative or absolute path, and it must not already exist. If outputToServerFileSystem
is true
, the file is written to the destination server system, you must supply an absolute path on the server system, and the file must not already exist. false
. scope.properties
file. If specified, this file must exist or the task will fail. See Scoping with Ant Tasks. This task supports the Ant condition task. The condition task’s property is set if the Ant task succeeds.
If the failOnError
attribute is set to true
(the default), the script terminates if the inventory is not downloaded successfully. Check the log files for more information. See also Troubleshooting Online Tasks.
The following example downloads an inventory file called dest.zip
.
<target name="downloadDest">
<onlineDownload
servletURL="http://localhost:7001/myProjectPropagation/inventorymanagement"
username="weblogic"
password="weblogic"
allowHttp="true"
outputInventoryFile="${portal.prop.home}/test/ant/dest.zip"
/>
</target>
In order to maintain data integrity during a propagation session, the applications on the source and destination servers must be placed into maintenance mode. Maintenance mode prevents administrators from making changes to the portal through the WebLogic Portal Administration Console. Maintenance mode takes effect for the entire enterprise application (not just a single web application) and it takes effect for all nodes in a cluster. After the export of the finalized inventory is complete, you can turn maintenance mode off to enable the applications on the server for modifications.
This task toggles the state of maintenance mode on the server. This Ant task causes delegated administration and entitlements to deny access to all resources with policies within the application regardless of requested resource or capability.
Tip: | You can also set Maintenance Mode in the WebLogic Portal Administration Console, select Configurations > Service Administration. For more information, refer to the online help. |
true
, allows the propagation management servlet specified by servletURL
to use HTTP. If set to false
, allows the URL to use HTTPS. Default: false
. See also Using Online Tasks with HTTPS and Deploying the Propagation Servlet. true
, turns maintenance mode on. To turn maintenance mode off, and thereby allow users to modify portal resources, set this value to false
. true
, the task ends in the event of an error. If set to false
, the task does not terminate. Typically, you set this attribute to false
in cases where you use Ant conditionals to control the flow in a series of propagation tasks. Default: true
. This task supports the Ant condition task. The condition task’s property is set if the Ant task succeeds.
If the failOnError
attribute is set to true
(the default), the script terminates if maintenance mode could not be toggled. Check the Maintenance mode state in the WebLogic Portal Administration Console. See also Troubleshooting Online Tasks.
Listing 9-5 places the server into maintenance mode. Listing 9-6 uses an Ant conditional to place the server in maintenance mode and print a message if the operation is successful.
<target name="lockDest" description="lock the server">
<onlineMaintenanceMode
servletURL="http://localhost:7001/propagation/inventorymanagement"
username="weblogic"
password="weblogic"
allowHttp="true"
enable="true"
/>
</target>
<target name="lockDestC1" description="lock the server">
<condition property="lock_success">
<onlineMaintenanceMode
servletURL="http://localhost:7001/propagation/inventorymanagement"
username="weblogic"
password="weblogic"
allowHttp="true"
enable="true"
/>
</condition>
<antcall target="lock_success" />
</target>
<target name="locksuccess"
if="lock_success">
<echo message="Maintenance mode has been toggled."/>
</target>
Tests if the propagation management servlet is running on the designated server. This task verifies that the propagation servlet can be contacted. For information on the propagation servlet, see Deploying the Propagation Servlet.
true
, allows the propagation management servlet specified by servletURL
to use HTTP. If set to false
, allows the URL to use HTTPS. Default: false
. See also Using Online Tasks with HTTPS and Deploying the Propagation Servlet. true
, the task ends in the event of an error. If set to false
, the task does not terminate. Typically, you set this attribute to false
in cases where you use Ant conditionals to control the flow in a series of propagation tasks. Default: true
. This task supports the Ant condition task. The condition task’s property is set if the Ant task succeeds.
If the failOnError
attribute is set to true
(the default), the script terminates if the servlet does not return a successful reply. See also Troubleshooting Online Tasks.
Listing 9-7 tests to see if the propagation servlet is running. Listing 9-8 uses an Ant conditional to print a message if the task succeeds.
<target name="pingDest" description="ping the server">
<onlinePing
servletURL="http://localhost:7001/propagation/inventorymanagement"
username="weblogic"
password="weblogic"
allowHttp="true"
/>
</target>
<target name="pingDest" description="ping the server">
<condition property="ping_success">
<onlinePing
servletURL="http://localhost:7001/propagation/inventorymanagement"
username="weblogic"
password="weblogic"
allowHttp="true"
/>
</condition>
<antcall target="ping_success" />
</target>
<target name="ping_success" if="ping_success">
<echo message="The server is available." />
</target>
This task uploads an inventory file to a temporary location associated with a running WebLogic Portal application. You must execute this task before you execute the OnlineCommitTask. Only one inventory can be uploaded at a time.
This task overwrites an existing inventory file that exists in the upload location.
Note: | This task only moves a file. It does not affect the configuration of the running application. This operation is safe to do even with active users on the system. |
Note: | The propagation management servlet has a configuration setting to help mitigate “denial of service” attacks. The servlet is configured with a maximum size allowed for uploaded files (files uploaded over HTTP). By default, this is set to 1 MB. If any given file inside the inventory ZIP file is larger than this value, it will be rejected. The simplest way to work around this limit is to physically copy the inventory to the destination server, and then use the readFromServerFileSystem attribute of this task. For information on changing the servlet configuration to allow larger files, see Increasing the Default Upload File Size. |
true
, allows the propagation management servlet specified by servletURL
to use HTTP. If set to false
, allows the URL to use HTTPS. Default: false
. See also Using Online Tasks with HTTPS and Deploying the Propagation Servlet. true
, the task ends in the event of an error. If set to false
, the task does not terminate. Typically, you set this attribute to false
in cases where you use Ant conditionals to control the flow in a series of propagation tasks. Default: true
. true
, the inventory file is read from the destination server file system rather than from the source system. Use this attribute to eliminate the HTTP upload overhead for large files. Default: false
. readFromServerFileSystem
is true
, this file location is for the server file system. This task supports the Ant condition task. The condition task’s property is set if the Ant task succeeds.
If the failOnError
attribute is set to true
(the default), the script terminates if the upload fails. Check log files for more information. See also Troubleshooting Online Tasks.
The following example uploads a file called combined.zip
to the server.
<target name="upload">
<onlineUpload
servletURL="http://localhost:7001/propagation/inventorymanagement"
username="weblogic"
password="weblogic"
allowHttp="true"
sourceFile="${portal.prop.home}/test/ant/combined.zip"
/>
</target>
This section describes each of the offline propagation Ant tasks. For an introduction to offline tasks, see Overview of Offline Tasks. The offline tasks described in this section include:
Combines two inventories and reports in a change manifest file the differences as a set of adds, updates, and deletes.
Note: | This task extracts the portal inventory and attempts to write it to a ZIP file. If the ZIP file created exceeds 4 GB, this task fails and a message is written to the server log and the verbose log. If this occurs, try scoping your inventory to limit the size of the resulting archive file. See Understanding Scope for more information. For information on the verbose log, see Reviewing Log Files. |
Note: | This task extends the OfflineDiffTask task, so all attributes available for OfflineDiffTask can be used with this task too. |
true
, the task ends in the event of an error. If set to false
, the task does not terminate. Typically, you set this attribute to false
in cases where you use Ant conditionals to control the flow in a series of propagation tasks. Default: true
. This task supports the Ant condition task. The condition task’s property is set if the Ant task succeeds.
If the failOnError
attribute is set to true
(the default), the script terminates if no differences were found between the two inventories. See also Troubleshooting Offline Tasks.
The following example combines two inventories. Note that some of the attributes are taken from the OfflineDiffTask.
<target name="combine" description="Combine two inventories with logging">
<offlineCombine
sourceFile="${portal.prop.home}/test/ant/src.zip"
destFile="${portal.prop.home}/test/ant/dest.zip"
combinedInventoryFile="${portal.prop.home}/test/ant/combined.zip"
changeManifestFile="${portal.prop.home}/test/ant/combine_cm.xml"
logFile="${portal.prop.home}/test/ant/combine_log.txt"
verboseLogFile="${portal.prop.home}/test/ant/combine_verboselog.txt"
/>
</target>
Compares two inventories and reports the differences in a change manifest file as a set of adds, updates, and deletes.
true
, the task ends in the event of an error. If set to false
, the task does not terminate. Typically, you set this attribute to false
in cases where you use Ant conditionals to control the flow in a series of propagation tasks. Default: true
. true
. See also Understanding a Policies Property File. true
. See also Understanding a Policies Property File. true
. See also Understanding a Policies Property File. .properties
extension that contains the policies to use when comparing or combining inventories. This file must exist if specified. See also Using Policies. .properties
extension that contains the scoping information to use when comparing or combining inventories. This file must exist if specified. See also Scoping an Inventory. This task supports the Ant condition task. The condition task’s property is set if the Ant task succeeds.
If the failOnError
attribute is set to true
(the default), the script terminates if no differences are found. See also Troubleshooting Offline Tasks.
Listing 9-11 writes the differences between two files to a change manifest file.
<target name="diff" description="compare two inventories with logging">
<offlineDiff
sourceFile="${portal.prop.home}/test/ant/src.zip"
destFile="${portal.prop.home}/test/ant/dest.zip"
logFile="${portal.prop.home}/test/ant/diff_log.txt"
verboseLogFile="${portal.prop.home}/test/ant/diff_verboselog.txt"
/>
</target>
Allows for algebraic operations on two change manifest files. This task is not commonly used.
true
, the task ends in the event of an error. If set to false
, the task does not terminate. Typically, you set this attribute to false
in cases where you use Ant conditionals to control the flow in a series of propagation tasks. Default: true
. add
or subtract
.This task supports the Ant condition task. The condition task’s property is set if the Ant task succeeds.
If the failOnError
attribute is set to true
(the default), the script terminates if the algebraic operation failed. See also Troubleshooting Offline Tasks.
Listing 9-12 adds the contents of two change manifests. Listing 9-13 subtracts the contents of two change manifests.
<target name="electionsAdd" description="add the two election lists">
<offlineAlgebra
electionList1File="${portal.prop.home}/test/ant/elections1.xml"
electionList2File="${portal.prop.home}/test/ant/elections2.xml"
operation="add"
outputFile="${portal.prop.home}/test/ant/addedElections.xml"
/>
</target>
<target name="electionsSubtract" description="subtract the two election lists">
/>
<offlineAlgebra
electionList1File="${portal.prop.home}/test/ant/elections1.xml"
electionList2File="${portal.prop.home}/test/ant/elections2.xml"
operation="subtract"
outputFile="${portal.prop.home}/test/ant/subtractedElections.xml"
/>
</target>
Extracts top level files from an inventory file. These files are stored in an inventory ZIP file at the top level of the file, and can include a change manifest file, export file, manual changes file, policy file, and scope file.
changemanifest.xml
file from the inventory (if it exists). This XML file contains the change manifest file that describes all of the changes (adds, deletes, updates) made to the inventory. See also OfflineDiffTask. export.properties
file from the inventory. This file contains summary information about the inventory; including who exported it, when it was exported, how many nodes are in the export, and other information.true
, the task ends in the event of an error. If set to false
, the task does not terminate. Default: true
. manualchanges.xml
file from the inventory (if it exists). This file is provided for convenience, and describes the manual changes that are required to propagate the inventory. See also Make Required Manual Changes. policy.properties
file from the inventory (if it exists). This file contains the policy rules that were used to produce the inventory. See also Using Policies. scope.properties
file from the inventory (if it exists). This file contains the scoping rules that were used to produce the inventory. See also Scoping an Inventory. This task does not support the Ant condition task.
If the failOnError
attribute is set to true
(the default), the script terminates if any problems were encountered during the operation. See also Troubleshooting Offline Tasks.
The following example extracts specified files from an inventory file.
<target name="extractCombined" description="gather resources from the combined inventory">
<offlineExtract
sourceFile="${portal.prop.home}/test/ant/combined.zip"
exportFile="${portal.prop.home}/test/ant/extractCombined_export.properties"
scopeFile="${portal.prop.home}/test/ant/extractCombined_scope.properties"
policyFile="${portal.prop.home}/test/ant/extractCombined_policy.properties"
changemanifestfile="${portal.prop.home}/test/ant/extractCombined_change.xml"
logFile="${portal.prop.home}/test/ant/extractCombined_log.txt"
verboseLogFile="${portal.prop.home}/test/ant/extractCombined_verboselog.txt"
/>
</target>
Inserts top level files into an inventory file. These files are stored in an inventory ZIP file at the top level of the file, and can include a change manifest file, export file, manual changes file, policy file, and scope file.
changemanifest.xml
file from the inventory. This XML file contains the change manifest file that describes all of the changes (adds, deletes, updates) made to the inventory. See also OfflineDiffTask. true
, the task ends in the event of an error. If set to false
, the task does not terminate. Typically, you set this attribute to false
in cases where you use Ant conditionals to control the flow in a series of propagation tasks. Default: true
. policy.properties
file from the inventory. See also Using Policies. scope.properties
file into the inventory. See also Scoping an Inventory. This task supports the Ant condition task. The condition task’s property is set if the Ant task succeeds.
If the failOnError
attribute is set to true
(the default), the script terminates if the operation fails. See also Troubleshooting Offline Tasks.
The following example inserts specified files into an inventory.
<target name="insertCombined" description="insert resources into combined inventory">
<offlineInsert
sourceFile="${portal.prop.home}/test/ant/combined.zip"
policyFile="${portal.prop.home}/test/ant/extractCombined_policy.properties"
changemanifestfile="${portal.prop.home}/test/ant/extractCombined_change.xml"
outputFile="${portal.prop.home}/test/ant/newCombined.zip"
/>
</target>
Exports the valid policies from an inventory file. These policies are written into a .properties
text file. You can later edit this property file and use it as an input into other tasks, such as OfflineCombineTask. See also Using Policies.
true
, the task ends in the event of an error. If set to false
, the task does not terminate. Typically, you set this attribute to false
in cases where you use Ant conditionals to control the flow in a series of propagation tasks. Default: true
. true
. See also Understanding a Policies Property File. true
. See also Understanding a Policies Property File. true
. See also Understanding a Policies Property File. .properties
extension. This file must not already exist. This task supports the Ant condition task. The condition task’s property is set if the Ant task succeeds.
If the failOnError
attribute is set to true
(the default), the script terminates if the operation fails. The script can fail if there is a problem walking the inventory tree. See also Troubleshooting Offline Tasks.
The following example writes the policy file for the portal application.
<offlineListPolicies
sourceFile="${portal.prop.home}/test/ant/src.zip"
policyFile="${portal.prop.home}/test/ant/listPolicies_policies.properties"
globalAddFlag="true"
globalUpdateFlag="false"
globalDeleteFlag="true"
logFile="${portal.prop.home}/test/ant/listPolicies_log.txt"
verboseLogFile="${portal.prop.home}/test/ant/listPolicies_verboselog.txt"
/>
Exports the valid scoping information from an inventory file. Scopes are written into a .properties
text file. You can later edit this property file and use it as an input into other tasks, such as OfflineCombineTask. See also Using Policies.
true
, the task ends in the event of an error. If set to false
, the task does not terminate. Typically, you set this attribute to false
in cases where you use Ant conditionals to control the flow in a series of propagation tasks. Default: true
. .properties
extension. This file must not already exist. This task supports the Ant condition task. The condition task’s property is set if the Ant task succeeds.
If the failOnError
attribute is set to true
(the default), the script terminates if there was a problem traversing the inventory tree. See also Troubleshooting Offline Tasks.
The following example exports the scoped artifacts to a property file, using the default depth value of 3.
<target name="listScopes" description="lists the scopes found in the source inventory">
<offlineListScopes
sourceFile="${portal.prop.home}/test/ant/src.zip"
scopeFile="${portal.prop.home}/test/ant/listScopes_scopes.properties"
logFile="${portal.prop.home}/test/ant/listScopes_log.txt"
verboseLogFile="${portal.prop.home}/test/ant/listScopes_verboselog.txt"
/>
</target>
Searches an inventory for node names that match the specified string. The search string is only matched if it occurs in the node name (the last term in the taxonomy).
For example, consider the following inventory:
2. Application:PersonalizationService
3. Application:PersonalizationService:EventService:redEvent.evt
4. Application:PersonalizationService:EventService:coloredEvent.evt
5. Application:PersonalizationService:EventService:blueEvent.evt
If you search this inventory for the string red, the task returns nodes 3 and 4. If you search for PersonalizationService, the task returns just node 2.
true
, the task ends in the event of an error. If set to false
, the task does not terminate. Typically, you set this attribute to false
in cases where you use Ant conditionals to control the flow in a series of propagation tasks. Default: true
. This task supports the Ant condition task. The condition task’s property is set if the Ant task succeeds.
success – One or more matches are found.
failure – No matches are found.
If the failOnError
attribute is set to true
(the default), the script terminates if no matches are found. See also Troubleshooting Offline Tasks.
Listing 9-18 searches the specified inventory for the string global
. Listing 9-19 uses an Ant conditional to print a message if the search succeeds.
<target name="search">
<offlineSearch|
searchString="global"
sourceFile="${portal.prop.home}/test/ant/src.zip"
listFile="${portal.prop.home}/test/ant/search.txt"
logFile="${portal.prop.home}/test/ant/search_log.txt"
verboseLogFile="${portal.prop.home}/test/ant/search_verboselog.txt"
/>
</target>
<target name="searchC1" description="finds the nodes that contain the search string in
the name">
<condition property="search_success">
<offlineSearch
searchString="esktop"
sourceFile="${portal.prop.home}/test/ant/src.zip"
/>
</condition>
<antcall target="search_success" />
</target>
<target name="search_success" if="search_success"><echo message="The search succeeded." />
</target>
Verifies that the source ZIP file contains a valid portal application inventory. Use this task after moving or downloading an inventory to ensure that it was transferred successfully. This task ensures that the ZIP file’s internal structure adheres to an exported inventory. It does not validate the XML of every node in the inventory tree.
true
, the task ends in the event of an error. If set to false
, the task does not terminate. Typically, you set this attribute to false
in cases where you use Ant conditionals to control the flow in a series of propagation tasks. Default: true
. This task supports the Ant condition task. The condition task’s property is set if the Ant task succeeds.
If the failOnError
attribute is set to true
(the default), the script terminates if the file is not a valid inventory file. See also Troubleshooting Offline Tasks.
The following example validates the inventory file called src.zip
.
<target name="validateSrc" description="valid inventory, with logging">
<offlineValidate
sourceFile="${portal.prop.home}/test/ant/src.zip"
logFile="${portal.prop.home}/test/ant/validateSrc_log.txt"
verboseLogFile="${portal.prop.home}/test/ant/validateSrc_verboselog.txt"
/>
</target>
![]() ![]() ![]() |