Self-adaptive component-based architectures provide methods and mechanisms to support the dynamic adaptation of their structure under evolving execution context. Dynamic adaptation is particularly relevant in the domain of ubiquitous computing, which is subject to numerous unexpected changes of the execution context. In this paper, we focus on changes in the service provider landscape: business services may dynamically come and go, and their quality of service may vary. We introduce an extension of the MADAM component-based planning framework that optimizes the overall utility of applications when such changes occur. MADAM planning is based on dynamic configuration of component frameworks. The extended planning framework supports seamless configuration of component frameworks based on both local and remote components and services. In particular, components and services can be plugged in interchangeably to provide functionalities defined by the component framework. The extended planning...