The authoring environment for a WCM Web Project consists of a set of related AVM stores. There is a staging store, one or more author stores and possibly workflow stores. The different stores have a naming convention for their store names.
The consolidate flag says deploy all these related stores to the same location. If it is turned off by setting deployment.dmr.consolidate to false there will be a separate paths for each store and content will be duplicated in the DM store.
You can use spring to plug in your own implementation of the StoreNameMapper interface to control your project name mappings.
Root location mapping
The default implementation of RootMapper, the RootMapperImpl class, allows you to specify a default location for all web projects and also a map of mappings, one for each web project
By default the web projects are deployed to /app:company_home/app:wcm_deployed.
Extending the DM Deployment Target
The RootMapper interface allows you plug in your own mapping between web project and the destination of the contents of the web project.
The prepare callbacks (which are also implementations of the same FSDeploymentRunnable interface used in postCommit callbacks) are called by the DM Deployment Target immediately after the complete set of deployment files have been transferred to the DM Deployment Targets's temporary storage areas.
If exceptions are thrown by the callbacks then the deployment will fail and be rolled back. The exception will be propagated to the system calling the DM Deployment Target and the exception should be logged on both Deployment Engine and calling system.
The callbacks occur within the deployment transaction so should minimise the time they take to run since there are resources waiting for deployment to complete.
There is a postCommit callback available which is called after each successful deployment.
If exceptions are thrown by the callbacks then the exceptions will be logged. But it is too late to do anything else.
There is a sample adapter that will call an operating system command, such as a batch script, or the callback can call a custom java class.
The callback(s) are configured in the 'target' properties of the deployment configuration. They are called in sequence.