The expansion of wireless communication and mobile hand-held devices makes it possible to deploy a broad range of applications on mobile terminals such as PDAs and mobile phones. The constant context changes of mobile users oblige them to carry out many deployment tasks of the same application in order to obtain an application whose configuration satisfies the context requirements. The difficulty and the frequency of these deployment tasks led us to study the deployment in a mobile environment and to look for a solution for the automation of the deployment adaptation to the context. This paper studies the deployment sensitivity to the context in order to identify the variable deployment parameters and to analyze the impact of the deployment adaptation on the production life cycle of applications. The contribution made by this paper consists in an innovative middleware entity called Context-Aware Deployment of COMPonents (CADeComp), which can be plugged into existing middleware deployment services. CADeComp defines a flexible data model that facilitates the tasks of component producers and application assemblers by allowing them to specify the meta-information required to adapt the deployment to the context. The advantage of CADeComp is that it is based on reliable adaptive mechanisms that are defined by a platform-independent model according to the MDA approach. We propose a mapping of the CADeComp model to CCM. CADeComp was implemented and evaluated on this platform.