7.6. Limits and Considerations for Ant Recipes
7.6.1. Unsupported Ant Tasks
<ant>to reference a separate XML file in the bundle which contains the Ant targets)
<macrodef>and macro definitions
java.util.zip) included for the bundling system does not support symbolic links. Therefore, bundle recipes and configuration files cannot use symlinks.
<untar src="abc.tar.gz" compression="gzip" dest="somedirectory"/>
7.6.3. WARNING: The Managed (Target) Directory and Overwriting or Saving Files
- The file in the current directory is also in the bundle. In this case, the bundle file always overwrites the current file. (There is one exception to this. If the file in the bundle has not been updated and is the same version as the local file, but the local file has modifications. In that case, the local file is preserved.)
- The file in the current directory does not exist in the bundle. In that case, the bundle deletes the file in the current directory.
All of the information about the application being deployed is defined in the
<rhq:deployment-unit> element in a bundle recipe. The
manageRootDir attribute on the
<rhq:deployment-unit> element sets how the provisioning process should handle existing files in the deployment directory.
manageRootDirattribute applies to both the initial deployment and upgrade operations, so this can be used to preserve files that may exist in a directory before a bundle is ever deployed.
There can be files that are used or created by an application, apart from the bundle, which need to be preserved after a bundle deployment. This can include things like log files, instance-specific configuration files, or user-supplied content like images. These files can be ignored during the provisioning process, which preserves the files instead of removing them.
<rhq:ignore>element and list the directories or files to preserve.
<rhq:ignore> <rhq:fileset> <include name="logs/*.log"/> </rhq:fileset> </rhq:ignore>
<rhq:ignore>element only applies when bundles are updated; it does not apply when a bundle is initially provisioned.
<rhq:ignore>element only applies to file that exist outside the bundle. Any files that are in the bundle will overwrite any corresponding files in the deployment directory, even if they are specified in the
<rhq:ignore> are set in the recipe. At the time that the bundle is actually provisioned, there is an option to run a clean deployment. The clean deployment option deletes everything in the deployment directory and provisions the bundle in a clean directory, regardless of the
<rhq:ignore> settings in the recipe.