Merge branch 'feature/CELIX-247_android_support' of https://git-wip-us.apache.org/repos/asf/celix into feature/CELIX-247_android_support
diff --git a/.gitignore b/.gitignore
index eb89068..98033a5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,4 +17,5 @@
 
 /.project
 .DS_Store
+.idea
 build
diff --git a/.travis.yml b/.travis.yml
index d66498f..bb53363 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,7 +12,7 @@
 before_script:  
     - mkdir build install
     - cd build
-    - cmake -DBUILD_DEPLOYMENT_ADMIN=ON -DBUILD_EXAMPLES=ON -DBUILD_LOG_SERVICE=ON -DBUILD_LOG_WRITER=ON -DBUILD_REMOTE_SERVICE_ADMIN=ON -DBUILD_RSA_DISCOVERY_CONFIGURED=ON -DBUILD_RSA_DISCOVERY_ETCD=ON -DBUILD_RSA_DISCOVERY_SHM=ON -DBUILD_RSA_EXAMPLES=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_SHM=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_HTTP=ON -DBUILD_REMOTE_SHELL=ON -DBUILD_SHELL=ON -DBUILD_SHELL_TUI=ON -DCMAKE_INSTALL_PREFIX=../install ..
+    - cmake -DBUILD_DEPLOYMENT_ADMIN=ON -DBUILD_EXAMPLES=ON -DBUILD_LOG_SERVICE=ON -DBUILD_LOG_WRITER=ON -DBUILD_REMOTE_SERVICE_ADMIN=ON -DBUILD_RSA_DISCOVERY_CONFIGURED=ON -DBUILD_RSA_DISCOVERY_ETCD=ON -DBUILD_RSA_DISCOVERY_SHM=ON -DBUILD_RSA_EXAMPLES=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_SHM=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_HTTP=ON -DBUILD_REMOTE_SHELL=ON -DBUILD_SHELL=ON -DBUILD_SHELL_TUI=ON -DBUILD_DEVICE_ACCESS=ON -DBUILD_DEVICE_ACCESS_EXAMPLE=ON -DCMAKE_INSTALL_PREFIX=../install ..
 
 script: 
     - make all && make deploy && make install
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 137c81b..a885df5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,7 +29,8 @@
 
 SET(CMAKE_BUILD_TYPE "Debug")
 IF(UNIX)
-	SET(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 -Wall ${CMAKE_C_FLAGS}")
+	SET(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 -Wall -pthread ${CMAKE_C_FLAGS}")
+    set(CMAKE_EXE_LINKER_FLAGS "-pthread ${CMAKE_EXE_LINKER_FLAGS}")
 ENDIF()
 IF(WIN32)
 	SET(CMAKE_C_FLAGS "-D_CRT_SECURE_NO_WARNINGS ${CMAKE_C_FLAGS}")
@@ -59,6 +60,7 @@
 endif()
 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
                ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h DESTINATION include/celix)
 
 ## New sub project must use a buildoption to be able to enable/disable the project using the CMake Editor
 ## Sub projects depending on another sub project automatically enable these dependencies
diff --git a/dependency_manager_2/CMakeLists.txt b/dependency_manager_2/CMakeLists.txt
index 7aecc61..373cd34 100644
--- a/dependency_manager_2/CMakeLists.txt
+++ b/dependency_manager_2/CMakeLists.txt
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-celix_subproject(DEPENDENCY_MANAGER2 "Option to build the dependency manager static library" "OFF" DEPS framework)
+celix_subproject(DEPENDENCY_MANAGER2 "Option to build the dependency manager static library" ON DEPS framework)
 if (DEPENDENCY_MANAGER2) 
     # Add -fPIC for x86_64 Unix platforms; this lib will be linked to a shared lib
     if(UNIX AND NOT WIN32)
diff --git a/deployment_admin/CMakeLists.txt b/deployment_admin/CMakeLists.txt
index cd267bf..1f18ae2 100644
--- a/deployment_admin/CMakeLists.txt
+++ b/deployment_admin/CMakeLists.txt
@@ -15,10 +15,11 @@
 # specific language governing permissions and limitations
 # under the License.
 
-celix_subproject(DEPLOYMENT_ADMIN "Option to enable building the Deployment Admin Service bundles" OFF DEPS framework launcher shell_tui log_writer)
+celix_subproject(DEPLOYMENT_ADMIN "Option to enable building the Deployment Admin Service bundles" ON DEPS framework launcher shell_tui log_writer)
 if (DEPLOYMENT_ADMIN)
 	
-	find_package(CURL REQUIRED)
+    find_package(CURL REQUIRED)
+    find_package(UUID REQUIRED)
 
     add_definitions(-DUSE_FILE32API)
     
@@ -27,6 +28,7 @@
 	SET_HEADERS("Bundle-Name: Apache Celix Deployment Admin") 
     
     include_directories("${CURL_INCLUDE_DIR}")
+    include_directories("${UUID_INCLUDE_DIR}")
     include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
     include_directories("${PROJECT_SOURCE_DIR}/deployment_admin/private/include")
     include_directories("${PROJECT_SOURCE_DIR}/deployment_admin/public/include")
@@ -58,5 +60,5 @@
     		public/include/resource_processor.h
 	)
     
-    target_link_libraries(deployment_admin celix_framework ${CURL_LIBRARIES})
+    target_link_libraries(deployment_admin celix_framework ${CURL_LIBRARIES} ${UUID_LIBRARY})
 endif (DEPLOYMENT_ADMIN)
diff --git a/deployment_admin/private/src/deployment_admin.c b/deployment_admin/private/src/deployment_admin.c
index 8c81b59..74a5ce4 100644
--- a/deployment_admin/private/src/deployment_admin.c
+++ b/deployment_admin/private/src/deployment_admin.c
@@ -218,7 +218,7 @@
 		char *last = arrayList_get(versions, arrayList_size(versions) - 1);
 
 		if (last != NULL) {
-			if (admin->current == NULL || strcmp(last, admin->current) > 0) {
+			if (admin->current == NULL || strcmp(last, admin->current) != 0) {
 				int length = strlen(admin->pollUrl) + strlen(last) + 2;
 				char request[length];
 				if (admin->current == NULL) {
@@ -460,6 +460,7 @@
 				fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "DEPLOYMENT_ADMIN: Bundle %s not found", info->symbolicName);
 			}
 		}
+		arrayList_destroy(infos);
 	}
 
 	return status;
@@ -500,7 +501,7 @@
 			bundleContext_installBundle2(admin->context, bsn, bundlePath, &updateBundle);
 		}
 	}
-
+	arrayList_destroy(infos);
 	return status;
 }
 
@@ -524,6 +525,7 @@
 			}
 		}
 	}
+	arrayList_destroy(sourceInfos);
 
 	if (target != NULL) {
 		array_list_pt targetInfos = NULL;
@@ -538,6 +540,7 @@
 				}
 			}
 		}
+		arrayList_destroy(targetInfos);
 	}
 
 	for (i = 0; i < arrayList_size(bundles); i++) {
@@ -583,7 +586,7 @@
 
 					int length = strlen(entry) + strlen(name) + strlen(info->path) + 7;
 					char resourcePath[length];
-					snprintf(resourcePath, length, "%srepo/%s/%s", entry, name, info->path, NULL);
+					snprintf(resourcePath, length, "%srepo/%s/%s", entry, name, info->path);
 					deploymentPackage_getName(source, &packageName);
 
 					processor->begin(processor->processor, packageName);
@@ -668,6 +671,7 @@
 				}
 			}
 		}
+		arrayList_destroy(targetInfos);
 	}
 
 	return status;
@@ -691,6 +695,7 @@
 			}
 		}
 	}
+	arrayList_destroy(infos);
 
 	return status;
 }
diff --git a/device_access/device_access/CMakeLists.txt b/device_access/device_access/CMakeLists.txt
index 7d7b79b..03e7817 100644
--- a/device_access/device_access/CMakeLists.txt
+++ b/device_access/device_access/CMakeLists.txt
@@ -15,8 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 
-find_package(APR REQUIRED)
-
 SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_device_manager")
 SET(BUNDLE_VERSION "0.0.1")
 SET_HEADERS("Bundle-Name: Apache Celix Device Access Device Manager") 
diff --git a/device_access/driver_locator/CMakeLists.txt b/device_access/driver_locator/CMakeLists.txt
index 61d25f9..f47696a 100644
--- a/device_access/driver_locator/CMakeLists.txt
+++ b/device_access/driver_locator/CMakeLists.txt
@@ -15,8 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 
-find_package(APR REQUIRED)
-
 SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_driver_locator")
 SET(BUNDLE_VERSION "0.0.1")
 SET_HEADERS("Bundle-Name: Apache Celix Device Access Driver Locator")
diff --git a/device_access/example/base_driver/CMakeLists.txt b/device_access/example/base_driver/CMakeLists.txt
index ffed3d3..82b916e 100644
--- a/device_access/example/base_driver/CMakeLists.txt
+++ b/device_access/example/base_driver/CMakeLists.txt
@@ -15,8 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 
-find_package(APR REQUIRED)
-
 SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_base_driver_example")
 SET(BUNDLE_VERSION "0.0.1")
 SET_HEADERS("Bundle-Name: Apache Celix Device Access Base Driver Example")
diff --git a/device_access/example/base_driver/private/src/base_driver.c b/device_access/example/base_driver/private/src/base_driver.c
index fafec6d..33a2dca 100644
--- a/device_access/example/base_driver/private/src/base_driver.c
+++ b/device_access/example/base_driver/private/src/base_driver.c
@@ -24,7 +24,7 @@
  *  \copyright	Apache License, Version 2.0
  */
 #include <stdlib.h>
-
+#include <string.h>
 #include <celix_errno.h>
 #include <bundle_activator.h>
 #include <bundle_context.h>
diff --git a/device_access/example/consuming_driver/CMakeLists.txt b/device_access/example/consuming_driver/CMakeLists.txt
index bb6795b..96dc8e8 100644
--- a/device_access/example/consuming_driver/CMakeLists.txt
+++ b/device_access/example/consuming_driver/CMakeLists.txt
@@ -15,8 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 
-find_package(APR REQUIRED)
-
 SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_word_consuming_driver_example")
 SET(BUNDLE_VERSION "0.0.1")
 SET_HEADERS("Bundle-Name: Apache Celix Device Access Word Consuming Driver Example")
diff --git a/device_access/example/consuming_driver/private/src/consuming_driver.c b/device_access/example/consuming_driver/private/src/consuming_driver.c
index 0842d57..b44ac32 100644
--- a/device_access/example/consuming_driver/private/src/consuming_driver.c
+++ b/device_access/example/consuming_driver/private/src/consuming_driver.c
@@ -24,6 +24,7 @@
  *  \copyright	Apache License, Version 2.0
  */
 #include <stdlib.h>
+#include <string.h>
 
 #include <device.h>
 #include <service_tracker.h>
diff --git a/device_access/example/refining_driver/CMakeLists.txt b/device_access/example/refining_driver/CMakeLists.txt
index 33dff1e..df5470b 100644
--- a/device_access/example/refining_driver/CMakeLists.txt
+++ b/device_access/example/refining_driver/CMakeLists.txt
@@ -15,8 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 
-find_package(APR REQUIRED)
-
 SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_char_refining_driver_example")
 SET(BUNDLE_VERSION "0.0.1")
 SET_HEADERS("Bundle-Name: Apache Celix Device Access Char Refining Driver Example")
diff --git a/framework/private/src/framework.c b/framework/private/src/framework.c
index f493318..529a712 100644
--- a/framework/private/src/framework.c
+++ b/framework/private/src/framework.c
@@ -104,6 +104,11 @@
 static celix_status_t framework_loadLibraries(framework_pt framework, char *libraries, char *activator, bundle_archive_pt archive, void **activatorHandle);
 static celix_status_t framework_loadLibrary(framework_pt framework, char *library, bundle_archive_pt archive, void **handle);
 
+static celix_status_t frameworkActivator_start(void * userData, bundle_context_pt context);
+static celix_status_t frameworkActivator_stop(void * userData, bundle_context_pt context);
+static celix_status_t frameworkActivator_destroy(void * userData, bundle_context_pt context);
+
+
 struct fw_refreshHelper {
     framework_pt framework;
     bundle_pt bundle;
@@ -162,7 +167,6 @@
 
 #ifdef _WIN32
     #define handle_t HMODULE
-    #define fw_getSystemLibrary() fw_getCurrentModule()
     #define fw_openLibrary(path) LoadLibrary(path)
     #define fw_closeLibrary(handle) FreeLibrary(handle)
 
@@ -177,7 +181,6 @@
     }
 #else
     #define handle_t void *
-    #define fw_getSystemLibrary() dlopen(NULL, RTLD_LAZY|RTLD_LOCAL)
     #define fw_openLibrary(path) dlopen(path, RTLD_LAZY|RTLD_LOCAL)
     #define fw_closeLibrary(handle) dlclose(handle)
     #define fw_getSymbol(handle, name) dlsym(handle, name)
@@ -426,16 +429,6 @@
     status = CELIX_DO_IF(status, serviceRegistry_create(framework, fw_serviceChanged, &framework->registry));
     status = CELIX_DO_IF(status, framework_setBundleStateAndNotify(framework, framework->bundle, OSGI_FRAMEWORK_BUNDLE_STARTING));
     status = CELIX_DO_IF(status, celixThreadCondition_init(&framework->shutdownGate, NULL));
-    if (status == CELIX_SUCCESS) {
-        handle_t handle = NULL;
-        handle = fw_getSystemLibrary();
-        if (handle != NULL) {
-            bundle_setHandle(framework->bundle, handle);
-        } else {
-            status = CELIX_FRAMEWORK_EXCEPTION;
-            fw_logCode(framework->logger, OSGI_FRAMEWORK_LOG_ERROR,  status, "Could not get handle to framework library");
-        }
-    }
 
     bundle_context_pt context = NULL;
 #ifdef WITH_APR
@@ -453,10 +446,10 @@
             bundle_context_pt context = NULL;
             void * userData = NULL;
 
-            create_function_pt create = (create_function_pt) fw_getSymbol((handle_t) bundle_getHandle(framework->bundle), OSGI_FRAMEWORK_BUNDLE_ACTIVATOR_CREATE);
-            start_function_pt start = (start_function_pt) fw_getSymbol((handle_t) bundle_getHandle(framework->bundle), OSGI_FRAMEWORK_BUNDLE_ACTIVATOR_START);
-            stop_function_pt stop = (stop_function_pt) fw_getSymbol((handle_t) bundle_getHandle(framework->bundle), OSGI_FRAMEWORK_BUNDLE_ACTIVATOR_STOP);
-            destroy_function_pt destroy = (destroy_function_pt) fw_getSymbol((handle_t) bundle_getHandle(framework->bundle), OSGI_FRAMEWORK_BUNDLE_ACTIVATOR_DESTROY);
+			create_function_pt create = NULL;
+			start_function_pt start = (start_function_pt) frameworkActivator_start;
+			stop_function_pt stop = (stop_function_pt) frameworkActivator_stop;
+			destroy_function_pt destroy = (destroy_function_pt) frameworkActivator_destroy;
 
             activator->start = start;
             activator->stop = stop;
@@ -2073,10 +2066,23 @@
 		bundle_close(bundle);
 	}
 	hashMapIterator_destroy(iter);
-#ifndef ANDROID
-    pthread_cancel(fw->dispatcherThread.thread);
-#endif
-    celixThread_join(fw->dispatcherThread, NULL);
+
+	if (celixThreadMutex_lock(&fw->dispatcherLock) != CELIX_SUCCESS) {
+		fw_log(fw->logger, OSGI_FRAMEWORK_LOG_ERROR, "Error locking the dispatcherThread.");
+	}
+	else {
+		fw->shutdown = true;
+
+		if (celixThreadCondition_broadcast(&fw->dispatcher)) {
+			fw_log(fw->logger, OSGI_FRAMEWORK_LOG_ERROR, "Error broadcasting .");
+		}
+
+		if (celixThreadMutex_unlock(&fw->dispatcherLock)) {
+			fw_log(fw->logger, OSGI_FRAMEWORK_LOG_ERROR, "Error unlocking the dispatcherThread.");
+		}
+
+		celixThread_join(fw->dispatcherThread, NULL);
+	}
 
 	err = celixThreadMutex_lock(&fw->mutex);
 	if (err != 0) {
@@ -2084,7 +2090,6 @@
 		celixThread_exit(NULL);
 		return NULL;
 	}
-	fw->shutdown = true;
 	err = celixThreadCondition_broadcast(&fw->shutdownGate);
 	if (err != 0) {
 		fw_log(fw->logger, OSGI_FRAMEWORK_LOG_ERROR,  "Error waking the shutdown gate, cannot exit clean.");
@@ -2315,12 +2320,12 @@
 	return ret;
 }
 
-celix_status_t bundleActivator_start(void * userData, bundle_context_pt context) {
+static celix_status_t frameworkActivator_start(void * userData, bundle_context_pt context) {
 	// nothing to do
 	return CELIX_SUCCESS;
 }
 
-celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) {
+static celix_status_t frameworkActivator_stop(void * userData, bundle_context_pt context) {
     celix_status_t status = CELIX_SUCCESS;
 
 	celix_thread_t shutdownThread;
@@ -2345,7 +2350,7 @@
 	return status;
 }
 
-celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt context) {
+static celix_status_t frameworkActivator_destroy(void * userData, bundle_context_pt context) {
 	return CELIX_SUCCESS;
 }
 
diff --git a/log_service/CMakeLists.txt b/log_service/CMakeLists.txt
index 933c2fb..b431db0 100644
--- a/log_service/CMakeLists.txt
+++ b/log_service/CMakeLists.txt
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-celix_subproject(LOG_SERVICE "Option to enable building the Log Service bundles" "OFF" DEPS framework)
+celix_subproject(LOG_SERVICE "Option to enable building the Log Service bundles" ON DEPS framework)
 if (LOG_SERVICE)
 	
 	SET_HEADER(BUNDLE_VERSION "1.0.0")
diff --git a/log_writer/CMakeLists.txt b/log_writer/CMakeLists.txt
index d98b311..4692d7a 100644
--- a/log_writer/CMakeLists.txt
+++ b/log_writer/CMakeLists.txt
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-celix_subproject(LOG_WRITER "Option to enable building the Log Writer bundles" "OFF" DEPS FRAMEWORK LOG_SERVICE)
+celix_subproject(LOG_WRITER "Option to enable building the Log Writer bundles" ON DEPS FRAMEWORK LOG_SERVICE)
 if (LOG_WRITER)
     add_subdirectory(log_writer_stdout)
   	add_subdirectory(log_writer_syslog) 
diff --git a/remote_services/discovery/private/src/endpoint_discovery_poller.c b/remote_services/discovery/private/src/endpoint_discovery_poller.c
index 569d7a9..ac819c5 100644
--- a/remote_services/discovery/private/src/endpoint_discovery_poller.c
+++ b/remote_services/discovery/private/src/endpoint_discovery_poller.c
@@ -43,7 +43,9 @@
 #define DISCOVERY_POLL_INTERVAL "DISCOVERY_CFG_POLL_INTERVAL"
 #define DEFAULT_POLL_INTERVAL "10"
 
-static void *endpointDiscoveryPoller_poll(void *data);
+
+static void *endpointDiscoveryPoller_performPeriodicPoll(void *data);
+celix_status_t endpointDiscoveryPoller_poll(endpoint_discovery_poller_pt poller, char *url, array_list_pt currentEndpoints);
 static celix_status_t endpointDiscoveryPoller_getEndpoints(endpoint_discovery_poller_pt poller, char *url, array_list_pt *updatedEndpoints);
 static celix_status_t endpointDiscoveryPoller_endpointDescriptionEquals(void *endpointPtr, void *comparePtr, bool *equals);
 
@@ -99,7 +101,7 @@
         return CELIX_BUNDLE_EXCEPTION;
     }
 
-	status = celixThread_create(&(*poller)->pollerThread, NULL, endpointDiscoveryPoller_poll, *poller);
+	status = celixThread_create(&(*poller)->pollerThread, NULL, endpointDiscoveryPoller_performPeriodicPoll, *poller);
 	if (status != CELIX_SUCCESS) {
 		return status;
 	}
@@ -172,134 +174,152 @@
  * Adds a new endpoint URL to the list of polled endpoints.
  */
 celix_status_t endpointDiscoveryPoller_addDiscoveryEndpoint(endpoint_discovery_poller_pt poller, char *url) {
-    celix_status_t status;
+	celix_status_t status;
 
-    status = celixThreadMutex_lock(&(poller)->pollerLock);
-    if (status != CELIX_SUCCESS) {
-        return CELIX_BUNDLE_EXCEPTION;
-    }
+	status = celixThreadMutex_lock(&(poller)->pollerLock);
+	if (status != CELIX_SUCCESS) {
+		return CELIX_BUNDLE_EXCEPTION;
+	}
 
 	// Avoid memory leaks when adding an already existing URL...
 	array_list_pt endpoints = hashMap_get(poller->entries, url);
-    if (endpoints == NULL) {
+	if (endpoints == NULL) {
 		status = arrayList_createWithEquals(endpointDiscoveryPoller_endpointDescriptionEquals, &endpoints);
 
 		if (status == CELIX_SUCCESS) {
-			hashMap_put(poller->entries, url, endpoints);
+			logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_DEBUG, "ENDPOINT_POLLER: add new discovery endpoint with url %s", url);
+			hashMap_put(poller->entries, strdup(url), endpoints);
+			endpointDiscoveryPoller_poll(poller, url, endpoints);
 		}
-    }
+	}
 
 	status = celixThreadMutex_unlock(&poller->pollerLock);
 
-    return status;
+	return status;
 }
 
 /**
  * Removes an endpoint URL from the list of polled endpoints.
  */
 celix_status_t endpointDiscoveryPoller_removeDiscoveryEndpoint(endpoint_discovery_poller_pt poller, char *url) {
-    celix_status_t status;
+	celix_status_t status = CELIX_SUCCESS;
 
-    status = celixThreadMutex_lock(&poller->pollerLock);
-    if (status != CELIX_SUCCESS) {
-        return CELIX_BUNDLE_EXCEPTION;
-    }
+	if (celixThreadMutex_lock(&poller->pollerLock) != CELIX_SUCCESS) {
+		status = CELIX_BUNDLE_EXCEPTION;
+	} else {
+		hash_map_entry_pt entry = hashMap_getEntry(poller->entries, url);
 
-    hash_map_entry_pt entry  = hashMap_getEntry(poller->entries, url);
-    char* origKey = hashMapEntry_getKey(entry);
+		if (entry == NULL) {
+			logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_DEBUG, "ENDPOINT_POLLER: There was no entry found belonging to url %s - maybe already removed?", url);
+		} else {
+			char* origKey = hashMapEntry_getKey(entry);
 
-    array_list_pt entries = hashMap_remove(poller->entries, url);
+			logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_DEBUG, "ENDPOINT_POLLER: remove discovery endpoint with url %s", url);
 
-	for (unsigned int i = arrayList_size(entries); i > 0  ; i--) {
-		endpoint_description_pt endpoint = arrayList_get(entries, i-1);
-		discovery_removeDiscoveredEndpoint(poller->discovery, endpoint);
-		arrayList_remove(entries, i-1);
-		endpointDescription_destroy(endpoint);
+			array_list_pt entries = hashMap_remove(poller->entries, url);
+
+			for (unsigned int i = arrayList_size(entries); i > 0; i--) {
+				endpoint_description_pt endpoint = arrayList_get(entries, i - 1);
+				discovery_removeDiscoveredEndpoint(poller->discovery, endpoint);
+				arrayList_remove(entries, i - 1);
+				endpointDescription_destroy(endpoint);
+			}
+
+			if (entries != NULL) {
+				arrayList_destroy(entries);
+			}
+
+			free(origKey);
+		}
+		status = celixThreadMutex_unlock(&poller->pollerLock);
 	}
 
-	if (entries != NULL) {
-		arrayList_destroy(entries);
-	}
-
-
-	free(origKey);
-	status = celixThreadMutex_unlock(&poller->pollerLock);
-
-    return status;
+	return status;
 }
 
-static void *endpointDiscoveryPoller_poll(void *data) {
-    endpoint_discovery_poller_pt poller = (endpoint_discovery_poller_pt) data;
 
-    useconds_t interval = (useconds_t) (poller->poll_interval * 1000000L);
 
-    while (poller->running) {
-    	usleep(interval);
 
-        celix_status_t status = celixThreadMutex_lock(&poller->pollerLock);
-        if (status != CELIX_SUCCESS) {
-        	logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_WARNING, "ENDPOINT_POLLER: failed to obtain lock; retrying...");
-        	continue;
-        }
+celix_status_t endpointDiscoveryPoller_poll(endpoint_discovery_poller_pt poller, char *url, array_list_pt currentEndpoints) {
+	celix_status_t status = NULL;
+	array_list_pt updatedEndpoints = NULL;
 
-		hash_map_iterator_pt iterator = hashMapIterator_create(poller->entries);
-		while (hashMapIterator_hasNext(iterator)) {
-			hash_map_entry_pt entry = hashMapIterator_nextEntry(iterator);
+	// create an arraylist with a custom equality test to ensure we can find endpoints properly...
+	arrayList_createWithEquals(endpointDiscoveryPoller_endpointDescriptionEquals, &updatedEndpoints);
+	status = endpointDiscoveryPoller_getEndpoints(poller, url, &updatedEndpoints);
 
-			char *url = hashMapEntry_getKey(entry);
-			array_list_pt currentEndpoints = hashMapEntry_getValue(entry);
+	if (status != CELIX_SUCCESS) {
+		status = celixThreadMutex_unlock(&poller->pollerLock);
+	} else {
+		if (updatedEndpoints) {
+			for (unsigned int i = arrayList_size(currentEndpoints); i > 0; i--) {
+				endpoint_description_pt endpoint = arrayList_get(currentEndpoints, i - 1);
 
-			array_list_pt updatedEndpoints = NULL;
-			// create an arraylist with a custom equality test to ensure we can find endpoints properly...
-			status = arrayList_createWithEquals(endpointDiscoveryPoller_endpointDescriptionEquals, &updatedEndpoints);
-
-			status = endpointDiscoveryPoller_getEndpoints(poller, url, &updatedEndpoints);
-			if (status != CELIX_SUCCESS) {
-				status = celixThreadMutex_unlock(&poller->pollerLock);
-				continue;
-			}
-
-			if (updatedEndpoints) {
-				for (unsigned int i = arrayList_size(currentEndpoints); i > 0  ; i--) {
-					endpoint_description_pt endpoint = arrayList_get(currentEndpoints, i-1);
-					if (!arrayList_contains(updatedEndpoints, endpoint)) {
-						status = discovery_removeDiscoveredEndpoint(poller->discovery, endpoint);
-						arrayList_remove(currentEndpoints, i-1);
-						endpointDescription_destroy(endpoint);
-					}
-				}
-
-				for (int i = arrayList_size(updatedEndpoints); i > 0  ; i--) {
-					endpoint_description_pt endpoint = arrayList_remove(updatedEndpoints, 0);
-
-					if (!arrayList_contains(currentEndpoints, endpoint)) {
-						arrayList_add(currentEndpoints, endpoint);
-						status = discovery_addDiscoveredEndpoint(poller->discovery, endpoint);
-					}
-					else {
-						endpointDescription_destroy(endpoint);
-
-					}
+				if (!arrayList_contains(updatedEndpoints, endpoint)) {
+					status = discovery_removeDiscoveredEndpoint(poller->discovery, endpoint);
+					arrayList_remove(currentEndpoints, i - 1);
+					endpointDescription_destroy(endpoint);
 				}
 			}
 
-			if (updatedEndpoints) {
-				arrayList_destroy(updatedEndpoints);
-			}
+			for (int i = arrayList_size(updatedEndpoints); i > 0; i--) {
+				endpoint_description_pt endpoint = arrayList_remove(updatedEndpoints, 0);
 
+				if (!arrayList_contains(currentEndpoints, endpoint)) {
+					arrayList_add(currentEndpoints, endpoint);
+					status = discovery_addDiscoveredEndpoint(poller->discovery, endpoint);
+				} else {
+					endpointDescription_destroy(endpoint);
+
+				}
+			}
 		}
 
-		hashMapIterator_destroy(iterator);
+		if (updatedEndpoints) {
+			arrayList_destroy(updatedEndpoints);
+		}
+	}
+
+	return status;
+}
+
+static void *endpointDiscoveryPoller_performPeriodicPoll(void *data) {
+	endpoint_discovery_poller_pt poller = (endpoint_discovery_poller_pt) data;
+
+	useconds_t interval = (useconds_t) (poller->poll_interval * 1000000L);
+
+	while (poller->running) {
+		usleep(interval);
+		celix_status_t status = celixThreadMutex_lock(&poller->pollerLock);
+
+		if (status != CELIX_SUCCESS) {
+			logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_WARNING, "ENDPOINT_POLLER: failed to obtain lock; retrying...");
+		} else {
+			hash_map_iterator_pt iterator = hashMapIterator_create(poller->entries);
+
+			while (hashMapIterator_hasNext(iterator)) {
+				hash_map_entry_pt entry = hashMapIterator_nextEntry(iterator);
+
+				char *url = hashMapEntry_getKey(entry);
+				array_list_pt currentEndpoints = hashMapEntry_getValue(entry);
+
+				endpointDiscoveryPoller_poll(poller, url, currentEndpoints);
+			}
+
+			hashMapIterator_destroy(iterator);
+		}
 
 		status = celixThreadMutex_unlock(&poller->pollerLock);
 		if (status != CELIX_SUCCESS) {
 			logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_WARNING, "ENDPOINT_POLLER: failed to release lock; retrying...");
 		}
-    }
+	}
 
-    return NULL;
+	return NULL;
 }
 
+
+
 struct MemoryStruct {
   char *memory;
   size_t size;
@@ -339,6 +359,8 @@
         curl_easy_setopt(curl, CURLOPT_URL, url);
         curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, endpointDiscoveryPoller_writeMemory);
         curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunk);
+        curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 5L);
+        curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10L);
         res = curl_easy_perform(curl);
         curl_easy_cleanup(curl);
     }
@@ -356,7 +378,7 @@
 			endpointDescriptorReader_destroy(reader);
     	}
     } else {
-    	logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_ERROR, "ENDPOINT_POLLER: unable to read endpoints, reason: %s", curl_easy_strerror(res));
+    	logHelper_log(*poller->loghelper, OSGI_LOGSERVICE_ERROR, "ENDPOINT_POLLER: unable to read endpoints from %s, reason: %s", url, curl_easy_strerror(res));
     }
 
     // clean up endpoints file
diff --git a/remote_services/discovery_configured/CMakeLists.txt b/remote_services/discovery_configured/CMakeLists.txt
index 9b8fa09..9fc6a81 100644
--- a/remote_services/discovery_configured/CMakeLists.txt
+++ b/remote_services/discovery_configured/CMakeLists.txt
@@ -14,7 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-celix_subproject(RSA_DISCOVERY_CONFIGURED "Option to enable building the Discovery (Configured) bundle" OFF)
+celix_subproject(RSA_DISCOVERY_CONFIGURED "Option to enable building the Discovery (Configured) bundle" ON)
 if (RSA_DISCOVERY_CONFIGURED)
     find_package(CURL REQUIRED)
     find_package(LibXml2 REQUIRED)
diff --git a/remote_services/discovery_etcd/CMakeLists.txt b/remote_services/discovery_etcd/CMakeLists.txt
index abc5905..aa1e08c 100644
--- a/remote_services/discovery_etcd/CMakeLists.txt
+++ b/remote_services/discovery_etcd/CMakeLists.txt
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-celix_subproject(RSA_DISCOVERY_ETCD "Option to enable building the Discovery (ETCD) bundle" OFF)
+celix_subproject(RSA_DISCOVERY_ETCD "Option to enable building the Discovery (ETCD) bundle" ON)
 if (RSA_DISCOVERY_ETCD)
 	find_package(CURL REQUIRED)
 	find_package(LibXml2 REQUIRED)
diff --git a/remote_services/discovery_etcd/private/include/etcd.h b/remote_services/discovery_etcd/private/include/etcd.h
index e36fccb..f5624d0 100644
--- a/remote_services/discovery_etcd/private/include/etcd.h
+++ b/remote_services/discovery_etcd/private/include/etcd.h
@@ -54,6 +54,6 @@
 bool etcd_getNodes(char* directory, char** nodeNames, int* size);
 bool etcd_set(char* key, char* value, int ttl, bool prevExist);
 bool etcd_del(char* key);
-bool etcd_watch(char* key, int index, char* action, char* prevValue, char* value);
+bool etcd_watch(char* key, int index, char* action, char* prevValue, char* value, char* rkey, int *modifiedIndex);
 
 #endif /* ETCD_H_ */
diff --git a/remote_services/discovery_etcd/private/src/etcd.c b/remote_services/discovery_etcd/private/src/etcd.c
index 2c74856..d38f6bd 100644
--- a/remote_services/discovery_etcd/private/src/etcd.c
+++ b/remote_services/discovery_etcd/private/src/etcd.c
@@ -304,66 +304,79 @@
 }
 
 ///watch
-bool etcd_watch(char* key, int index, char* action, char* prevValue, char* value) {
-	json_error_t error;
-	json_t* js_root = NULL;
-	json_t* js_node = NULL;
-	json_t* js_prevNode = NULL;
-	json_t* js_action = NULL;
-	json_t* js_value = NULL;
-	json_t* js_prevValue = NULL;
-	bool retVal = false;
-	char url[MAX_URL_LENGTH];
-	int res;
-	struct MemoryStruct reply;
 
-	reply.memory = malloc(1); /* will be grown as needed by the realloc above */
-	reply.size = 0; /* no data at this point */
+bool etcd_watch(char* key, int index, char* action, char* prevValue, char* value, char* rkey, int* modifiedIndex) {
+    json_error_t error;
+    json_t* js_root = NULL;
+    json_t* js_node = NULL;
+    json_t* js_prevNode = NULL;
+    json_t* js_action = NULL;
+    json_t* js_value = NULL;
+    json_t* js_rkey = NULL;
+    json_t* js_prevValue = NULL;
+    json_t* js_modIndex = NULL;
+    bool retVal = false;
+    char url[MAX_URL_LENGTH];
+    int res;
+    struct MemoryStruct reply;
 
-	if (index != 0)
-		snprintf(url, MAX_URL_LENGTH, "http://%s:%d/v2/keys/%s?wait=true&recursive=true&waitIndex=%d", etcd_server, etcd_port, key,
-				index);
-	else
-		snprintf(url, MAX_URL_LENGTH, "http://%s:%d/v2/keys/%s?wait=true&recursive=true", etcd_server, etcd_port, key);
+    reply.memory = malloc(1); /* will be grown as needed by the realloc above */
+    reply.size = 0; /* no data at this point */
 
-	res = performRequest(url, GET, WriteMemoryCallback, NULL, (void*) &reply);
+    if (index != 0)
+        snprintf(url, MAX_URL_LENGTH, "http://%s:%d/v2/keys/%s?wait=true&recursive=true&waitIndex=%d", etcd_server, etcd_port, key, index);
+    else
+        snprintf(url, MAX_URL_LENGTH, "http://%s:%d/v2/keys/%s?wait=true&recursive=true", etcd_server, etcd_port, key);
 
-	if (res == CURLE_OK) {
-		js_root = json_loads(reply.memory, 0, &error);
+    res = performRequest(url, GET, WriteMemoryCallback, NULL, (void*) &reply);
 
-		if (js_root != NULL) {
-			js_action = json_object_get(js_root, ETCD_JSON_ACTION);
-			js_node = json_object_get(js_root, ETCD_JSON_NODE);
-			js_prevNode = json_object_get(js_root, ETCD_JSON_PREVNODE);
-		}
-		if (js_prevNode != NULL) {
-			js_prevValue = json_object_get(js_prevNode, ETCD_JSON_VALUE);
-		}
-		if (js_node != NULL) {
-			js_value = json_object_get(js_node, ETCD_JSON_VALUE);
-		}
-		if (js_prevNode != NULL) {
-			js_prevValue = json_object_get(js_prevNode, ETCD_JSON_VALUE);
-		}
-		if ((js_prevValue != NULL) && (json_is_string(js_prevValue))) {
-			strncpy(prevValue, json_string_value(js_prevValue), MAX_VALUE_LENGTH);
-		}
-		if ((js_value != NULL) && (json_is_string(js_value))) {
-			strncpy(value, json_string_value(js_value), MAX_VALUE_LENGTH);
-		}
-		if ((js_action != NULL) && (json_is_string(js_action))) {
-			strncpy(action, json_string_value(js_action), MAX_ACTION_LENGTH);
+    if (res == CURLE_OK) {
 
-			retVal = true;
-		}
-		if (js_root != NULL) {
-			json_decref(js_root);
-		}
-	}
+        js_root = json_loads(reply.memory, 0, &error);
 
-	if (reply.memory) {
-		free(reply.memory);
-	}
+        if (js_root != NULL) {
+            js_action = json_object_get(js_root, ETCD_JSON_ACTION);
+            js_node = json_object_get(js_root, ETCD_JSON_NODE);
+            js_prevNode = json_object_get(js_root, ETCD_JSON_PREVNODE);
+        }
+        if (js_prevNode != NULL) {
+            js_prevValue = json_object_get(js_prevNode, ETCD_JSON_VALUE);
+        }
+        if (js_node != NULL) {
+            js_rkey = json_object_get(js_node, ETCD_JSON_KEY);
+            js_value = json_object_get(js_node, ETCD_JSON_VALUE);
+            js_modIndex = json_object_get(js_node, ETCD_JSON_MODIFIEDINDEX);
+        }
+        if (js_prevNode != NULL) {
+            js_prevValue = json_object_get(js_prevNode, ETCD_JSON_VALUE);
+        }
+        if ((js_prevValue != NULL) && (json_is_string(js_prevValue))) {
+            strncpy(prevValue, json_string_value(js_prevValue), MAX_VALUE_LENGTH);
+        }
+        if ((js_value != NULL) && (json_is_string(js_value))) {
+            strncpy(value, json_string_value(js_value), MAX_VALUE_LENGTH);
+        }
+        if ((js_modIndex != NULL) && (json_is_integer(js_modIndex))) {
+            *modifiedIndex = json_integer_value(js_modIndex);
+        } else {
+            *modifiedIndex = index;
+        }
 
-	return retVal;
+        if ((js_rkey != NULL) && (js_action != NULL) && (json_is_string(js_rkey)) && (json_is_string(js_action))) {
+            strncpy(rkey, json_string_value(js_rkey), MAX_KEY_LENGTH);
+            strncpy(action, json_string_value(js_action), MAX_ACTION_LENGTH);
+
+            retVal = true;
+        }
+        if (js_root != NULL) {
+            json_decref(js_root);
+        }
+
+    }
+
+    if (reply.memory) {
+        free(reply.memory);
+    }
+
+    return retVal;
 }
diff --git a/remote_services/discovery_etcd/private/src/etcd_watcher.c b/remote_services/discovery_etcd/private/src/etcd_watcher.c
index eefd28f..c54fcdc 100644
--- a/remote_services/discovery_etcd/private/src/etcd_watcher.c
+++ b/remote_services/discovery_etcd/private/src/etcd_watcher.c
@@ -31,6 +31,7 @@
 #include "log_helper.h"
 #include "log_service.h"
 #include "constants.h"
+#include "utils.h"
 #include "discovery.h"
 #include "discovery_impl.h"
 
@@ -42,6 +43,7 @@
 struct etcd_watcher {
     discovery_pt discovery;
     log_helper_pt* loghelper;
+    hash_map_pt entries;
 
 	celix_thread_mutex_t watcherLock;
 	celix_thread_t watcherThread;
@@ -129,7 +131,7 @@
 
 			if (etcd_get(key, &value[0], &action[0], &modIndex) == true) {
 				// TODO: check that this is not equals to the local endpoint
-				endpointDiscoveryPoller_addDiscoveryEndpoint(discovery->poller, strdup(&value[0]));
+				endpointDiscoveryPoller_addDiscoveryEndpoint(discovery->poller, &value[0]);
 
 				if (modIndex > *highestModified) {
 					*highestModified = modIndex;
@@ -200,6 +202,51 @@
     return status;
 }
 
+
+
+
+static celix_status_t etcdWatcher_addEntry(etcd_watcher_pt watcher, char* key, char* value) {
+	celix_status_t status = CELIX_BUNDLE_EXCEPTION;
+	endpoint_discovery_poller_pt poller = watcher->discovery->poller;
+
+	if (!hashMap_containsKey(watcher->entries, key)) {
+		status = endpointDiscoveryPoller_addDiscoveryEndpoint(poller, value);
+
+		if (status == CELIX_SUCCESS) {
+			hashMap_put(watcher->entries, strdup(key), strdup(value));
+		}
+	}
+
+	return status;
+}
+
+static celix_status_t etcdWatcher_removeEntry(etcd_watcher_pt watcher, char* key, char* value) {
+	celix_status_t status = CELIX_BUNDLE_EXCEPTION;
+	endpoint_discovery_poller_pt poller = watcher->discovery->poller;
+
+	if (hashMap_containsKey(watcher->entries, key)) {
+
+		hashMap_remove(watcher->entries, key);
+
+		// check if there is another entry with the same value
+		hash_map_iterator_pt iter = hashMapIterator_create(watcher->entries);
+		unsigned int valueFound = 0;
+
+		while (hashMapIterator_hasNext(iter) && valueFound <= 1) {
+			if (strcmp(value, hashMapIterator_nextValue(iter)) == 0)
+				valueFound++;
+		}
+
+		if (valueFound == 0)
+			status = endpointDiscoveryPoller_removeDiscoveryEndpoint(poller, value);
+
+	}
+
+	return status;
+
+}
+
+
 /*
  * performs (blocking) etcd_watch calls to check for
  * changing discovery endpoint information within etcd.
@@ -211,29 +258,32 @@
 	int highestModified = 0;
 
 	bundle_context_pt context = watcher->discovery->context;
-	endpoint_discovery_poller_pt poller = watcher->discovery->poller;
 
 	etcdWatcher_addAlreadyExistingWatchpoints(watcher->discovery, &highestModified);
 	etcdWatcher_getRootPath(context, &rootPath[0]);
 
 	while (watcher->running) {
+
+        char rkey[MAX_KEY_LENGTH];
 		char value[MAX_VALUE_LENGTH];
 		char preValue[MAX_VALUE_LENGTH];
 		char action[MAX_ACTION_LENGTH];
+        int modIndex;
 
-		if (etcd_watch(rootPath, highestModified+1, &action[0], &preValue[0], &value[0]) == true) {
+		if (etcd_watch(rootPath, highestModified + 1, &action[0], &preValue[0], &value[0], &rkey[0], &modIndex) == true) {
 			if (strcmp(action, "set") == 0) {
-				endpointDiscoveryPoller_addDiscoveryEndpoint(poller, strdup(&value[0]));
+				etcdWatcher_addEntry(watcher, &rkey[0], &value[0]);
 			} else if (strcmp(action, "delete") == 0) {
-				endpointDiscoveryPoller_removeDiscoveryEndpoint(poller, &preValue[0]);
+				etcdWatcher_removeEntry(watcher, &rkey[0], &value[0]);
 			} else if (strcmp(action, "expire") == 0) {
-				endpointDiscoveryPoller_removeDiscoveryEndpoint(poller, &preValue[0]);
+				etcdWatcher_removeEntry(watcher, &rkey[0], &value[0]);
 			} else if (strcmp(action, "update") == 0) {
-				// TODO
+				etcdWatcher_addEntry(watcher, &rkey[0], &value[0]);
 			} else {
 				logHelper_log(*watcher->loghelper, OSGI_LOGSERVICE_INFO, "Unexpected action: %s", action);
 			}
-			highestModified++;
+
+			highestModified = modIndex;
 		}
 
 		// update own framework uuid
@@ -263,7 +313,6 @@
 		return CELIX_BUNDLE_EXCEPTION;
 	}
 
-
 	(*watcher) = calloc(1, sizeof(struct etcd_watcher));
 	if (!*watcher) {
 		return CELIX_ENOMEM;
@@ -272,6 +321,7 @@
 	{
 		(*watcher)->discovery = discovery;
 		(*watcher)->loghelper = &discovery->loghelper;
+		(*watcher)->entries = hashMap_create(utils_stringHash, NULL, utils_stringEquals, NULL);
 	}
 
 	if ((bundleContext_getProperty(context, CFG_ETCD_SERVER_IP, &etcd_server) != CELIX_SUCCESS) || !etcd_server) {
@@ -338,6 +388,8 @@
 
 	watcher->loghelper = NULL;
 
+	hashMap_destroy(watcher->entries, true, true);
+
 	free(watcher);
 
 	return status;
diff --git a/remote_services/discovery_shm/private/src/shm_watcher.c b/remote_services/discovery_shm/private/src/shm_watcher.c
index 212af55..2152345 100644
--- a/remote_services/discovery_shm/private/src/shm_watcher.c
+++ b/remote_services/discovery_shm/private/src/shm_watcher.c
@@ -111,7 +111,7 @@
             }
 
             if (elementFound == false) {
-                endpointDiscoveryPoller_addDiscoveryEndpoint(watcher->poller, strdup(url));
+                endpointDiscoveryPoller_addDiscoveryEndpoint(watcher->poller, url);
             }
         }
     }
diff --git a/remote_services/examples/CMakeLists.txt b/remote_services/examples/CMakeLists.txt
index d975cc2..9246a0f 100644
--- a/remote_services/examples/CMakeLists.txt
+++ b/remote_services/examples/CMakeLists.txt
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-celix_subproject(RSA_EXAMPLES "Option to enable building the RSA examples" OFF DEPS LAUNCHER shell_tui log_writer RSA_TOPOLOGY_MANAGER)
+celix_subproject(RSA_EXAMPLES "Option to enable building the RSA examples" ON DEPS LAUNCHER shell_tui log_writer RSA_TOPOLOGY_MANAGER)
 if (RSA_EXAMPLES)
     add_subdirectory(calculator_service)
 
diff --git a/remote_services/remote_service_admin_http/CMakeLists.txt b/remote_services/remote_service_admin_http/CMakeLists.txt
index f066407..a147a37 100644
--- a/remote_services/remote_service_admin_http/CMakeLists.txt
+++ b/remote_services/remote_service_admin_http/CMakeLists.txt
@@ -14,7 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-celix_subproject(RSA_REMOTE_SERVICE_ADMIN_HTTP "Option to enable building the Remote Service Admin Service HTTP bundle" OFF)
+celix_subproject(RSA_REMOTE_SERVICE_ADMIN_HTTP "Option to enable building the Remote Service Admin Service HTTP bundle" ON)
 if (RSA_REMOTE_SERVICE_ADMIN_HTTP)
 	find_package(CURL REQUIRED)
 	find_package(UUID REQUIRED)
diff --git a/remote_shell/CMakeLists.txt b/remote_shell/CMakeLists.txt
index 892fc48..e945415 100644
--- a/remote_shell/CMakeLists.txt
+++ b/remote_shell/CMakeLists.txt
@@ -14,7 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-celix_subproject(REMOTE_SHELL "Option to enable building the Remote Shell bundles" OFF DEPS LAUNCHER SHELL_TUI)
+celix_subproject(REMOTE_SHELL "Option to enable building the Remote Shell bundles" ON DEPS LAUNCHER SHELL_TUI)
 if (REMOTE_SHELL)
 
 	SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_remote_shell")
@@ -41,4 +41,4 @@
     include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
     
     target_link_libraries(remote_shell celix_framework)
-endif (REMOTE_SHELL)
\ No newline at end of file
+endif (REMOTE_SHELL)
diff --git a/shell/CMakeLists.txt b/shell/CMakeLists.txt
index 07f4c6e..8f7c94a 100644
--- a/shell/CMakeLists.txt
+++ b/shell/CMakeLists.txt
@@ -14,7 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-celix_subproject(SHELL "Option to enable building the Shell bundles" "OFF" DEPS LAUNCHER LOG_SERVICE)
+celix_subproject(SHELL "Option to enable building the Shell bundles" ON DEPS LAUNCHER LOG_SERVICE)
 if (SHELL)
 	find_package(CURL REQUIRED)
 	
diff --git a/shell_tui/CMakeLists.txt b/shell_tui/CMakeLists.txt
index 65a8e9c..ab56f73 100644
--- a/shell_tui/CMakeLists.txt
+++ b/shell_tui/CMakeLists.txt
@@ -14,7 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-celix_subproject(SHELL_TUI "Option to enable building the Shell Textual User Interface bundles" OFF DEPS LAUNCHER SHELL)
+celix_subproject(SHELL_TUI "Option to enable building the Shell Textual User Interface bundles" ON DEPS LAUNCHER SHELL)
 if (SHELL_TUI)
 
     SET_HEADER(BUNDLE_VERSION "1.0.0")
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
index a6b2f4f..bb27a0c 100644
--- a/utils/CMakeLists.txt
+++ b/utils/CMakeLists.txt
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-celix_subproject(UTILS "Option to build the utilities library" "OFF")
+celix_subproject(UTILS "Option to build the utilities library" ON)
 if (UTILS) 
     cmake_minimum_required(VERSION 2.6)