Deprecation Warning cdeploy is deprecated in 3.0 and will be removed in subsequent releases |
cdeploy is an Ant task that configures Cayenne connection information in existing jar files that contain Cayenne project information. It is useful for the automation of deployment of Cayenne-based frameworks in different environments.
Parameters
Attribute | Description | Required |
---|---|---|
src | Source jar file that contains Cayenne project files among other things. | Yes |
dest | Destination jar file that should be generated as a result of this task execution. If omitted, src is used. | No |
altProjectFile | An alternative location of cayenne.xml file. User can specify an arbitrary file. This file will be used as the main project file, replacing any existing cayenne.xml in the source jar. This gives the users an ultimate flexibility in configuring deployment libraries. For instance this feature can be used to deploy standalone DataMaps. | No |
Nested Elements:
node
One or more nested "node" elements specify connection information for the named nodes. All nested nodes must exist in the project, or otherwise they will be ignored.
Nested node Parameters:
Attribute | Description | Required |
---|---|---|
name | DataNode name | Yes |
domain | Parent DataDomain of this node. If omitted, project must have only a single domain (very common case). | No |
adapter | DataNode adapter. | No |
dataSource | DataSource name to use for this node. | No |
driverFile | File that contains driver information. | No |
"dataSource" and "driverFile" are mutually exclusive, but none of them are required.
Examples
Here is an example of using cdeploy to regenerate a jar file called "business.jar" with connection info located in "alt.driver.xml":
<cdeploy src="business.jar"> <node name="main-node" driverFile="alt.driver.xml"/> </cdeploy>
An example of using cdeploy to redeploy a 3rd party library that contains DataMaps, but may not contain cayenne.xml:
<cdeploy src="business.jar" altProjectFile="my-cayenne.xml"/>