You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2016/02/05 12:00:20 UTC

[01/42] celix git commit: CELIX-335: Refactor cmake packaging

Repository: celix
Updated Branches:
  refs/heads/develop b815e68fc -> b19a8f6be


http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/remote_service_admin_dfi/rsa/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa/CMakeLists.txt b/remote_services/remote_service_admin_dfi/rsa/CMakeLists.txt
index e4093b7..17a0c02 100644
--- a/remote_services/remote_service_admin_dfi/rsa/CMakeLists.txt
+++ b/remote_services/remote_service_admin_dfi/rsa/CMakeLists.txt
@@ -27,11 +27,11 @@ include_directories(
     ${PROJECT_SOURCE_DIR}/remote_services/examples/calculator_service/public/include
 )
 
-SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_remote_service_admin_dfi")
-SET(BUNDLE_VERSION "0.0.1")
-SET_HEADERS("Bundle-Name: Apache Celix Remote Service Admin Dynamic Function Interface (DFI)")
-
-bundle(remote_service_admin_dfi SOURCES
+add_bundle(remote_service_admin_dfi 
+    VERSION 0.0.1
+    SYMBOLIC_NAME "apache_celix_remote_service_admin_dfi"
+    NAME "Apache Celix Remote Service Admin Dynamic Function Interface (DFI)"
+    SOURCES
     private/src/remote_service_admin_dfi.c
     private/src/remote_service_admin_activator.c
     private/src/export_registration_dfi.c

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/remote_service_admin_dfi/rsa_tst/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa_tst/CMakeLists.txt b/remote_services/remote_service_admin_dfi/rsa_tst/CMakeLists.txt
index 140aa54..ac845e6 100644
--- a/remote_services/remote_service_admin_dfi/rsa_tst/CMakeLists.txt
+++ b/remote_services/remote_service_admin_dfi/rsa_tst/CMakeLists.txt
@@ -39,12 +39,12 @@ add_executable(test_rsa_dfi
 )
 target_link_libraries(test_rsa_dfi celix_framework celix_utils ${CURL_LIBRARIES} ${CPPUTEST_LIBRARY})
 
-get_property(rsa_bundle_file TARGET remote_service_admin_dfi PROPERTY BUNDLE)
-get_property(calc_bundle_file TARGET calculator PROPERTY BUNDLE)
-get_property(calculator_shell_bundle_file TARGET calculator_shell PROPERTY BUNDLE)
-get_property(discovery_configured_bundle_file TARGET discovery_configured PROPERTY BUNDLE)
-get_property(topology_manager_bundle_file TARGET topology_manager PROPERTY BUNDLE)
-get_property(tst_bundle_file TARGET rsa_dfi_tst_bundle PROPERTY BUNDLE)
+get_property(rsa_bundle_file TARGET remote_service_admin_dfi PROPERTY BUNDLE_FILE)
+get_property(calc_bundle_file TARGET calculator PROPERTY BUNDLE_FILE)
+get_property(calculator_shell_bundle_file TARGET calculator_shell PROPERTY BUNDLE_FILE)
+get_property(discovery_configured_bundle_file TARGET discovery_configured PROPERTY BUNDLE_FILE)
+get_property(topology_manager_bundle_file TARGET topology_manager PROPERTY BUNDLE_FILE)
+get_property(tst_bundle_file TARGET rsa_dfi_tst_bundle PROPERTY BUNDLE_FILE)
 
 configure_file(config.properties.in config.properties @ONLY)
 configure_file(client.properties.in client.properties @ONLY)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt b/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt
index c75b341..d172087 100644
--- a/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt
+++ b/remote_services/remote_service_admin_dfi/rsa_tst/bundle/CMakeLists.txt
@@ -22,16 +22,16 @@ include_directories(
         ${PROJECT_SOURCE_DIR}/remote_services/examples/calculator_service/public/include
 )
 
-SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_remote_service_admin_dfi_tst_bundle")
-SET(BUNDLE_VERSION "0.0.1")
-SET_HEADERS("Bundle-Name: Apache Celix Remote Service Admin DFI test bundle")
 
-
-bundle(rsa_dfi_tst_bundle
+add_bundle(rsa_dfi_tst_bundle
+    VERSION 0.0.1
     SOURCES
         tst_activator.c
+)
 
-    FILES
-        ${PROJECT_SOURCE_DIR}/remote_services/examples/calculator_service/public/include/org.apache.celix.calc.api.Calculator2.descriptor
+bundle_files(rsa_dfi_tst_bundle
+    ${PROJECT_SOURCE_DIR}/remote_services/examples/calculator_service/public/include/org.apache.celix.calc.api.Calculator2.descriptor
+    DESTINATION .
 )
-target_link_libraries(rsa_dfi_tst_bundle ${CPPUTEST_LIBRARY} celix_framework celix_utils)
\ No newline at end of file
+
+target_link_libraries(rsa_dfi_tst_bundle ${CPPUTEST_LIBRARY} celix_framework celix_utils)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/remote_service_admin_http/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_http/CMakeLists.txt b/remote_services/remote_service_admin_http/CMakeLists.txt
index 58a8fd6..ba333e1 100644
--- a/remote_services/remote_service_admin_http/CMakeLists.txt
+++ b/remote_services/remote_service_admin_http/CMakeLists.txt
@@ -30,11 +30,11 @@ if (RSA_REMOTE_SERVICE_ADMIN_HTTP)
 	include_directories("${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin_http/private/include")
 	include_directories("${PROJECT_SOURCE_DIR}/remote_services/endpoint_listener/public/include")
 
-	SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_remote_service_admin_http")
-	SET(BUNDLE_VERSION "0.0.1")
-	SET_HEADERS("Bundle-Name: Apache Celix Remote Service Admin HTTP")
-
-	bundle(remote_service_admin_http SOURCES
+	add_bundle(remote_service_admin_http 
+        VERSION 0.0.1
+        SYMBOLIC_NAME "apache_celix_remote_service_admin_http"
+        NAME "Apache Celix Remote Service Admin HTTP"
+        SOURCES
 	private/src/remote_service_admin_impl
 	private/src/remote_service_admin_activator
 	${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/private/src/export_registration_impl

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/remote_service_admin_http/private/test/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_http/private/test/CMakeLists.txt b/remote_services/remote_service_admin_http/private/test/CMakeLists.txt
index 5992635..3954c72 100644
--- a/remote_services/remote_service_admin_http/private/test/CMakeLists.txt
+++ b/remote_services/remote_service_admin_http/private/test/CMakeLists.txt
@@ -37,13 +37,13 @@ add_executable(test_rsa_http
 )
 target_link_libraries(test_rsa_http celix_framework celix_utils ${CURL_LIBRARIES} ${CPPUTEST_LIBRARY})
 
-get_property(rsa_bundle_file TARGET remote_service_admin_http PROPERTY BUNDLE)
-get_property(calc_bundle_file TARGET calculator PROPERTY BUNDLE)
-get_property(calculator_shell_bundle_file TARGET calculator_shell PROPERTY BUNDLE)
-get_property(discovery_configured_bundle_file TARGET discovery_configured PROPERTY BUNDLE)
-get_property(topology_manager_bundle_file TARGET topology_manager PROPERTY BUNDLE)
-get_property(calc_proxy_bundle_file TARGET org.apache.celix.calc.api.Calculator_proxy PROPERTY BUNDLE)
-get_property(calc_endpoint_bundle_file TARGET  org.apache.celix.calc.api.Calculator_endpoint PROPERTY BUNDLE)
+get_property(rsa_bundle_file TARGET remote_service_admin_http PROPERTY BUNDLE_FILE)
+get_property(calc_bundle_file TARGET calculator PROPERTY BUNDLE_FILE)
+get_property(calculator_shell_bundle_file TARGET calculator_shell PROPERTY BUNDLE_FILE)
+get_property(discovery_configured_bundle_file TARGET discovery_configured PROPERTY BUNDLE_FILE)
+get_property(topology_manager_bundle_file TARGET topology_manager PROPERTY BUNDLE_FILE)
+get_property(calc_proxy_bundle_file TARGET org.apache.celix.calc.api.Calculator_proxy PROPERTY BUNDLE_FILE)
+get_property(calc_endpoint_bundle_file TARGET  org.apache.celix.calc.api.Calculator_endpoint PROPERTY BUNDLE_FILE)
 
 get_filename_component(client_endpoints @calc_proxy_bundle_file@ PATH)
 get_filename_component(server_endpoints @calc_endpoint_bundle_file@ PATH)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/remote_service_admin_shm/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_shm/CMakeLists.txt b/remote_services/remote_service_admin_shm/CMakeLists.txt
index ce2f13a..411ed7d 100644
--- a/remote_services/remote_service_admin_shm/CMakeLists.txt
+++ b/remote_services/remote_service_admin_shm/CMakeLists.txt
@@ -29,11 +29,12 @@ if (RSA_REMOTE_SERVICE_ADMIN_SHM)
 	include_directories("${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin_shm/private/include")
 	include_directories("${PROJECT_SOURCE_DIR}/remote_services/endpoint_listener/public/include")
 
-	SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_remote_service_admin_shm")
-	SET(BUNDLE_VERSION "0.0.1")
-	SET_HEADERS("Bundle-Name: Apache Celix Remote Service Admin SHM")
+	add_bundle(remote_service_admin_shm 
+        VERSION 0.0.1
+        SYMBOLIC_NAME "apache_celix_remote_service_admin_shm"
+        NAME "Apache Celix Remote Service Admin SHM"
+        SOURCES
 
-	bundle(remote_service_admin_shm SOURCES 
 		private/src/remote_service_admin_impl
         private/src/remote_service_admin_activator
         ${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/private/src/export_registration_impl

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/remote_service_admin_shm/private/test/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_shm/private/test/CMakeLists.txt b/remote_services/remote_service_admin_shm/private/test/CMakeLists.txt
index 0786a6d..524e6eb 100644
--- a/remote_services/remote_service_admin_shm/private/test/CMakeLists.txt
+++ b/remote_services/remote_service_admin_shm/private/test/CMakeLists.txt
@@ -37,13 +37,13 @@ add_executable(test_rsa_shm
 )
 target_link_libraries(test_rsa_shm celix_framework celix_utils ${CURL_LIBRARIES} ${CPPUTEST_LIBRARY})
 
-get_property(rsa_bundle_file TARGET remote_service_admin_shm PROPERTY BUNDLE)
-get_property(calc_bundle_file TARGET calculator PROPERTY BUNDLE)
-get_property(calculator_shell_bundle_file TARGET calculator_shell PROPERTY BUNDLE)
-get_property(discovery_shm_bundle_file TARGET discovery_shm PROPERTY BUNDLE)
-get_property(topology_manager_bundle_file TARGET topology_manager PROPERTY BUNDLE)
-get_property(calc_proxy_bundle_file TARGET org.apache.celix.calc.api.Calculator_proxy PROPERTY BUNDLE)
-get_property(calc_endpoint_bundle_file TARGET  org.apache.celix.calc.api.Calculator_endpoint PROPERTY BUNDLE)
+get_property(rsa_bundle_file TARGET remote_service_admin_shm PROPERTY BUNDLE_FILE)
+get_property(calc_bundle_file TARGET calculator PROPERTY BUNDLE_FILE)
+get_property(calculator_shell_bundle_file TARGET calculator_shell PROPERTY BUNDLE_FILE)
+get_property(discovery_shm_bundle_file TARGET discovery_shm PROPERTY BUNDLE_FILE)
+get_property(topology_manager_bundle_file TARGET topology_manager PROPERTY BUNDLE_FILE)
+get_property(calc_proxy_bundle_file TARGET org.apache.celix.calc.api.Calculator_proxy PROPERTY BUNDLE_FILE)
+get_property(calc_endpoint_bundle_file TARGET  org.apache.celix.calc.api.Calculator_endpoint PROPERTY BUNDLE_FILE)
 
 get_filename_component(client_endpoints @calc_proxy_bundle_file@ PATH)
 get_filename_component(server_endpoints @calc_endpoint_bundle_file@ PATH)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/topology_manager/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/topology_manager/CMakeLists.txt b/remote_services/topology_manager/CMakeLists.txt
index 97ea972..f3f45f3 100644
--- a/remote_services/topology_manager/CMakeLists.txt
+++ b/remote_services/topology_manager/CMakeLists.txt
@@ -24,11 +24,7 @@ if (RSA_TOPOLOGY_MANAGER)
     include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
     include_directories("${PROJECT_SOURCE_DIR}/remote_services/topology_manager/public/include")
 
-    SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_rs_topology_manager")
-    SET(BUNDLE_VERSION "0.0.2")
-    SET_HEADERS("Bundle-Name: Apache Celix RS Topology Manager")
-
-    bundle(topology_manager SOURCES
+    add_bundle(topology_manager SOURCES
         private/src/topology_manager
         private/src/scope
         private/src/activator
@@ -37,6 +33,10 @@ if (RSA_TOPOLOGY_MANAGER)
 
         private/include/topology_manager.h
         public/include/tm_scope.h
+        VERSION 0.0.2
+        SYMBOLIC_NAME "apache_celix_rs_topology_manager"
+        NAME
+            "Apache Celix RS Topology Manager"
     )
 
     install_bundle(topology_manager)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/topology_manager/tms_tst/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/topology_manager/tms_tst/CMakeLists.txt b/remote_services/topology_manager/tms_tst/CMakeLists.txt
index 37dc541..f55fe74 100644
--- a/remote_services/topology_manager/tms_tst/CMakeLists.txt
+++ b/remote_services/topology_manager/tms_tst/CMakeLists.txt
@@ -34,12 +34,18 @@ add_dependencies(test_tm_scoped remote_service_admin_dfi topology_manager calcul
 # Not nice, but only (?) solution to prevent circular dependency between this test and rsa_dfi_test
 set_property(GLOBAL PROPERTY temp_rsa_bundle_file ${PROJECT_BINARY_DIR}/remote_services/remote_service_admin_dfi/rsa/remote_service_admin_dfi.zip)
 get_property(rsa_bundle_file GLOBAL PROPERTY temp_rsa_bundle_file)
-get_property(calc_bundle_file TARGET calculator PROPERTY BUNDLE)
-get_property(topology_manager_bundle_file TARGET topology_manager PROPERTY BUNDLE)
-get_property(disc_mock_bundle_file TARGET topology_manager_disc_mock_bundle PROPERTY BUNDLE)
-get_property(test_bundle_file TARGET topology_manager_test_bundle PROPERTY BUNDLE)
-
+get_property(calc_bundle_file TARGET calculator PROPERTY BUNDLE_FILE)
+get_property(topology_manager_bundle_file TARGET topology_manager PROPERTY BUNDLE_FILE)
+get_property(disc_mock_bundle_file TARGET topology_manager_disc_mock_bundle PROPERTY BUNDLE_FILE)
+get_property(test_bundle_file TARGET topology_manager_test_bundle PROPERTY BUNDLE_FILE)
+
+#file(GENERATE OUTPUT config.properties CONTENT "
+#cosgi.auto.start.1=$<TARGET_PROPERTY:remote_service_admin_dfi,BUNDE_FILE> $<TARGET_PROPERTY:calculator,BUNDLE_FILE> $<TARGET_PROPERTY:topology_manager,BUNDLE_FILE> $<TARGET_PROPERTY:topology_manager_disc_mock_bundle,BUNDLE_FILE>
+#LOGHELPER_ENABLE_STDOUT_FALLBACK=true
+#org.osgi.framework.storage.clean=onFirstInit
+#")
 configure_file(config.properties.in config.properties @ONLY)
+
 configure_file(config_import.properties.in config_import.properties @ONLY)
 configure_file(scope.json scope.json @ONLY)
 configure_file(scope2.json scope2.json @ONLY)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt b/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt
index 02b9e17..4b2f924 100644
--- a/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt
+++ b/remote_services/topology_manager/tms_tst/bundle/CMakeLists.txt
@@ -8,16 +8,14 @@ include_directories(
         ${PROJECT_SOURCE_DIR}/utils/public/include
 )
 
-SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_topology_manager_test_bundle")
-SET(BUNDLE_VERSION "0.0.1")
-SET_HEADERS("Bundle-Name: Apache Celix Remote Service Topology Manager test bundle")
-
-
-bundle(topology_manager_test_bundle
+add_bundle(topology_manager_test_bundle
+    VERSION 0.0.1
     SOURCES
         tst_activator.c   
-    FILES
-         org.apache.celix.test.MyBundle.descriptor
+)
+bundle_files(topology_manager_test_bundle
+    org.apache.celix.test.MyBundle.descriptor
+    DESTINATION .
 )
 
 target_link_libraries(topology_manager_test_bundle ${CPPUTEST_LIBRARY} celix_framework celix_utils)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/topology_manager/tms_tst/disc_mock/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/topology_manager/tms_tst/disc_mock/CMakeLists.txt b/remote_services/topology_manager/tms_tst/disc_mock/CMakeLists.txt
index 6c4914b..5edca45 100644
--- a/remote_services/topology_manager/tms_tst/disc_mock/CMakeLists.txt
+++ b/remote_services/topology_manager/tms_tst/disc_mock/CMakeLists.txt
@@ -9,12 +9,9 @@ include_directories(
         ${PROJECT_SOURCE_DIR}/remote_services/discovery/private/include
 )
 
-SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_topology_manager_scoped_disc_mock_bundle")
-SET(BUNDLE_VERSION "0.0.1")
-SET_HEADERS("Bundle-Name: Apache Celix Topology manager discovery mock bundle")
 
-
-bundle(topology_manager_disc_mock_bundle
+add_bundle(topology_manager_disc_mock_bundle
+    VERSION 0.0.1
     SOURCES
         disc_mock_activator.c
         disc_mock_service.c

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_shell/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_shell/CMakeLists.txt b/remote_shell/CMakeLists.txt
index e945415..b0b69f1 100644
--- a/remote_shell/CMakeLists.txt
+++ b/remote_shell/CMakeLists.txt
@@ -17,20 +17,20 @@
 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")
-	SET(BUNDLE_VERSION "0.0.1")
-	SET_HEADERS("Bundle-Name: Apache Celix Remote Shell") 
-	
-    bundle(remote_shell SOURCES 
-    	private/src/activator 
-    	private/src/connection_listener 
-    	private/src/shell_mediator 
-    	private/src/remote_shell
+    add_bundle(remote_shell
+     	SYMBOLIC_NAME "apache_celix_remote_shell"
+     	VERSION "0.0.1"
+     	NAME: "Apache Celix Remote Shell"
+		SOURCES
+			private/src/activator
+			private/src/connection_listener
+			private/src/shell_mediator
+			private/src/remote_shell
+
+			${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
 
-		${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
-		
-		private/include/remote_shell.h
-		private/include/connection_listener.h
+			private/include/remote_shell.h
+			private/include/connection_listener.h
 	)
 	
 	install_bundle(remote_shell)
@@ -41,4 +41,6 @@ if (REMOTE_SHELL)
     include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
     
     target_link_libraries(remote_shell celix_framework)
+
+    add_deploy("remote_shell_deploy" NAME "remote_shell"  BUNDLES shell remote_shell shell_tui log_service)
 endif (REMOTE_SHELL)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_shell/deploy.cmake
----------------------------------------------------------------------
diff --git a/remote_shell/deploy.cmake b/remote_shell/deploy.cmake
deleted file mode 100644
index e1ab2bd..0000000
--- a/remote_shell/deploy.cmake
+++ /dev/null
@@ -1,20 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-is_enabled(REMOTE_SHELL)
-if (REMOTE_SHELL)
-	deploy("remote_shell" BUNDLES shell remote_shell shell_tui log_service)
-endif (REMOTE_SHELL)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/scr/scr/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/scr/scr/CMakeLists.txt b/scr/scr/CMakeLists.txt
index 40fd79b..c236832 100644
--- a/scr/scr/CMakeLists.txt
+++ b/scr/scr/CMakeLists.txt
@@ -18,7 +18,7 @@
 include(FindLibXml2)
 include_directories(${LIBXML2_INCLUDE_DIR})
 
-bundle(scr SOURCES
+add_bundle(scr SOURCES
 	scr.c 
 	private/src/xml_parser.c
 	private/src/component_metadata.c

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/scr/test/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/scr/test/CMakeLists.txt b/scr/test/CMakeLists.txt
index 2e9923d..bcbcdb2 100644
--- a/scr/test/CMakeLists.txt
+++ b/scr/test/CMakeLists.txt
@@ -17,7 +17,7 @@
 
 SET_HEADERS("Service-Component: test.xml")
 
-bundle(scr_test SOURCES
+add_bundle(scr_test SOURCES
 	test.c 
 	FILES test.xml
 	)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/shell/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/shell/CMakeLists.txt b/shell/CMakeLists.txt
index 235f348..f1f7ab2 100644
--- a/shell/CMakeLists.txt
+++ b/shell/CMakeLists.txt
@@ -17,26 +17,27 @@
 celix_subproject(SHELL "Option to enable building the Shell bundles" ON DEPS LAUNCHER LOG_SERVICE)
 if (SHELL)
 	find_package(CURL REQUIRED)
-	
-	SET_HEADER(BUNDLE_VERSION "1.0.0")
-	SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_shell")
-	SET_HEADERS("Bundle-Name: Apache Celix Shell") 
 
-    bundle(shell SOURCES
-    	
-	  private/src/activator
-	  private/src/shell
-	  private/src/lb_command
-      private/src/start_command 
-      private/src/stop_command
-      private/src/install_command
-      private/src/update_command
-      private/src/uninstall_command
-      private/src/log_command
-      private/src/inspect_command
-      private/src/help_command
+    add_bundle(shell
+        SYMBOLIC_NAME "apache_celix_shell"
+        VERSION "1.0.0"
+        NAME "Apache Celix Shell"
 
-      ${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
+        SOURCES
+
+          private/src/activator
+          private/src/shell
+          private/src/lb_command
+          private/src/start_command
+          private/src/stop_command
+          private/src/install_command
+          private/src/update_command
+          private/src/uninstall_command
+          private/src/log_command
+          private/src/inspect_command
+          private/src/help_command
+
+          ${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
 
     )
     

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/shell_bonjour/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/shell_bonjour/CMakeLists.txt b/shell_bonjour/CMakeLists.txt
index 5c44dbe..d1990fd 100644
--- a/shell_bonjour/CMakeLists.txt
+++ b/shell_bonjour/CMakeLists.txt
@@ -34,7 +34,7 @@ if (SHELL_BONJOUR)
 	include_directories("${LIBXML2_INCLUDE_DIR}")
 	include_directories("private/include")
 	
-	bundle(bonjour_shell
+	add_bundle(bonjour_shell
 		SOURCES
 		 	private/src/activator.c
 		 	private/src/bonjour_shell.c
@@ -42,5 +42,10 @@ if (SHELL_BONJOUR)
 	
 	target_link_libraries(bonjour_shell celix_framework celix_utils ${LIBXML2_LIBRARIES} ${DNS_SD_LIB})
 
+	add_deploy("bonjour_shell" BUNDLES 
+		shell
+		bonjour_shell
+		PROPERTIES "bonjour.shell.id=Apache Celix"
+	)
 endif (SHELL_BONJOUR)
 

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/shell_bonjour/deploy.cmake
----------------------------------------------------------------------
diff --git a/shell_bonjour/deploy.cmake b/shell_bonjour/deploy.cmake
deleted file mode 100644
index b96209e..0000000
--- a/shell_bonjour/deploy.cmake
+++ /dev/null
@@ -1,25 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-is_enabled(SHELL_BONJOUR)
-if (SHELL_BONJOUR)
-	deploy("bonjour_shell" BUNDLES 
-		shell
-		bonjour_shell
-		PROPERTIES "bonjour.shell.id=Apache Celix"
-	)
-endif (SHELL_BONJOUR)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/shell_tui/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/shell_tui/CMakeLists.txt b/shell_tui/CMakeLists.txt
index ab56f73..a94b616 100644
--- a/shell_tui/CMakeLists.txt
+++ b/shell_tui/CMakeLists.txt
@@ -17,11 +17,10 @@
 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")
-	SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_shell_tui")
-	SET_HEADERS("Bundle-Name: Apache Celix Shell TUI") 
-
-    bundle(shell_tui 
+    add_bundle(shell_tui
+    	SYMBOLIC_NAME "apache_celix_shell_tui"
+    	VERSION "1.0.0"
+    	NAME "Apache Celix Shell TUI"
     	SOURCES 
     		private/src/shell_tui
 	)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/utils/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
index 29d797f..8f6385c 100644
--- a/utils/CMakeLists.txt
+++ b/utils/CMakeLists.txt
@@ -54,7 +54,8 @@ if (UTILS)
                 private/src/thpool.c
                 public/include/thpool.h
         )
-    
+    set_target_properties(celix_utils PROPERTIES "SOVERSION" 2)
+   
     IF(UNIX)
         target_link_libraries(celix_utils m pthread)
     ENDIF(UNIX)


[29/42] celix git commit: CELIX-335: Fix docucmentation links

Posted by pn...@apache.org.
CELIX-335: Fix docucmentation links


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/cd1f7491
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/cd1f7491
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/cd1f7491

Branch: refs/heads/develop
Commit: cd1f7491faf011a1d9b8accf5d75644fa479fd0a
Parents: 66ff626
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Mon Jan 25 13:48:20 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Mon Jan 25 13:48:20 2016 +0100

----------------------------------------------------------------------
 documents/subprojects/readme.md | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/cd1f7491/documents/subprojects/readme.md
----------------------------------------------------------------------
diff --git a/documents/subprojects/readme.md b/documents/subprojects/readme.md
index e5aad85..7e4fd50 100644
--- a/documents/subprojects/readme.md
+++ b/documents/subprojects/readme.md
@@ -2,22 +2,22 @@
 
 Apache Celix is organized into several subprojects. The following subproject are currently available:
 
-* [Framework](../framework) - The Apache Celix framework, an implementation of OSGi adapted to C.
-* [Dependency Manager](../dependency_manager) - A component/dependency model for use through an API provided as library.
-* [Device Access](../device_access) - An implementation of the OSGi Device Access specification adapted to C.
-* [Examples](../examples) - A Selection of examples showing how the framework can be used.
-* [Log Service](../log_service) - An implementation of the OSGi Log Service adapated to C.
-* [Log Writer](../log_writer) - A simple log writer for use in combination with the Log Service.
-* [Remote Service Admin](../remote_services) - An implementation of the OSGi Remote Service Admin Service - for several protocols - adapted to C.
-    * [Remote Service Admin HTTP](../remote_services/remote_service_admin_http) - A HTTP implementation of the RSA.
-    * [Remote Service Admin DFI](../remote_services/remote_service_admin_dfi) - A Dynamic Function Interface (DFI) implementation of the RSA.
-    * [Remote Service Admin SHM](../remote_services/remote_service_admin_shm) - A shared memory implementation of the RSA.
-    * [Topology Manager](../remote_services/topology_manager) - A (scoped) RSA Topology Manager implementation. 
-    * [Discovery Configured](../remote_services/discovery_configured) - A RSA Discovery implementation using static configuration (xml).
-    * [Discovery Etcd](../remote_services/dicovery_etcd) - A RSA Discovery implementation using etcd.
-    * [Discovery SHM](../remote_services/dicovery_shm) - A RSA Discovery implementation using shared memory.
-* [Shell](../shell) - A OSGi shell implementation.
-* [Shell TUI](../shell_tui) - A textual UI for the Celix Shell.
-* [Remote Shell](../remote_shell) - A remote (telnet) frontend for the Celix Shell.
-* [Deployment Admin](../deployment_admin) - A deployment admin implementation.
+* [Framework](../../framework) - The Apache Celix framework, an implementation of OSGi adapted to C.
+* [Dependency Manager](../../dependency_manager) - A component/dependency model for use through an API provided as library.
+* [Device Access](../../device_access) - An implementation of the OSGi Device Access specification adapted to C.
+* [Examples](../../examples) - A Selection of examples showing how the framework can be used.
+* [Log Service](../../log_service) - An implementation of the OSGi Log Service adapated to C.
+* [Log Writer](../../log_writer) - A simple log writer for use in combination with the Log Service.
+* [Remote Service Admin](../../remote_services) - An implementation of the OSGi Remote Service Admin Service - for several protocols - adapted to C.
+    * [Remote Service Admin HTTP](../../remote_services/remote_service_admin_http) - A HTTP implementation of the RSA.
+    * [Remote Service Admin DFI](../../remote_services/remote_service_admin_dfi) - A Dynamic Function Interface (DFI) implementation of the RSA.
+    * [Remote Service Admin SHM](../../remote_services/remote_service_admin_shm) - A shared memory implementation of the RSA.
+    * [Topology Manager](../../remote_services/topology_manager) - A (scoped) RSA Topology Manager implementation. 
+    * [Discovery Configured](../../remote_services/discovery_configured) - A RSA Discovery implementation using static configuration (xml).
+    * [Discovery Etcd](../../remote_services/dicovery_etcd) - A RSA Discovery implementation using etcd.
+    * [Discovery SHM](../../remote_services/dicovery_shm) - A RSA Discovery implementation using shared memory.
+* [Shell](../../shell) - A OSGi shell implementation.
+* [Shell TUI](../../shell_tui) - A textual UI for the Celix Shell.
+* [Remote Shell](../../remote_shell) - A remote (telnet) frontend for the Celix Shell.
+* [Deployment Admin](../../deployment_admin) - A deployment admin implementation.
 


[24/42] celix git commit: CELIX-335: Fix issue with setting a bundle name with add_bundle

Posted by pn...@apache.org.
CELIX-335: Fix issue with setting a bundle name with add_bundle


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/e0a4c461
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/e0a4c461
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/e0a4c461

Branch: refs/heads/develop
Commit: e0a4c461675beb39ced87a299512a0b4aff58d03
Parents: 632252c
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Mon Jan 18 20:58:07 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Mon Jan 18 20:58:07 2016 +0100

----------------------------------------------------------------------
 cmake/cmake_celix/Manifest.template.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/e0a4c461/cmake/cmake_celix/Manifest.template.in
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Manifest.template.in b/cmake/cmake_celix/Manifest.template.in
index f2676d9..d77588c 100644
--- a/cmake/cmake_celix/Manifest.template.in
+++ b/cmake/cmake_celix/Manifest.template.in
@@ -1,5 +1,5 @@
 Bundle-SymbolicName: $<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_SYMBOLIC_NAME>
-Bundle-Name: $<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_TARGET_NAME>
+Bundle-Name: $<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_NAME>
 Bundle-Version: $<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_VERSION>
 Bundle-Description: $<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_DESCRIPTION>
 Bundle-Activator: $<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_ACTIVATOR>


[23/42] celix git commit: CELIX-335: Fix for testing with ninja build system

Posted by pn...@apache.org.
CELIX-335: Fix for testing with ninja build system


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/632252c5
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/632252c5
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/632252c5

Branch: refs/heads/develop
Commit: 632252c516399404efccd7c002b07e93a214b6db
Parents: 52b8ae5
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Fri Jan 15 10:29:06 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Fri Jan 15 10:29:06 2016 +0100

----------------------------------------------------------------------
 .travis.yml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/632252c5/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 56401ea..3bc0573 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -51,7 +51,9 @@ script:
     - if [ "$TRAVIS_OS_NAME" = "linux" ]; then cmake ${BUILD_GEN} -DBUILD_CONFIG_ADMIN=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_DFI=ON -DBUILD_DEPLOYMENT_ADMIN=ON -DBUILD_DEPENDENCY_MANAGER=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 -DBUILD_FRAMEWORK_TESTS=ON -DBUILD_UTILS-TESTS=ON -DENABLE_TESTING=ON ${BUILD_OPTS} -DCMAKE_INSTALL_PREFIX=../install ..; fi
     - if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake ${BUILD_GEN} -DBUILD_CONFIG_ADMIN=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_DFI=ON -DBUILD_DEPLOYMENT_ADMIN=ON -DBUILD_DEPENDENCY_MANAGER=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=OFF -DBUILD_RSA_EXAMPLES=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_SHM=OFF -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 -DBUILD_FRAMEWORK_TESTS=ON -DBUILD_UTILS-TESTS=ON -DENABLE_TESTING=ON -DFFI_LIBRARY=/usr/local/opt/libffi/lib/libffi.dylib ${BUILD_OPTS} -DCMAKE_INSTALL_PREFIX=../install ..; fi
     - ${BUILD_CMD} all && ${BUILD_CMD} install
-    - export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH:`pwd`/utils:`pwd`/framework:`pwd`/dfi && ${BUILD_CMD} test ARGS="-V" 
+    - if [ "${BUILD_SYSTEM}" = "make" ] ; then export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH:`pwd`/utils:`pwd`/framework:`pwd`/dfi && make test ARGS="-V"; fi
+    - if [ "${BUILD_SYSTEM}" = "ninja" ] ; then export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH:`pwd`/utils:`pwd`/framework:`pwd`/dfi && ninja test; fi
+
 
 after_success:
     - if [ "$CC" = "gcc" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then 


[35/42] celix git commit: CELIX-335: Cleanup of unneeded commands/comments in Packaging.cmake

Posted by pn...@apache.org.
CELIX-335: Cleanup of unneeded commands/comments in Packaging.cmake


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/1d00b446
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/1d00b446
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/1d00b446

Branch: refs/heads/develop
Commit: 1d00b446b494b77067d42ae21ba512621777568f
Parents: 8a8292b
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Thu Feb 4 15:21:38 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Thu Feb 4 15:21:38 2016 +0100

----------------------------------------------------------------------
 cmake/cmake_celix/Packaging.cmake | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/1d00b446/cmake/cmake_celix/Packaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Packaging.cmake b/cmake/cmake_celix/Packaging.cmake
index 3fcf070..ccdc33c 100644
--- a/cmake/cmake_celix/Packaging.cmake
+++ b/cmake/cmake_celix/Packaging.cmake
@@ -71,8 +71,6 @@ function(set_library_version TARGET VERSION)
         #This is simpeler than using the <current>:<revision>:<age> approach of libtool
         set_property(TARGET ${TARGET} PROPERTY VERSION "${VERSION}")
         set_property(TARGET ${TARGET} PROPERTY SOVERSION ${MAJOR})
-        #set_property(TARGET ${TARGET} PROPERTY VERSION "${VERSION}")
-        #message("target '${TARGET}' with provided version '${VERSION}' has version parts: '${MAJOR}' '${MINOR}' '${PATCH}'")
     else ()
         message(WARNING "set_library_version: Cannot set version info TARGET and/or VERSION not provided")
     endif ()
@@ -151,7 +149,6 @@ function(add_bundle)
         add_library(${BUNDLE_TARGET_NAME} SHARED ${BUNDLE_SOURCES})
         set_library_version(${BUNDLE_TARGET_NAME} ${BUNDLE_VERSION})
         set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_TARGET_IS_LIB" TRUE)
-        add_dependencies(bundles ${BUNDLE_TARGET_NAME})
     else()
         add_custom_target(${BUNDLE_TARGET_NAME})
     endif()


[18/42] celix git commit: CELIX-335: Update travis config to udate cmake used on osx (brew uninstall/install)

Posted by pn...@apache.org.
CELIX-335: Update travis config to udate cmake used on osx (brew uninstall/install)


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/7a042fd0
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/7a042fd0
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/7a042fd0

Branch: refs/heads/develop
Commit: 7a042fd0b6bb0e2639293c4fc8f17c655d02c869
Parents: 17a0753
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Tue Jan 12 20:46:21 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Tue Jan 12 20:46:21 2016 +0100

----------------------------------------------------------------------
 .travis.yml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/7a042fd0/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index da5f3f0..1a71d86 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,6 +18,7 @@ allow_failures:
 
 before_install:
   - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq update && sudo apt-get install -y uuid-dev libxml2-dev lcov libffi-dev; fi
+  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew uninstall cmake; fi
   - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update && brew install lcov libffi cmake && brew link --force libffi; fi
 
 before_script:


[07/42] celix git commit: CELIX-335: Add and updates building and getting started documentation from the celix site trunk

Posted by pn...@apache.org.
CELIX-335: Add and updates building and getting started documentation from the celix site trunk


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/0dce0f2e
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/0dce0f2e
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/0dce0f2e

Branch: refs/heads/develop
Commit: 0dce0f2e622633734f1674a830711ef319d0f02d
Parents: 8101cd9
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Thu Jan 7 20:35:13 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Thu Jan 7 20:35:13 2016 +0100

----------------------------------------------------------------------
 CMakeLists.txt                                  |   2 +-
 documents/building/building_and_install.md      | 104 +++++++++
 documents/getting_started/getting_started.md    | 214 +++++++++++++++++++
 .../getting_started/getting_started_img1.png    | Bin 0 -> 46250 bytes
 .../getting_started/getting_started_img2.png    | Bin 0 -> 55615 bytes
 .../getting_started/getting_started_img3.png    | Bin 0 -> 127686 bytes
 documents/memory_pools.png                      | Bin 74273 -> 0 bytes
 7 files changed, 319 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/0dce0f2e/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c3494fa..d32f96f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-cmake_minimum_required (VERSION 2.6)
+cmake_minimum_required (VERSION 3.0)
 project (Celix C CXX)
 
 cmake_policy(SET CMP0012 NEW)

http://git-wip-us.apache.org/repos/asf/celix/blob/0dce0f2e/documents/building/building_and_install.md
----------------------------------------------------------------------
diff --git a/documents/building/building_and_install.md b/documents/building/building_and_install.md
new file mode 100644
index 0000000..1e05176
--- /dev/null
+++ b/documents/building/building_and_install.md
@@ -0,0 +1,104 @@
+#Apache Celix - Building and Installing
+
+#Preparing 
+The following packages (libraries + headers) should be installed on your system:
+
+*	Development Environment
+	*	build-essentials 
+	* 	git
+    *   java (for packaging bundles)
+	*	cmake (3 or higher)
+* 	Apache Celix Dependencies
+	*	curl
+	*	jansson
+
+For a debian based systems, the following should work:
+
+<pre>
+sudo apt-get install -yq --no-install-recommends \
+	build-essential \
+    ninja \ 
+  	curl \
+  	git \
+  	libjansson-dev \
+  	libcurl4-openssl-dev \
+    java \
+  	cmake 
+</pre>
+
+For Fedora based systems (dnf), the following should work:
+<pre>
+sudo dnf install \
+    cmake \
+    ninja-build \
+    make \
+    git \
+    java \
+    libcurl-devel \
+    jansson-devel
+</pre>
+
+##Download the Apache Celix sources
+To get started you first have to download the Apache Celix sources. This can be done by cloning the Apache Celix git repository:
+
+```bash
+#Create a new workspace to work in, e.g:
+mkdir ${HOME}/workspace
+export WS=${HOME}/workspace
+cd ${WS}
+
+#clone the repro
+git clone --single-branch --branch develop https://github.com/apache/celix.git
+```
+
+##Building Apache Celix
+Apache Celix uses [CMake](https://cmake.org) as build system. CMake can generate (among others) makefiles or ninja build files. 
+using ninja build files will result in a faster build.
+
+###Building using CMake and makefiles:
+```bash
+cd ${WS}/celix
+mkdir build
+cd build
+cmake .. 
+make 
+```
+
+###Building using CMake and Ninja
+```bash
+cd ${WS}/celix
+mkdir build
+cd build
+cmake -G Ninja ..
+ninja
+```
+
+##Editing Build options
+With use of CMake Apache Celix makes it possible to edit build options. This enabled users to configure a install location and selecting additional bundles.
+To edit the options use ccmake or cmake-gui. For cmake-gui an additional package install can be neccesary (Fedora: `dnf install cmake-gui`). 
+
+```bash
+cd ${WS}/celix/build
+ccmake .
+#Edit options, e.g. enable BUILD_REMOTE_SHELL to build the remote (telnet) shell
+#Edit the CMAKE_INSTALL_PREFIX config to set the install location
+```
+
+For this guide we assume the CMAKE_INSTALL_PREFIX is `/usr/local`.
+
+##Installing Apache Celix
+
+```bash
+cd ${WS}/celix/build
+make
+sudo make install
+```
+
+##Running Apache Celix
+
+If Apache Celix is succesfully installed running
+    celix
+should give the following output:
+"Error: invalid or non-existing configuration file: 'config.properties'.No such file or directory"
+
+For more info how to build your own projects and/or running the Apache Celix examples see [Getting Started](getting_started/getting_started.md)

http://git-wip-us.apache.org/repos/asf/celix/blob/0dce0f2e/documents/getting_started/getting_started.md
----------------------------------------------------------------------
diff --git a/documents/getting_started/getting_started.md b/documents/getting_started/getting_started.md
new file mode 100644
index 0000000..b99cae9
--- /dev/null
+++ b/documents/getting_started/getting_started.md
@@ -0,0 +1,214 @@
+#Apache Celix - Getting Started
+
+##Intro
+This page is intended for first time users of Apache Celix. It should guide you through building & installing Apache Celix, setting up a new project, creating your first bundle, setting up the project for use with Eclipse project and finally running and debugging your bundle directly from eclipse workspace. 
+
+If there are any uncertainties or question, don't hesitate to ask your questions in the [Apache Celix mailing](https://celix.apache.org/support/mailinglist.html).
+
+##Prerequisite
+Some experience with a command line interface (xterm) is expected to be able to follow this guide. 
+
+##Building and Installing
+For Apache Celix see [Building And Installing](../building/building_and_installing.md)
+
+##Installing Eclipse CDT
+Download the latest eclipse CDT at [http://www.eclipse.org](http://www.eclipse.org) and install it on your system. For more information on how the install eclipse on your system consult the eclipse documentation. For this getting started guide the luna version of eclipse was used ([linux](http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/R/eclipse-cpp-luna-R-linux-gtk-x86_64.tar.gz) [mac](http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/R/eclipse-cpp-luna-R-macosx-cocoa-x86_64.tar.gz)).
+
+##Apache Celix Bundle project
+Now that Apache Celix and Eclipse is installed, we are ready to create a new Apache Celix Bundle project. In this project cmake will be create a singe hello world bundle with a deployment configuration for testing the bundle.
+
+To setup of the project, first create a new project dir to work in:
+
+```bash
+#Create a new workspace to work in, e.g:
+mkdir ${HOME}/workspace
+export WS=${HOME}/workspace
+
+mkdir ${WS}/myproject
+cd ${WS}/myproject
+```
+Then create a CMakeLists.txt file - the makefile variant of CMake -in project root directory:
+
+```cmake	
+#${WS}/myproject/CMakeLists.txt
+	
+#PART 1
+cmake_minimum_required(VERSION 3)
+project(myproject C)
+
+#PART 2
+    #Note. If celix is not installed in /usr/local dir, change the location accordingly.
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/usr/local/share/celix/cmake/modules")
+find_package(CELIX REQUIRED)
+include_directories(${CELIX_INCLUDE_DIRS})
+
+#PART 3
+add_subdirectory(bundles/hello_world)
+```
+		
+This CMakeLists.txt file, sets up the following:
+
+* Part 1 
+	* The minimum cmake version required. 
+	* The project name
+	* The type of source files to expect, in this case C.
+* Part 2
+ 	* The CMake module path to be used (e.g. where CMake find_package module can be found)
+	* That Celix package should be searched, configured and that the Celix package is required. 
+	* That for all build targets in this CMakeLists.txt file or any sub directory CMakeLists.txt files the Apache Celix headers directory should be included.
+* Part 3
+	* The CMakelists.txt file in the subdirectory bundles/hello_world should also be processed.
+	
+
+It is a good pratice to create a seperate CMakeLists.txt file for every bundle you want to build. For the hello_world bundle a CMakeLists.txt file should be created in the bundles/hello_world sub directory.
+
+Create the sub directory:
+
+```cmake
+#Create directory structure for the hello_world bundles
+cd ${WS}/myproject
+mkdir -p bundles/hello_world/private/src
+```
+
+
+And add the following CMakeList.txt file:
+
+```cmake	
+#${WS}/myproject/bundles/hello_world/CMakeLists.txt
+
+add_bundle(hello_world
+    VERSION 1.0.0
+	SOURCES(private/src/activator)
+)	
+```
+	
+This CMakeLists.txt file declares that a bundle should be build based on the build result (shared library) of the declared sources (in this caese the private/src/activator.c source). The add_bundle function is an Apache Celix specific CMake extension. 
+
+The last part for the hello_world bundle is the bundle activator source. The bundle activator is the entry point for an Apache Celix Bundle. Think of the bundle activator as the main function for a bundle, whith the difference that is does not only control the start of a bundle, but also the stopping of a bundle. 
+
+Creating/starting and stopping/destroying is seperated in bundle activator. This is done to make a clear seperation between the instantion/creation of a structure (e.g. object) and exposure of that instantation to other parts of the program. The same, but then reserve hold for seperating stopping and destroying a bundle. 
+
+```C
+//${WS}/myproject/bundles/hello_world/private/src/activator.c
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "bundle_activator.h"
+#include "bundle_context.h"
+
+
+struct userData {
+	    char * word;
+};
+
+celix_status_t bundleActivator_create(bundle_context_pt context, void **userData) {
+	celix_status_t status = CELIX_SUCCESS;
+    *userData = malloc(sizeof(struct userData));
+	if (userData != NULL) {
+            ((struct userData *)(*userData))->word = "World";
+    } else {
+            status = CELIX_START_ERROR;
+    }
+    return CELIX_SUCCESS;
+}
+
+celix_status_t bundleActivator_start(void * userData, bundle_context_pt context) {
+    struct userData * data = (struct userData *) userData;
+    printf("Hello %s\n", data->word);
+    return CELIX_SUCCESS;
+}
+
+celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) {
+    struct userData * data = (struct userData *) userData;
+    printf("Goodbye %s\n", data->word);
+    return CELIX_SUCCESS;
+}       
+    
+celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt context) {
+	free(userData);
+    return CELIX_SUCCESS;
+}
+```
+	
+###Building 
+One of the highly recommended features of CMake is the ability to do out of source builds, the benefit is that all of the build results will go in a seperate directory without cluttering the (source) project. To create the build directory and build the project execute the following commands:
+
+```bash
+cd ${WS}
+mkdir myproject/build
+cd myproject/build
+cmake ..
+make all  
+#Or
+#cmake -G Ninja ..
+#ninja
+```	
+
+Hopefully you will some some build results scrolling over the screen and actual build results in the build directory. There should be a hello_world.zip in the bundles/hello_world directory, this the actual bundle. But a bundle on its own has no real value, so lets setup a deployment and run the Apache Celix framwork with this bundle.
+
+
+###Running 
+
+To create a deployment for the hello_world bundle two things are needed: 
+	
+1. Add a `add_deploy` statement in the `bundles/hello_world/CMakeLists.txt` file declaring what to deploy and under which name.
+
+```cmake
+${WS}/myproject/bundles/hello_world/CMakeLists.txt
+deploy("myproject-deploy" BUNDLES 
+	${CELIX_BUNDLES_DIR}/shell.zip 
+	${CELIX_BUNDLES_DIR}/shell_tui.zip
+	hello_world
+)		
+```
+ 		   
+Rerun make again form the  build project. the make files genereated by CMake will ensure cmake is runned again to update the actual make files.
+
+```bash 		
+cd ${WS}/myproject-build
+make 
+#or
+#ninja
+```	
+
+Now a deploy directory myproject should be availabe in the deploy directory. This directory contains - among other files - the run.sh script. This can be used to run the Apache Celix framework with the declared bundles from the deploy.cmake.
+
+	cd ${WS}/myproject-build/deploy/myproject-deploy
+	sh run.sh
+
+The hello_world bundle should be started with the famous "Hello World" text printed. The shell and shell_tui bundle are also deployed and these can be used to query and control the running framework. Below some commands are shown for printed the installed bundles, printing all known shell command, printing help of a specific command and stopping a specific bundle (note that bundle 0 is the framework):
+
+```
+lb 
+help
+help inspect
+stop 0
+```
+	
+##Apache Celix Bundle Project in Eclipse
+
+A nice feature of CMake is the ability to generate Eclipse project files, with this feature bundles can also be developed with use of Eclipse. This should help speed up the development process. 
+To get started change directory to the build directory and generate a eclipse project file.
+
+	cd ${WS}/myproject/build 
+	cmake -G "Eclipse CDT4 - Unix Makefiles" .
+	
+Startup the Eclipse EDI and a chose the `${WS}`
+
+![select workspace](/documentation/getting_started_img1.png)
+
+Import the project with existing project. 
+
+![import project](/documentation/getting_started_img2.png)
+
+To build the project, use Project->Build All. To run or debug from Eclipse navigate to the myproject deploy directory and right click on the 'myproject.launch' file. And select Run As or Debug As to run or debug the bundle.
+
+![run project](/documentation/getting_started_img3.png) 
+ 
+
+ 
+ 
+
+
+	
+	

http://git-wip-us.apache.org/repos/asf/celix/blob/0dce0f2e/documents/getting_started/getting_started_img1.png
----------------------------------------------------------------------
diff --git a/documents/getting_started/getting_started_img1.png b/documents/getting_started/getting_started_img1.png
new file mode 100644
index 0000000..d3d9a92
Binary files /dev/null and b/documents/getting_started/getting_started_img1.png differ

http://git-wip-us.apache.org/repos/asf/celix/blob/0dce0f2e/documents/getting_started/getting_started_img2.png
----------------------------------------------------------------------
diff --git a/documents/getting_started/getting_started_img2.png b/documents/getting_started/getting_started_img2.png
new file mode 100644
index 0000000..76cc3ad
Binary files /dev/null and b/documents/getting_started/getting_started_img2.png differ

http://git-wip-us.apache.org/repos/asf/celix/blob/0dce0f2e/documents/getting_started/getting_started_img3.png
----------------------------------------------------------------------
diff --git a/documents/getting_started/getting_started_img3.png b/documents/getting_started/getting_started_img3.png
new file mode 100644
index 0000000..3d4cf42
Binary files /dev/null and b/documents/getting_started/getting_started_img3.png differ

http://git-wip-us.apache.org/repos/asf/celix/blob/0dce0f2e/documents/memory_pools.png
----------------------------------------------------------------------
diff --git a/documents/memory_pools.png b/documents/memory_pools.png
deleted file mode 100644
index f005d1d..0000000
Binary files a/documents/memory_pools.png and /dev/null differ


[36/42] celix git commit: CELIX-335: Remove out commented deploy-targets() CMake command

Posted by pn...@apache.org.
CELIX-335: Remove out commented deploy-targets() CMake command


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/ef2d16fc
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/ef2d16fc
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/ef2d16fc

Branch: refs/heads/develop
Commit: ef2d16fc02640350c1682e061f86fa50f1f87fab
Parents: 1d00b44
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Thu Feb 4 15:23:59 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Thu Feb 4 15:23:59 2016 +0100

----------------------------------------------------------------------
 CMakeLists.txt | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/ef2d16fc/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3da3ef9..5b95566 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -89,5 +89,3 @@ add_subdirectory(launcher)
 add_subdirectory(framework)
 add_subdirectory(utils)
 add_subdirectory(dfi)
-
-#deploy_targets()


[17/42] celix git commit: CELIX-335: Fix invalid linking setup for linux for the tracker_depman example

Posted by pn...@apache.org.
CELIX-335: Fix invalid linking setup for linux for the tracker_depman example


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/17a07535
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/17a07535
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/17a07535

Branch: refs/heads/develop
Commit: 17a07535942c6c7f0ed5cc923a1c977aa4c12908
Parents: 40bf193
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Tue Jan 12 13:01:42 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Tue Jan 12 13:01:42 2016 +0100

----------------------------------------------------------------------
 examples/whiteboard/tracker_depman/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/17a07535/examples/whiteboard/tracker_depman/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/whiteboard/tracker_depman/CMakeLists.txt b/examples/whiteboard/tracker_depman/CMakeLists.txt
index a2d6287..3bd5942 100644
--- a/examples/whiteboard/tracker_depman/CMakeLists.txt
+++ b/examples/whiteboard/tracker_depman/CMakeLists.txt
@@ -32,5 +32,5 @@ include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
 IF(APPLE)
 target_link_libraries(tracker_depman celix_framework -Wl,-all_load dependency_manager_static)
 else()
-target_link_libraries(tracker_depman -Wl,--whole-archive dependency_manager -Wl,--no-whole-archive celix_framework_static)
+target_link_libraries(tracker_depman -Wl,--whole-archive dependency_manager_static -Wl,--no-whole-archive celix_framework)
 ENDIF()


[22/42] celix git commit: CELIX-335: Fix yet another error in travis.yml

Posted by pn...@apache.org.
CELIX-335: Fix yet another error in travis.yml


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/52b8ae5b
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/52b8ae5b
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/52b8ae5b

Branch: refs/heads/develop
Commit: 52b8ae5b1903a0491bdf436c0043df7cdf21314a
Parents: de7915a
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Thu Jan 14 17:51:17 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Thu Jan 14 17:51:17 2016 +0100

----------------------------------------------------------------------
 .travis.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/52b8ae5b/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 8cfddf8..56401ea 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,8 +38,8 @@ before_script:
     - sudo make install
     - cd -
     - mkdir build install
-    - if [ "${BUILD_SYSTEM}" = "make" ]; then export BUILD_CMD=make;    export BUILD_GEN=""; 
-    - if [ "${BUILD_SYSTEM}" = "ninja"]; then export BUILD_CMD=ninja;   export BUILD_GEN="-G Ninja"; fi
+    - if [ "${BUILD_SYSTEM}" = "make"  ]; then export BUILD_CMD=make;    export BUILD_GEN=""; fi
+    - if [ "${BUILD_SYSTEM}" = "ninja" ]; then export BUILD_CMD=ninja;   export BUILD_GEN="-G Ninja"; fi
 
 
 script:


[37/42] celix git commit: Merge branch 'feature/CELIX-335_deploy_refactoring' into develop

Posted by pn...@apache.org.
Merge branch 'feature/CELIX-335_deploy_refactoring' into develop


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/9934f752
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/9934f752
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/9934f752

Branch: refs/heads/develop
Commit: 9934f75275c7de4d50088b7f87256a1bd5ba3047
Parents: b815e68 ef2d16f
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Fri Feb 5 09:37:35 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Fri Feb 5 09:37:35 2016 +0100

----------------------------------------------------------------------
 .travis.yml                                     |    5 +-
 CMakeLists.txt                                  |   10 +-
 cmake/CMakeCelix.cmake                          |    1 +
 cmake/UseDoxygen.cmake                          |    4 +-
 cmake/cmake_celix/CPackConfig-Installation.in   |   29 -
 cmake/cmake_celix/CPackConfig.in                |   25 -
 cmake/cmake_celix/CPackConfigPKG.in             |   25 -
 cmake/cmake_celix/Dependencies.cmake            |   37 +-
 cmake/cmake_celix/Manifest.template.in          |   10 +
 cmake/cmake_celix/NOTE                          |    4 +-
 cmake/cmake_celix/Packaging.cmake               | 1048 ++++++++++--------
 cmake/cmake_celix/PackagingLegacy.cmake         |  108 ++
 cmake/cmake_celix/RunConfig.in                  |   37 +-
 cmake/cmake_celix/config.properties.in          |    2 -
 cmake/cmake_celix/installation.cmake            |   30 -
 cmake/cmake_celix/manifest.in                   |    2 -
 cmake/cmake_celix/run.sh.in                     |    2 -
 config_admin/CMakeLists.txt                     |    3 +
 .../example_test/CMakeLists.txt                 |    7 +-
 .../example_test2/CMakeLists.txt                |    6 +-
 config_admin/deploy.cmake                       |   23 -
 config_admin/service/CMakeLists.txt             |    7 +-
 dependency_manager/CMakeLists.txt               |   40 +-
 .../private/src/dm_activator_base.c             |    9 +-
 .../public/include/dm_activator.h               |   40 +
 .../public/include/dm_activator_base.h          |   41 -
 deployment_admin/CMakeLists.txt                 |   60 +-
 deployment_admin/deploy.cmake                   |   24 -
 device_access/CMakeLists.txt                    |    2 +-
 device_access/deploy.cmake                      |   21 -
 device_access/device_access/CMakeLists.txt      |   32 +-
 device_access/driver_locator/CMakeLists.txt     |   14 +-
 device_access/example/CMakeLists.txt            |   11 +-
 .../example/base_driver/CMakeLists.txt          |   14 +-
 .../example/consuming_driver/CMakeLists.txt     |   14 +-
 .../example/refining_driver/CMakeLists.txt      |   14 +-
 dfi/CMakeLists.txt                              |    8 +-
 documents/building/readme.md                    |  104 ++
 documents/cmake_commands/readme.md              |  210 ++++
 .../getting_started/getting_started_img1.png    |  Bin 0 -> 46250 bytes
 .../getting_started/getting_started_img2.png    |  Bin 0 -> 55615 bytes
 .../getting_started/getting_started_img3.png    |  Bin 0 -> 127686 bytes
 documents/getting_started/readme.md             |  216 ++++
 documents/memory_pools.png                      |  Bin 74273 -> 0 bytes
 documents/subprojects/readme.md                 |   23 +
 event_admin/CMakeLists.txt                      |    6 +-
 event_admin/deploy.cmake                        |   23 -
 event_admin/event_admin/CMakeLists.txt          |   10 +-
 event_admin/event_handler/CMakeLists.txt        |    9 +-
 event_admin/event_publisher/CMakeLists.txt      |   10 +-
 examples/CMakeLists.txt                         |   14 +
 examples/deploy.cmake                           |   34 -
 examples/dm_example/CMakeLists.txt              |   15 +
 examples/dm_example/deploy.cmake                |   32 -
 examples/dm_example/phase1/CMakeLists.txt       |   26 +-
 .../phase1/private/src/phase1_activator.c       |    2 +-
 .../dm_example/phase1/private/src/phase1_cmp.c  |    2 +-
 examples/dm_example/phase2a/CMakeLists.txt      |   22 +-
 .../phase2a/private/src/phase2a_activator.c     |    2 +-
 examples/dm_example/phase2b/CMakeLists.txt      |   24 +-
 .../phase2b/private/src/phase2b_activator.c     |    2 +-
 .../phase2b/private/src/phase2b_cmp.c           |    2 +-
 examples/dm_example/phase3/CMakeLists.txt       |   24 +-
 .../phase3/private/src/phase3_activator.c       |    2 +-
 examples/echo_service/client/CMakeLists.txt     |   16 +-
 examples/echo_service/server/CMakeLists.txt     |   16 +-
 examples/embedding/CMakeLists.txt               |    8 -
 examples/hello_world/CMakeLists.txt             |   41 +-
 examples/hello_world_test/CMakeLists.txt        |   80 +-
 .../hello_world_test/private/src/activator.c    |    3 -
 examples/hello_world_test/private/src/test.c    |   32 +
 examples/hello_world_test/public/include/test.h |   34 +
 examples/locking/CMakeLists.txt                 |    8 +
 examples/locking/benchmark/CMakeLists.txt       |    9 +-
 examples/locking/deploy.cmake                   |   26 -
 examples/locking/math_provider/CMakeLists.txt   |   11 +-
 .../modified_bool_benchmark/CMakeLists.txt      |    5 +-
 examples/locking/mutex_benchmark/CMakeLists.txt |   11 +-
 .../locking/reference_benchmark/CMakeLists.txt  |    5 +-
 .../locking/start_stop_benchmark/CMakeLists.txt |    5 +-
 examples/mongoose/CMakeLists.txt                |   17 +-
 .../client/CMakeLists.txt                       |    5 +-
 .../greeting/CMakeLists.txt                     |    5 +-
 .../chapter04-correct-listener/CMakeLists.txt   |    3 +-
 .../chapter04-correct-lookup/CMakeLists.txt     |    5 +-
 .../chapter04-paint-example/CMakeLists.txt      |    2 +
 .../circle/CMakeLists.txt                       |    2 +-
 .../chapter04-paint-example/deploy.cmake        |   22 -
 .../paint/CMakeLists.txt                        |    2 +-
 .../square/CMakeLists.txt                       |    2 +-
 .../triangle/CMakeLists.txt                     |    2 +-
 .../producer_consumer/consumer/CMakeLists.txt   |    8 +-
 .../producer_consumer/database/CMakeLists.txt   |    8 +-
 .../producer_consumer/producer/CMakeLists.txt   |    8 +-
 examples/whiteboard/publisherA/CMakeLists.txt   |    4 +-
 examples/whiteboard/publisherB/CMakeLists.txt   |    5 +-
 examples/whiteboard/tracker/CMakeLists.txt      |    5 +-
 .../whiteboard/tracker_depman/CMakeLists.txt    |    9 +-
 .../private/src/dependency_activator.c          |    2 +-
 framework/CMakeLists.txt                        |   14 +-
 .../test_bundle1/CMakeLists.txt                 |    7 +-
 framework/private/src/framework.c               |   32 +-
 framework/private/src/manifest.c                |    3 +-
 framework/private/src/utils.c                   |   17 +
 framework/public/include/constants.h            |    2 -
 framework/public/include/utils.h                |    1 +
 log_service/CMakeLists.txt                      |   11 +-
 log_writer/log_writer_stdout/CMakeLists.txt     |   18 +-
 log_writer/log_writer_syslog/CMakeLists.txt     |   10 +-
 .../discovery_configured/CMakeLists.txt         |    9 +-
 remote_services/discovery_etcd/CMakeLists.txt   |   11 +-
 remote_services/discovery_shm/CMakeLists.txt    |   10 +-
 remote_services/examples/CMakeLists.txt         |   69 ++
 .../examples/calculator_endpoint/CMakeLists.txt |    7 +-
 .../calculator_endpoint2/CMakeLists.txt         |    7 +-
 .../examples/calculator_proxy/CMakeLists.txt    |    7 +-
 .../examples/calculator_proxy2/CMakeLists.txt   |    7 +-
 .../examples/calculator_service/CMakeLists.txt  |   12 +-
 .../examples/calculator_shell/CMakeLists.txt    |   17 +-
 remote_services/examples/deploy.cmake           |   65 --
 .../remote_service_admin/CMakeLists.txt         |    5 -
 .../remote_service_admin_dfi/rsa/CMakeLists.txt |   10 +-
 .../rsa_tst/CMakeLists.txt                      |   20 +-
 .../rsa_tst/bundle/CMakeLists.txt               |   16 +-
 .../remote_service_admin_http/CMakeLists.txt    |   10 +-
 .../private/test/CMakeLists.txt                 |   20 +-
 .../remote_service_admin_shm/CMakeLists.txt     |    9 +-
 .../private/test/CMakeLists.txt                 |   26 +-
 .../private/test/client.properties.in           |    2 +-
 remote_services/topology_manager/CMakeLists.txt |   10 +-
 .../topology_manager/tms_tst/CMakeLists.txt     |   28 +-
 .../tms_tst/bundle/CMakeLists.txt               |   14 +-
 .../tms_tst/disc_mock/CMakeLists.txt            |    7 +-
 remote_shell/CMakeLists.txt                     |   28 +-
 remote_shell/deploy.cmake                       |   20 -
 scr/scr/CMakeLists.txt                          |    2 +-
 scr/test/CMakeLists.txt                         |    2 +-
 shell/CMakeLists.txt                            |   37 +-
 shell_bonjour/CMakeLists.txt                    |    7 +-
 shell_bonjour/deploy.cmake                      |   25 -
 shell_tui/CMakeLists.txt                        |   11 +-
 utils/CMakeLists.txt                            |    2 +
 142 files changed, 2110 insertions(+), 1546 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/9934f752/config_admin/CMakeLists.txt
----------------------------------------------------------------------


[14/42] celix git commit: CELIX-335: Fix wrong linking in example

Posted by pn...@apache.org.
CELIX-335: Fix wrong linking in example


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/9ba259e9
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/9ba259e9
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/9ba259e9

Branch: refs/heads/develop
Commit: 9ba259e91fb8effeff6b93d63d14fda6026cfc05
Parents: 61a7113
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Sat Jan 9 20:56:40 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Sat Jan 9 20:56:40 2016 +0100

----------------------------------------------------------------------
 examples/dm_example/phase2a/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/9ba259e9/examples/dm_example/phase2a/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase2a/CMakeLists.txt b/examples/dm_example/phase2a/CMakeLists.txt
index f5617fa..d540dc5 100644
--- a/examples/dm_example/phase2a/CMakeLists.txt
+++ b/examples/dm_example/phase2a/CMakeLists.txt
@@ -33,5 +33,5 @@ include_directories(
 IF(APPLE)
 target_link_libraries(phase2a celix_framework -Wl,-all_load dependency_manager_static)
 else()
-target_link_libraries(phase2a -Wl,--whole-archive dependency_manager -Wl,--no-whole-archive celix_framework_static)
+target_link_libraries(phase2a -Wl,--whole-archive dependency_manager_static -Wl,--no-whole-archive celix_framework)
 ENDIF()


[34/42] celix git commit: CELIX-335: Update in cmake command documentation

Posted by pn...@apache.org.
CELIX-335: Update in cmake command documentation


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/8a8292bd
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/8a8292bd
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/8a8292bd

Branch: refs/heads/develop
Commit: 8a8292bd7c173baa4bfb9774f204a7ee1f078c09
Parents: 89eaab3
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Wed Feb 3 09:57:58 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Wed Feb 3 09:57:58 2016 +0100

----------------------------------------------------------------------
 documents/cmake_commands/readme.md | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/8a8292bd/documents/cmake_commands/readme.md
----------------------------------------------------------------------
diff --git a/documents/cmake_commands/readme.md b/documents/cmake_commands/readme.md
index e9f994e..30d863e 100644
--- a/documents/cmake_commands/readme.md
+++ b/documents/cmake_commands/readme.md
@@ -165,6 +165,15 @@ add_deploy(<deploy_target_name>
 )
 ```
 
+The provided bundle targets for a deployment do not have to exists (yet).
+This removes the need for correctly ordening the add_bundle commands so that all bundle target are present before an add_deploy command.
+If the bundle target is never added CMake will give an error:
+```
+  Error evaluating generator expression:
+
+    $<TARGET_PROPERTY:foo,BUNDLE_FILE>
+```
+
 - If COPY is provided the selected bundles will be copied in a bundles dir and the generated config.properties will use relative paths to the bundle locations. Default bundles will not be copied and the generated config.properties will use absolute references to the bundle locations.
 - If GROUP is provided the deployment will be grouped in the provided group name. 
 - If NAME is provided that name will be used for the deployment dir. Default the deploy target name will be used.


[06/42] celix git commit: CELIX-335: Updated cmake @VAR@ usage to ${VAR} for the new CMP0053 policy

Posted by pn...@apache.org.
CELIX-335: Updated cmake @VAR@ usage to ${VAR} for the new CMP0053 policy


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/8101cd92
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/8101cd92
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/8101cd92

Branch: refs/heads/develop
Commit: 8101cd92cb9767eae66477a88457da9c7270f48c
Parents: 414bc1b
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Thu Jan 7 19:37:40 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Thu Jan 7 19:37:40 2016 +0100

----------------------------------------------------------------------
 CMakeLists.txt                                    |  3 ---
 cmake/cmake_celix/Manifest.template.in            | 18 +++++++++---------
 cmake/cmake_celix/Packaging.cmake                 |  2 +-
 device_access/example/CMakeLists.txt              |  2 +-
 .../private/test/CMakeLists.txt                   |  4 ++--
 .../private/test/CMakeLists.txt                   |  4 ++--
 .../private/test/client.properties.in             |  2 +-
 7 files changed, 16 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/8101cd92/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bfe3288..c3494fa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,9 +19,6 @@ cmake_minimum_required (VERSION 2.6)
 project (Celix C CXX)
 
 cmake_policy(SET CMP0012 NEW)
-if(POLICY CMP0053)
-    cmake_policy(SET CMP0053 OLD)
-endif(POLICY CMP0053)
 
 #SET(CMAKE_VERBOSE_MAKEFILE ON)
 

http://git-wip-us.apache.org/repos/asf/celix/blob/8101cd92/cmake/cmake_celix/Manifest.template.in
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Manifest.template.in b/cmake/cmake_celix/Manifest.template.in
index c458754..f2676d9 100644
--- a/cmake/cmake_celix/Manifest.template.in
+++ b/cmake/cmake_celix/Manifest.template.in
@@ -1,10 +1,10 @@
-Bundle-SymbolicName: $<TARGET_PROPERTY:@BUNDLE_TARGET_NAME@,BUNDLE_SYMBOLIC_NAME>
-Bundle-Name: $<TARGET_PROPERTY:@BUNDLE_TARGET_NAME@,BUNDLE_TARGET_NAME>
-Bundle-Version: $<TARGET_PROPERTY:@BUNDLE_TARGET_NAME@,BUNDLE_VERSION>
-Bundle-Description: $<TARGET_PROPERTY:@BUNDLE_TARGET_NAME@,BUNDLE_DESCRIPTION>
-Bundle-Activator: $<TARGET_PROPERTY:@BUNDLE_TARGET_NAME@,BUNDLE_ACTIVATOR>
-Private-Library: $<JOIN:$<TARGET_PROPERTY:@BUNDLE_TARGET_NAME@,BUNDLE_PRIVATE_LIBS>,, >
-Import-Library: $<JOIN:$<TARGET_PROPERTY:@BUNDLE_TARGET_NAME@,BUNDLE_IMPORT_LIBS>,, >
-Export-Library: $<JOIN:$<TARGET_PROPERTY:@BUNDLE_TARGET_NAME@,BUNDLE_EXPORT_LIBS>,, >
-$<JOIN:$<TARGET_PROPERTY:@BUNDLE_TARGET_NAME@,BUNDLE_HEADERS>,
+Bundle-SymbolicName: $<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_SYMBOLIC_NAME>
+Bundle-Name: $<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_TARGET_NAME>
+Bundle-Version: $<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_VERSION>
+Bundle-Description: $<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_DESCRIPTION>
+Bundle-Activator: $<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_ACTIVATOR>
+Private-Library: $<JOIN:$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_PRIVATE_LIBS>,, >
+Import-Library: $<JOIN:$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_IMPORT_LIBS>,, >
+Export-Library: $<JOIN:$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_EXPORT_LIBS>,, >
+$<JOIN:$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_HEADERS>,
 >

http://git-wip-us.apache.org/repos/asf/celix/blob/8101cd92/cmake/cmake_celix/Packaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Packaging.cmake b/cmake/cmake_celix/Packaging.cmake
index aadc4b4..bb7daa9 100644
--- a/cmake/cmake_celix/Packaging.cmake
+++ b/cmake/cmake_celix/Packaging.cmake
@@ -166,7 +166,7 @@ function(add_bundle)
 
     ##### MANIFEST configuration and generation ##################
     #Step1 configure the file so that the target name is present in in the template
-    configure_file(${CELIX_CMAKE_DIRECTORY}/cmake_celix/Manifest.template.in ${BUNDLE_GEN_DIR}/MANIFEST.template @ONLY)
+    configure_file(${CELIX_CMAKE_DIRECTORY}/cmake_celix/Manifest.template.in ${BUNDLE_GEN_DIR}/MANIFEST.template)
     #Step2 replace headers with target property values. Note this is done build time
     file(GENERATE 
         OUTPUT "${BUNDLE_GEN_DIR}/MANIFEST.tmp"

http://git-wip-us.apache.org/repos/asf/celix/blob/8101cd92/device_access/example/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/example/CMakeLists.txt b/device_access/example/CMakeLists.txt
index acf16f7..1a5cd77 100644
--- a/device_access/example/CMakeLists.txt
+++ b/device_access/example/CMakeLists.txt
@@ -26,7 +26,7 @@ if(DEVICE_ACCESS_EXAMPLE)
     )
 
     deploy_bundles_dir(device_access_example
-            DIR_NAME "DRIVERS"
+            DIR_NAME "drivers"
             BUNDLES word_consumingdriver char_refiningdriver
     )
 endif(DEVICE_ACCESS_EXAMPLE)

http://git-wip-us.apache.org/repos/asf/celix/blob/8101cd92/remote_services/remote_service_admin_http/private/test/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_http/private/test/CMakeLists.txt b/remote_services/remote_service_admin_http/private/test/CMakeLists.txt
index 3954c72..a199bc2 100644
--- a/remote_services/remote_service_admin_http/private/test/CMakeLists.txt
+++ b/remote_services/remote_service_admin_http/private/test/CMakeLists.txt
@@ -45,8 +45,8 @@ get_property(topology_manager_bundle_file TARGET topology_manager PROPERTY BUNDL
 get_property(calc_proxy_bundle_file TARGET org.apache.celix.calc.api.Calculator_proxy PROPERTY BUNDLE_FILE)
 get_property(calc_endpoint_bundle_file TARGET  org.apache.celix.calc.api.Calculator_endpoint PROPERTY BUNDLE_FILE)
 
-get_filename_component(client_endpoints @calc_proxy_bundle_file@ PATH)
-get_filename_component(server_endpoints @calc_endpoint_bundle_file@ PATH)
+get_filename_component(client_endpoints ${calc_proxy_bundle_file} PATH)
+get_filename_component(server_endpoints ${calc_endpoint_bundle_file} PATH)
 
 configure_file(client.properties.in client.properties @ONLY)
 configure_file(server.properties.in server.properties @ONLY)

http://git-wip-us.apache.org/repos/asf/celix/blob/8101cd92/remote_services/remote_service_admin_shm/private/test/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_shm/private/test/CMakeLists.txt b/remote_services/remote_service_admin_shm/private/test/CMakeLists.txt
index 524e6eb..4a0ae10 100644
--- a/remote_services/remote_service_admin_shm/private/test/CMakeLists.txt
+++ b/remote_services/remote_service_admin_shm/private/test/CMakeLists.txt
@@ -45,8 +45,8 @@ get_property(topology_manager_bundle_file TARGET topology_manager PROPERTY BUNDL
 get_property(calc_proxy_bundle_file TARGET org.apache.celix.calc.api.Calculator_proxy PROPERTY BUNDLE_FILE)
 get_property(calc_endpoint_bundle_file TARGET  org.apache.celix.calc.api.Calculator_endpoint PROPERTY BUNDLE_FILE)
 
-get_filename_component(client_endpoints @calc_proxy_bundle_file@ PATH)
-get_filename_component(server_endpoints @calc_endpoint_bundle_file@ PATH)
+get_filename_component(client_endpoints ${calc_proxy_bundle_file} PATH)
+get_filename_component(server_endpoints ${calc_endpoint_bundle_file} PATH)
 
 configure_file(client.properties.in client.properties @ONLY)
 configure_file(server.properties.in server.properties @ONLY)

http://git-wip-us.apache.org/repos/asf/celix/blob/8101cd92/remote_services/remote_service_admin_shm/private/test/client.properties.in
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_shm/private/test/client.properties.in b/remote_services/remote_service_admin_shm/private/test/client.properties.in
index 17e5412..d4eb239 100644
--- a/remote_services/remote_service_admin_shm/private/test/client.properties.in
+++ b/remote_services/remote_service_admin_shm/private/test/client.properties.in
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-cosgi.auto.start.1=@rsa_bundle_file@ @calculator_shell_bundle_file@ @discovery_shm_bundle_file@ @topology_manager_bundle_file@ @tst_bundle_file@
+cosgi.auto.start.1=${rsa_bundle_file} ${calculator_shell_bundle_file} ${discovery_shm_bundle_file} ${topology_manager_bundle_file} ${tst_bundle_file}
 LOGHELPER_ENABLE_STDOUT_FALLBACK=true
 ENDPOINTS=@client_endpoints@
 RSA_PORT=50881


[38/42] celix git commit: CELIX-335: Fix bundle command in PackagegingLegacy. Update celix-bootstrap for updated CMake commands

Posted by pn...@apache.org.
CELIX-335: Fix bundle command in PackagegingLegacy. Update celix-bootstrap for updated CMake commands


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/1eb9eb01
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/1eb9eb01
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/1eb9eb01

Branch: refs/heads/develop
Commit: 1eb9eb01f1db3b78d3f0d6840fddfc660ce1cf6f
Parents: 9934f75
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Fri Feb 5 10:13:21 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Fri Feb 5 10:13:21 2016 +0100

----------------------------------------------------------------------
 .gitignore                                      |  1 +
 celix-bootstrap/celix/bootstrap/generators.py   | 10 -----
 .../bootstrap/templates/bundle/CMakeLists.txt   | 46 ++++++++++----------
 .../bootstrap/templates/bundle/deploy.cmake     | 14 ------
 cmake/cmake_celix/PackagingLegacy.cmake         | 18 ++++++--
 config_admin/CMakeLists.txt                     | 11 ++++-
 config_admin/example/CMakeLists.txt             |  4 +-
 7 files changed, 51 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/1eb9eb01/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 6c1ab95..50221c0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,4 @@ build
 *.swp
 .idea
 nbproject
+*.pyc

http://git-wip-us.apache.org/repos/asf/celix/blob/1eb9eb01/celix-bootstrap/celix/bootstrap/generators.py
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/bootstrap/generators.py b/celix-bootstrap/celix/bootstrap/generators.py
index e9d469b..4c6769e 100644
--- a/celix-bootstrap/celix/bootstrap/generators.py
+++ b/celix-bootstrap/celix/bootstrap/generators.py
@@ -97,10 +97,6 @@ class Bundle(BaseGenerator):
 		options = ["-D", "bundleFile=%s" % self.descriptor]
 		self.update_file("CMakeLists.txt", "CMakeLists.txt", options, "#")	
 		
-	def update_deploy_file(self) :
-		options = ["-D", "bundleFile=%s" % self.descriptor]
-		self.update_file("deploy.cmake", "deploy.cmake", options, "#")	
-
 	def update_activator(self) :
 		options = ["-D", "bundleFile=%s" % self.descriptor]
 		self.update_file("bundle_activator.c", "private/src/bundle_activator.c", options)
@@ -129,7 +125,6 @@ class Bundle(BaseGenerator):
 			print("%s does not exist or does not contain a bundle.yaml file" % self.gendir)
 		else :
 			self.update_cmakelists()	
-			self.update_deploy_file()
 			self.update_activator()
 			if 'components' in bd and bd['components'] is not None:
 				for comp in bd['components'] :
@@ -149,10 +144,6 @@ class Project(BaseGenerator):
                 options = ["-D", "projectFile=%s" % self.descriptor]
                 self.update_file("CMakeLists.txt", "CMakeLists.txt", options, "#")      
 
-        def update_deploy_file(self) :
-                options = ["-D", "projectFile=%s" % self.descriptor]
-                self.update_file("deploy.cmake", "deploy.cmake", options, "#")  
-
         def create(self) :
                 self.update_file(os.path.join(self.template_dir, self.profile, "%s.yaml" % self.profile),  "%s.yaml" % self.profile, [], None)  
 
@@ -162,4 +153,3 @@ class Project(BaseGenerator):
                         print("%s does not exist or does not contain a project.yaml file" % self.gendir)
                 else :
                         self.update_cmakelists()        
-                        self.update_deploy_file()

http://git-wip-us.apache.org/repos/asf/celix/blob/1eb9eb01/celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt b/celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt
index 5e1cdd8..d96c422 100644
--- a/celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt
+++ b/celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt
@@ -14,27 +14,6 @@
 #}}
 #{{end}}
 
-
-SET(
-	BUNDLE_NAME 
-#{{ 
-#cog.outl("\t\"%s\"" % bundle['name']) 
-#}}
-"mybundle" #do not edit, generated code
-#{{end}}
-)
-
-SET(
-	BUNDLE_SYMBOLICNAME 
-#{{ 
-#cog.outl("\t\"%s\"" % bundle['symbolicName']) 
-#}}
-"org.example.mybundle" #do not edit, generated code
-#{{end}}
-)
-
-SET(BUNDLE_VERSION "0.0.1")
-
 include_directories(
         ${CELIX_INCLUDE_DIR}/dependency_manager
         "private/include"
@@ -49,8 +28,11 @@ include_directories(
 
 )
 
-bundle(
+add_bundle(
 #{{ 
+#cog.outl("\tNAME \"%s\"" % bundle['name'])
+#cog.outl("\tSYMBOLIC_NAME \"%s\"" % bundle['symbolicName']) 
+#cog.outl("\tVERSION \"0.0.1\"")
 #cog.outl("\t%s SOURCES" % bundle['name']) 
 #cog.outl("\t\tprivate/src/bundle_activator")
 #for comp in bundle['components'] :
@@ -74,3 +56,23 @@ target_link_libraries(${BUNDLE_LIB} ${CELIX_FRAMEWORK_LIBRARY} -Wl,-all_load dep
 else()
 target_link_libraries(${BUNDLE_LIB} -Wl,--whole-archive dependency_manager -Wl,--no-whole-archive ${CELIX_FRAMEWORK_LIBRARY} ${CELIX_UTILS_LIBRARY})
 ENDIF()
+
+#{{
+#cog.outl("add_deploy(%s_deploy" % bundle['name'])
+#cog.outl("\tCOPY")
+#cog.outl("\tNAME \"%s\"" % bundle['name'])
+#cog.outl("\tBUNDLES")
+#cog.outl("\t\t${CELIX_BUNDLES_DIR}/shell.zip")
+#cog.outl("\t\t${CELIX_BUNDLES_DIR}/dm_shell.zip")
+#cog.outl("\t\t${CELIX_BUNDLES_DIR}/shell_tui.zip")
+#cog.outl("\t\t${CELIX_BUNDLES_DIR}/log_service.zip")
+#cog.outl("\t\t%s" % bundle['name'])
+#cog.outl(")")
+#}}
+add_deploy(mybundle_deploy
+    COPY
+    NAME "mybundle"
+    BUNDLES 
+        mybundle
+)
+#{{end}}

http://git-wip-us.apache.org/repos/asf/celix/blob/1eb9eb01/celix-bootstrap/celix/bootstrap/templates/bundle/deploy.cmake
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/bootstrap/templates/bundle/deploy.cmake b/celix-bootstrap/celix/bootstrap/templates/bundle/deploy.cmake
deleted file mode 100644
index 2f80596..0000000
--- a/celix-bootstrap/celix/bootstrap/templates/bundle/deploy.cmake
+++ /dev/null
@@ -1,14 +0,0 @@
-#{{
-#import yaml
-#bundle = None 
-#with open(bundleFile) as input :
-#       bundle = yaml.load(input)
-#cog.outl("deploy( \"%s\" BUNDLES" % bundle['name'])
-#cog.outl("\t${CELIX_BUNDLES_DIR}/shell.zip")
-#cog.outl("\t${CELIX_BUNDLES_DIR}/dm_shell.zip")
-#cog.outl("\t${CELIX_BUNDLES_DIR}/shell_tui.zip")
-#cog.outl("\t${CELIX_BUNDLES_DIR}/log_service.zip")
-#cog.outl("\t%s" % bundle['name'])
-#cog.outl(")")
-#}}
-#{{end}}

http://git-wip-us.apache.org/repos/asf/celix/blob/1eb9eb01/cmake/cmake_celix/PackagingLegacy.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/PackagingLegacy.cmake b/cmake/cmake_celix/PackagingLegacy.cmake
index 58667cd..0802552 100644
--- a/cmake/cmake_celix/PackagingLegacy.cmake
+++ b/cmake/cmake_celix/PackagingLegacy.cmake
@@ -27,7 +27,7 @@ macro(SET_HEADERS HEADERS)
     endif()
 endmacro()
 
-function(bundles)
+function(bundle)
     list(GET ARGN 0 BUNDLE)
     list(REMOVE_AT ARGN 0)
 
@@ -45,27 +45,36 @@ function(bundles)
 
     if(BUNDLE_FILES)
         bundle_files(${BUNDLE} ${BUNDLE_FILES} DESTINATION .)
+    endif()
+
     if(BUNDLE_EXPORT_VERSION) 
         message(WARNING "EXPORT_VERSION argument not supported")
     endif()
+
     if(BUNDLE_LINK_LIBRARIES) 
         target_link_libraries(${BUNDLE} ${BUNDLE_LINK_LIBRARIES})
     endif()
+
     if(BUNDLE_PRIVATE_LIBRARIES) 
         bundle_private_libs(${BUNDLE} ${BUNDLE_PRIVATE_LIBS})
     endif()
+
     if(BUNDLE_EXPORT_LIBRARIES)
         bundle_export_libs(${BUNDLE} ${BUNDLE_PRIVATE_LIBS})
     endif()
+
     if(BUNDLE_IMPORT_LIBRARIES)
         message(FATAL_ERROR "TODO IMPORT LIBRARIES")
     endif()
+
     if(BUNDLE_DIRECTORIES)
         message(WARNING "DIRECTORIES argument not supported")
     endif()
+
     if(BUNDLE_INSTALL_FILES)
         message(WARNING "INSTALL_FILES argument not supported")
     endif()
+
     if(BUNDLE_INSTALL)
         bundle_install(${BUNDLE})
     endif()
@@ -73,17 +82,20 @@ function(bundles)
     if(BUNDLE_NAME)
         bundle_name(${BUNDLE} ${BUNDLE_NAME})
     endif()
+
     if(BUNDLE_SYMBOLICNAME)
         bundle_symbolic_name(${BUNDLE} ${BUNDLE_SYMBOLICNAME})
     endif()
+
     if(BUNDLE_VERSION)
         bundle_version(${BUNDLE} ${BUNDLE_VERSION})
     endif()
+
     if (BUNDLE_HEADERS)
         bundle_headers(${BUNDLE} ${BUNDLE_HEADERS})
     endif()
 
-    message(STATUS "bundle function is deprecated. update to add_bundle")
+    message(STATUS "bundle function is deprecated. update target '${BUNDLE}' to add_bundle")
 endfunction()
 
 
@@ -104,5 +116,5 @@ function(deploy)
     if(DEPLOY_ENDPOINTS)
         deploy_bundles_dir(${DEPLOY} DIR_NAME "endpoints" BUNDLES ${DEPLOY_ENDPOINTS})
     endif()
-    message(STATUS "deploy function is deprecated. update to add_deploy")
+    message(STATUS "deploy function is deprecated. update target '${DEPLOY}' to add_deploy")
 endfunction()

http://git-wip-us.apache.org/repos/asf/celix/blob/1eb9eb01/config_admin/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/config_admin/CMakeLists.txt b/config_admin/CMakeLists.txt
index de06600..8087662 100644
--- a/config_admin/CMakeLists.txt
+++ b/config_admin/CMakeLists.txt
@@ -45,7 +45,14 @@ if (CONFIG_ADMIN)
    endif(ENABLE_TESTING)
 	
 
-	add_deploy("config_admin1" BUNDLES config_admin shell shell_tui log_service log_writer example_test)
-	add_deploy("config_admin2" BUNDLES config_admin shell shell_tui log_service log_writer bundle_managed_service bundle_configuring)
+   add_deploy(config_admin_deploy 
+       NAME "config_admin"
+       BUNDLES 
+        config_admin 
+        shell shell_tui 
+        log_service 
+        log_writer 
+        config_admin_example
+   )
 
 endif (CONFIG_ADMIN)

http://git-wip-us.apache.org/repos/asf/celix/blob/1eb9eb01/config_admin/example/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/config_admin/example/CMakeLists.txt b/config_admin/example/CMakeLists.txt
index b19c73b..2d92d0a 100644
--- a/config_admin/example/CMakeLists.txt
+++ b/config_admin/example/CMakeLists.txt
@@ -2,12 +2,12 @@
 
 SET(
 	BUNDLE_NAME 
-"config_admin_example"
+    "config_admin_example"
 )
 
 SET(
 	BUNDLE_SYMBOLICNAME 
-"org.apache.celix.config_admin.example"
+    "org.apache.celix.config_admin.example"
 )
 
 SET(BUNDLE_VERSION "0.0.1")


[08/42] celix git commit: CELIX-335: Fix for small ref typos in documentation

Posted by pn...@apache.org.
CELIX-335: Fix for small ref typos in documentation


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/fa1f5c8c
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/fa1f5c8c
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/fa1f5c8c

Branch: refs/heads/develop
Commit: fa1f5c8c2c3fd6e74e98dbc4abb44823bf9be77c
Parents: 0dce0f2
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Thu Jan 7 20:41:32 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Thu Jan 7 20:41:32 2016 +0100

----------------------------------------------------------------------
 documents/building/building_and_install.md   | 104 -----------
 documents/building/readme.md                 | 104 +++++++++++
 documents/getting_started/getting_started.md | 214 ---------------------
 documents/getting_started/readme.md          | 216 ++++++++++++++++++++++
 4 files changed, 320 insertions(+), 318 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/fa1f5c8c/documents/building/building_and_install.md
----------------------------------------------------------------------
diff --git a/documents/building/building_and_install.md b/documents/building/building_and_install.md
deleted file mode 100644
index 1e05176..0000000
--- a/documents/building/building_and_install.md
+++ /dev/null
@@ -1,104 +0,0 @@
-#Apache Celix - Building and Installing
-
-#Preparing 
-The following packages (libraries + headers) should be installed on your system:
-
-*	Development Environment
-	*	build-essentials 
-	* 	git
-    *   java (for packaging bundles)
-	*	cmake (3 or higher)
-* 	Apache Celix Dependencies
-	*	curl
-	*	jansson
-
-For a debian based systems, the following should work:
-
-<pre>
-sudo apt-get install -yq --no-install-recommends \
-	build-essential \
-    ninja \ 
-  	curl \
-  	git \
-  	libjansson-dev \
-  	libcurl4-openssl-dev \
-    java \
-  	cmake 
-</pre>
-
-For Fedora based systems (dnf), the following should work:
-<pre>
-sudo dnf install \
-    cmake \
-    ninja-build \
-    make \
-    git \
-    java \
-    libcurl-devel \
-    jansson-devel
-</pre>
-
-##Download the Apache Celix sources
-To get started you first have to download the Apache Celix sources. This can be done by cloning the Apache Celix git repository:
-
-```bash
-#Create a new workspace to work in, e.g:
-mkdir ${HOME}/workspace
-export WS=${HOME}/workspace
-cd ${WS}
-
-#clone the repro
-git clone --single-branch --branch develop https://github.com/apache/celix.git
-```
-
-##Building Apache Celix
-Apache Celix uses [CMake](https://cmake.org) as build system. CMake can generate (among others) makefiles or ninja build files. 
-using ninja build files will result in a faster build.
-
-###Building using CMake and makefiles:
-```bash
-cd ${WS}/celix
-mkdir build
-cd build
-cmake .. 
-make 
-```
-
-###Building using CMake and Ninja
-```bash
-cd ${WS}/celix
-mkdir build
-cd build
-cmake -G Ninja ..
-ninja
-```
-
-##Editing Build options
-With use of CMake Apache Celix makes it possible to edit build options. This enabled users to configure a install location and selecting additional bundles.
-To edit the options use ccmake or cmake-gui. For cmake-gui an additional package install can be neccesary (Fedora: `dnf install cmake-gui`). 
-
-```bash
-cd ${WS}/celix/build
-ccmake .
-#Edit options, e.g. enable BUILD_REMOTE_SHELL to build the remote (telnet) shell
-#Edit the CMAKE_INSTALL_PREFIX config to set the install location
-```
-
-For this guide we assume the CMAKE_INSTALL_PREFIX is `/usr/local`.
-
-##Installing Apache Celix
-
-```bash
-cd ${WS}/celix/build
-make
-sudo make install
-```
-
-##Running Apache Celix
-
-If Apache Celix is succesfully installed running
-    celix
-should give the following output:
-"Error: invalid or non-existing configuration file: 'config.properties'.No such file or directory"
-
-For more info how to build your own projects and/or running the Apache Celix examples see [Getting Started](getting_started/getting_started.md)

http://git-wip-us.apache.org/repos/asf/celix/blob/fa1f5c8c/documents/building/readme.md
----------------------------------------------------------------------
diff --git a/documents/building/readme.md b/documents/building/readme.md
new file mode 100644
index 0000000..8df49c0
--- /dev/null
+++ b/documents/building/readme.md
@@ -0,0 +1,104 @@
+#Apache Celix - Building and Installing
+
+#Preparing 
+The following packages (libraries + headers) should be installed on your system:
+
+*	Development Environment
+	*	build-essentials 
+	* 	git
+    *   java (for packaging bundles)
+	*	cmake (3 or higher)
+* 	Apache Celix Dependencies
+	*	curl
+	*	jansson
+
+For a debian based systems, the following should work:
+
+<pre>
+sudo apt-get install -yq --no-install-recommends \
+	build-essential \
+    ninja \ 
+  	curl \
+  	git \
+  	libjansson-dev \
+  	libcurl4-openssl-dev \
+    java \
+  	cmake 
+</pre>
+
+For Fedora based systems (dnf), the following should work:
+<pre>
+sudo dnf install \
+    cmake \
+    ninja-build \
+    make \
+    git \
+    java \
+    libcurl-devel \
+    jansson-devel
+</pre>
+
+##Download the Apache Celix sources
+To get started you first have to download the Apache Celix sources. This can be done by cloning the Apache Celix git repository:
+
+```bash
+#Create a new workspace to work in, e.g:
+mkdir ${HOME}/workspace
+export WS=${HOME}/workspace
+cd ${WS}
+
+#clone the repro
+git clone --single-branch --branch develop https://github.com/apache/celix.git
+```
+
+##Building Apache Celix
+Apache Celix uses [CMake](https://cmake.org) as build system. CMake can generate (among others) makefiles or ninja build files. 
+using ninja build files will result in a faster build.
+
+###Building using CMake and makefiles:
+```bash
+cd ${WS}/celix
+mkdir build
+cd build
+cmake .. 
+make 
+```
+
+###Building using CMake and Ninja
+```bash
+cd ${WS}/celix
+mkdir build
+cd build
+cmake -G Ninja ..
+ninja
+```
+
+##Editing Build options
+With use of CMake Apache Celix makes it possible to edit build options. This enabled users to configure a install location and selecting additional bundles.
+To edit the options use ccmake or cmake-gui. For cmake-gui an additional package install can be neccesary (Fedora: `dnf install cmake-gui`). 
+
+```bash
+cd ${WS}/celix/build
+ccmake .
+#Edit options, e.g. enable BUILD_REMOTE_SHELL to build the remote (telnet) shell
+#Edit the CMAKE_INSTALL_PREFIX config to set the install location
+```
+
+For this guide we assume the CMAKE_INSTALL_PREFIX is `/usr/local`.
+
+##Installing Apache Celix
+
+```bash
+cd ${WS}/celix/build
+make
+sudo make install
+```
+
+##Running Apache Celix
+
+If Apache Celix is succesfully installed running
+    celix
+should give the following output:
+"Error: invalid or non-existing configuration file: 'config.properties'.No such file or directory"
+
+For more info how to build your own projects and/or running the Apache Celix examples see [Getting Started](../getting_started/readme.md)

http://git-wip-us.apache.org/repos/asf/celix/blob/fa1f5c8c/documents/getting_started/getting_started.md
----------------------------------------------------------------------
diff --git a/documents/getting_started/getting_started.md b/documents/getting_started/getting_started.md
deleted file mode 100644
index b99cae9..0000000
--- a/documents/getting_started/getting_started.md
+++ /dev/null
@@ -1,214 +0,0 @@
-#Apache Celix - Getting Started
-
-##Intro
-This page is intended for first time users of Apache Celix. It should guide you through building & installing Apache Celix, setting up a new project, creating your first bundle, setting up the project for use with Eclipse project and finally running and debugging your bundle directly from eclipse workspace. 
-
-If there are any uncertainties or question, don't hesitate to ask your questions in the [Apache Celix mailing](https://celix.apache.org/support/mailinglist.html).
-
-##Prerequisite
-Some experience with a command line interface (xterm) is expected to be able to follow this guide. 
-
-##Building and Installing
-For Apache Celix see [Building And Installing](../building/building_and_installing.md)
-
-##Installing Eclipse CDT
-Download the latest eclipse CDT at [http://www.eclipse.org](http://www.eclipse.org) and install it on your system. For more information on how the install eclipse on your system consult the eclipse documentation. For this getting started guide the luna version of eclipse was used ([linux](http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/R/eclipse-cpp-luna-R-linux-gtk-x86_64.tar.gz) [mac](http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/R/eclipse-cpp-luna-R-macosx-cocoa-x86_64.tar.gz)).
-
-##Apache Celix Bundle project
-Now that Apache Celix and Eclipse is installed, we are ready to create a new Apache Celix Bundle project. In this project cmake will be create a singe hello world bundle with a deployment configuration for testing the bundle.
-
-To setup of the project, first create a new project dir to work in:
-
-```bash
-#Create a new workspace to work in, e.g:
-mkdir ${HOME}/workspace
-export WS=${HOME}/workspace
-
-mkdir ${WS}/myproject
-cd ${WS}/myproject
-```
-Then create a CMakeLists.txt file - the makefile variant of CMake -in project root directory:
-
-```cmake	
-#${WS}/myproject/CMakeLists.txt
-	
-#PART 1
-cmake_minimum_required(VERSION 3)
-project(myproject C)
-
-#PART 2
-    #Note. If celix is not installed in /usr/local dir, change the location accordingly.
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/usr/local/share/celix/cmake/modules")
-find_package(CELIX REQUIRED)
-include_directories(${CELIX_INCLUDE_DIRS})
-
-#PART 3
-add_subdirectory(bundles/hello_world)
-```
-		
-This CMakeLists.txt file, sets up the following:
-
-* Part 1 
-	* The minimum cmake version required. 
-	* The project name
-	* The type of source files to expect, in this case C.
-* Part 2
- 	* The CMake module path to be used (e.g. where CMake find_package module can be found)
-	* That Celix package should be searched, configured and that the Celix package is required. 
-	* That for all build targets in this CMakeLists.txt file or any sub directory CMakeLists.txt files the Apache Celix headers directory should be included.
-* Part 3
-	* The CMakelists.txt file in the subdirectory bundles/hello_world should also be processed.
-	
-
-It is a good pratice to create a seperate CMakeLists.txt file for every bundle you want to build. For the hello_world bundle a CMakeLists.txt file should be created in the bundles/hello_world sub directory.
-
-Create the sub directory:
-
-```cmake
-#Create directory structure for the hello_world bundles
-cd ${WS}/myproject
-mkdir -p bundles/hello_world/private/src
-```
-
-
-And add the following CMakeList.txt file:
-
-```cmake	
-#${WS}/myproject/bundles/hello_world/CMakeLists.txt
-
-add_bundle(hello_world
-    VERSION 1.0.0
-	SOURCES(private/src/activator)
-)	
-```
-	
-This CMakeLists.txt file declares that a bundle should be build based on the build result (shared library) of the declared sources (in this caese the private/src/activator.c source). The add_bundle function is an Apache Celix specific CMake extension. 
-
-The last part for the hello_world bundle is the bundle activator source. The bundle activator is the entry point for an Apache Celix Bundle. Think of the bundle activator as the main function for a bundle, whith the difference that is does not only control the start of a bundle, but also the stopping of a bundle. 
-
-Creating/starting and stopping/destroying is seperated in bundle activator. This is done to make a clear seperation between the instantion/creation of a structure (e.g. object) and exposure of that instantation to other parts of the program. The same, but then reserve hold for seperating stopping and destroying a bundle. 
-
-```C
-//${WS}/myproject/bundles/hello_world/private/src/activator.c
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "bundle_activator.h"
-#include "bundle_context.h"
-
-
-struct userData {
-	    char * word;
-};
-
-celix_status_t bundleActivator_create(bundle_context_pt context, void **userData) {
-	celix_status_t status = CELIX_SUCCESS;
-    *userData = malloc(sizeof(struct userData));
-	if (userData != NULL) {
-            ((struct userData *)(*userData))->word = "World";
-    } else {
-            status = CELIX_START_ERROR;
-    }
-    return CELIX_SUCCESS;
-}
-
-celix_status_t bundleActivator_start(void * userData, bundle_context_pt context) {
-    struct userData * data = (struct userData *) userData;
-    printf("Hello %s\n", data->word);
-    return CELIX_SUCCESS;
-}
-
-celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) {
-    struct userData * data = (struct userData *) userData;
-    printf("Goodbye %s\n", data->word);
-    return CELIX_SUCCESS;
-}       
-    
-celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt context) {
-	free(userData);
-    return CELIX_SUCCESS;
-}
-```
-	
-###Building 
-One of the highly recommended features of CMake is the ability to do out of source builds, the benefit is that all of the build results will go in a seperate directory without cluttering the (source) project. To create the build directory and build the project execute the following commands:
-
-```bash
-cd ${WS}
-mkdir myproject/build
-cd myproject/build
-cmake ..
-make all  
-#Or
-#cmake -G Ninja ..
-#ninja
-```	
-
-Hopefully you will some some build results scrolling over the screen and actual build results in the build directory. There should be a hello_world.zip in the bundles/hello_world directory, this the actual bundle. But a bundle on its own has no real value, so lets setup a deployment and run the Apache Celix framwork with this bundle.
-
-
-###Running 
-
-To create a deployment for the hello_world bundle two things are needed: 
-	
-1. Add a `add_deploy` statement in the `bundles/hello_world/CMakeLists.txt` file declaring what to deploy and under which name.
-
-```cmake
-${WS}/myproject/bundles/hello_world/CMakeLists.txt
-deploy("myproject-deploy" BUNDLES 
-	${CELIX_BUNDLES_DIR}/shell.zip 
-	${CELIX_BUNDLES_DIR}/shell_tui.zip
-	hello_world
-)		
-```
- 		   
-Rerun make again form the  build project. the make files genereated by CMake will ensure cmake is runned again to update the actual make files.
-
-```bash 		
-cd ${WS}/myproject-build
-make 
-#or
-#ninja
-```	
-
-Now a deploy directory myproject should be availabe in the deploy directory. This directory contains - among other files - the run.sh script. This can be used to run the Apache Celix framework with the declared bundles from the deploy.cmake.
-
-	cd ${WS}/myproject-build/deploy/myproject-deploy
-	sh run.sh
-
-The hello_world bundle should be started with the famous "Hello World" text printed. The shell and shell_tui bundle are also deployed and these can be used to query and control the running framework. Below some commands are shown for printed the installed bundles, printing all known shell command, printing help of a specific command and stopping a specific bundle (note that bundle 0 is the framework):
-
-```
-lb 
-help
-help inspect
-stop 0
-```
-	
-##Apache Celix Bundle Project in Eclipse
-
-A nice feature of CMake is the ability to generate Eclipse project files, with this feature bundles can also be developed with use of Eclipse. This should help speed up the development process. 
-To get started change directory to the build directory and generate a eclipse project file.
-
-	cd ${WS}/myproject/build 
-	cmake -G "Eclipse CDT4 - Unix Makefiles" .
-	
-Startup the Eclipse EDI and a chose the `${WS}`
-
-![select workspace](/documentation/getting_started_img1.png)
-
-Import the project with existing project. 
-
-![import project](/documentation/getting_started_img2.png)
-
-To build the project, use Project->Build All. To run or debug from Eclipse navigate to the myproject deploy directory and right click on the 'myproject.launch' file. And select Run As or Debug As to run or debug the bundle.
-
-![run project](/documentation/getting_started_img3.png) 
- 
-
- 
- 
-
-
-	
-	

http://git-wip-us.apache.org/repos/asf/celix/blob/fa1f5c8c/documents/getting_started/readme.md
----------------------------------------------------------------------
diff --git a/documents/getting_started/readme.md b/documents/getting_started/readme.md
new file mode 100644
index 0000000..5257233
--- /dev/null
+++ b/documents/getting_started/readme.md
@@ -0,0 +1,216 @@
+#Apache Celix - Getting Started
+
+##Intro
+This page is intended for first time users of Apache Celix. It should guide you through building & installing Apache Celix, setting up a new project, creating your first bundle, setting up the project for use with Eclipse project and finally running and debugging your bundle directly from eclipse workspace. 
+
+If there are any uncertainties or question, don't hesitate to ask your questions in the [Apache Celix mailing](https://celix.apache.org/support/mailinglist.html).
+
+##Prerequisite
+Some experience with a command line interface (xterm) is expected to be able to follow this guide. 
+
+##Building and Installing
+For Apache Celix see [Building And Installing](../building/readme.md)
+
+##Installing Eclipse CDT
+Download the latest eclipse CDT at [http://www.eclipse.org](http://www.eclipse.org) and install it on your system. For more information on how the install eclipse on your system consult the eclipse documentation. For this getting started guide the luna version of eclipse was used ([linux](http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/R/eclipse-cpp-luna-R-linux-gtk-x86_64.tar.gz) [mac](http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/R/eclipse-cpp-luna-R-macosx-cocoa-x86_64.tar.gz)).
+
+##Apache Celix Bundle project
+Now that Apache Celix and Eclipse is installed, we are ready to create a new Apache Celix Bundle project. In this project cmake will be create a singe hello world bundle with a deployment configuration for testing the bundle.
+
+To setup of the project, first create a new project dir to work in:
+
+```bash
+#Create a new workspace to work in, e.g:
+mkdir ${HOME}/workspace
+export WS=${HOME}/workspace
+
+mkdir ${WS}/myproject
+cd ${WS}/myproject
+```
+Then create a CMakeLists.txt file - the makefile variant of CMake -in project root directory:
+
+```cmake	
+#${WS}/myproject/CMakeLists.txt
+	
+#PART 1
+cmake_minimum_required(VERSION 3)
+project(myproject C)
+
+#PART 2
+    #Note. If celix is not installed in /usr/local dir, change the location accordingly.
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/usr/local/share/celix/cmake/modules")
+find_package(CELIX REQUIRED)
+include_directories(${CELIX_INCLUDE_DIRS})
+
+#PART 3
+add_subdirectory(bundles/hello_world)
+```
+		
+This CMakeLists.txt file, sets up the following:
+
+* Part 1 
+	* The minimum cmake version required. 
+	* The project name
+	* The type of source files to expect, in this case C.
+* Part 2
+ 	* The CMake module path to be used (e.g. where CMake find_package module can be found)
+	* That Celix package should be searched, configured and that the Celix package is required. 
+	* That for all build targets in this CMakeLists.txt file or any sub directory CMakeLists.txt files the Apache Celix headers directory should be included.
+* Part 3
+	* The CMakelists.txt file in the subdirectory bundles/hello_world should also be processed.
+	
+
+It is a good pratice to create a seperate CMakeLists.txt file for every bundle you want to build. For the hello_world bundle a CMakeLists.txt file should be created in the bundles/hello_world sub directory.
+
+Create the sub directory:
+
+```CMake
+#Create directory structure for the hello_world bundles
+cd ${WS}/myproject
+mkdir -p bundles/hello_world/private/src
+```
+
+
+And add the following CMakeList.txt file:
+
+```CMake	
+#${WS}/myproject/bundles/hello_world/CMakeLists.txt
+
+add_bundle(hello_world
+    VERSION 1.0.0
+	SOURCES(private/src/activator)
+)	
+```
+	
+This CMakeLists.txt file declares that a bundle should be build based on the build result (shared library) of the declared sources (in this caese the private/src/activator.c source). The add_bundle function is an Apache Celix specific CMake extension. 
+
+The last part for the hello_world bundle is the bundle activator source. The bundle activator is the entry point for an Apache Celix Bundle. Think of the bundle activator as the main function for a bundle, whith the difference that is does not only control the start of a bundle, but also the stopping of a bundle. 
+
+Creating/starting and stopping/destroying is seperated in bundle activator. This is done to make a clear seperation between the instantion/creation of a structure (e.g. object) and exposure of that instantation to other parts of the program. The same, but then reserve hold for seperating stopping and destroying a bundle. 
+
+```C
+//${WS}/myproject/bundles/hello_world/private/src/activator.c
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "bundle_activator.h"
+#include "bundle_context.h"
+
+
+struct userData {
+	    char * word;
+};
+
+celix_status_t bundleActivator_create(bundle_context_pt context, void **userData) {
+	celix_status_t status = CELIX_SUCCESS;
+    *userData = malloc(sizeof(struct userData));
+	if (userData != NULL) {
+            ((struct userData *)(*userData))->word = "World";
+    } else {
+            status = CELIX_START_ERROR;
+    }
+    return CELIX_SUCCESS;
+}
+
+celix_status_t bundleActivator_start(void * userData, bundle_context_pt context) {
+    struct userData * data = (struct userData *) userData;
+    printf("Hello %s\n", data->word);
+    return CELIX_SUCCESS;
+}
+
+celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) {
+    struct userData * data = (struct userData *) userData;
+    printf("Goodbye %s\n", data->word);
+    return CELIX_SUCCESS;
+}       
+    
+celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt context) {
+	free(userData);
+    return CELIX_SUCCESS;
+}
+```
+	
+###Building 
+One of the highly recommended features of CMake is the ability to do out of source builds, the benefit is that all of the build results will go in a seperate directory without cluttering the (source) project. To create the build directory and build the project execute the following commands:
+
+```bash
+cd ${WS}
+mkdir myproject/build
+cd myproject/build
+cmake ..
+make all  
+#Or
+#cmake -G Ninja ..
+#ninja
+```	
+
+Hopefully you will some some build results scrolling over the screen and actual build results in the build directory. There should be a hello_world.zip in the bundles/hello_world directory, this the actual bundle. But a bundle on its own has no real value, so lets setup a deployment and run the Apache Celix framwork with this bundle.
+
+
+###Running 
+
+To create a deployment for the hello_world bundle two things are needed: 
+	
+1. Add a `add_deploy` statement in the `bundles/hello_world/CMakeLists.txt` file declaring what to deploy and under which name.
+
+```CMake
+${WS}/myproject/bundles/hello_world/CMakeLists.txt
+add_deploy("myproject-deploy" BUNDLES 
+	${CELIX_BUNDLES_DIR}/shell.zip 
+	${CELIX_BUNDLES_DIR}/shell_tui.zip
+	hello_world
+)		
+```
+ 		   
+Rerun make again form the  build project. the make files genereated by CMake will ensure cmake is runned again to update the actual make files.
+
+```bash 		
+cd ${WS}/myproject-build
+make 
+#or
+#ninja
+```	
+
+Now a deploy directory myproject should be availabe in the deploy directory. This directory contains - among other files - the run.sh script. This can be used to run the Apache Celix framework with the declared bundles from the deploy.cmake.
+
+```bash
+cd ${WS}/myproject-build/deploy/myproject-deploy
+sh run.sh
+```
+
+The hello_world bundle should be started with the famous "Hello World" text printed. The shell and shell_tui bundle are also deployed and these can be used to query and control the running framework. Below some commands are shown for printed the installed bundles, printing all known shell command, printing help of a specific command and stopping a specific bundle (note that bundle 0 is the framework):
+
+```
+lb 
+help
+help inspect
+stop 0
+```
+	
+##Apache Celix Bundle Project in Eclipse
+
+A nice feature of CMake is the ability to generate Eclipse project files, with this feature bundles can also be developed with use of Eclipse. This should help speed up the development process. 
+To get started change directory to the build directory and generate a eclipse project file.
+
+	cd ${WS}/myproject/build 
+	cmake -G "Eclipse CDT4 - Unix Makefiles" .
+	
+Startup the Eclipse EDI and a chose the `${WS}`
+
+![select workspace](getting_started_img1.png)
+
+Import the project with existing project. 
+
+![import project](getting_started_img2.png)
+
+To build the project, use Project->Build All. To run or debug from Eclipse navigate to the myproject deploy directory and right click on the 'myproject.launch' file. And select Run As or Debug As to run or debug the bundle.
+
+![run project](getting_started_img3.png) 
+ 
+
+ 
+ 
+
+
+	
+	


[03/42] celix git commit: CELIX-335: Refactor cmake packaging

Posted by pn...@apache.org.
CELIX-335: Refactor cmake packaging

- bundle has become add_bundle
- deploy has become add_deploy
- signatures are different.
- LegacyPackaing added to still support bundle/deploy statements
- Packaging now heavily relies on target properties makeing the setup more flexible to
  change bundle/deploy settings after the initial add_bundle/add_deploy
- deploy statement can be in CMakeLists.txt files and can refer to future targets


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/49ab9ab5
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/49ab9ab5
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/49ab9ab5

Branch: refs/heads/develop
Commit: 49ab9ab5315a1cd770e148f58e78e19e97db95ee
Parents: 265bcb4
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Wed Dec 30 21:40:57 2015 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Thu Jan 7 16:46:09 2016 +0100

----------------------------------------------------------------------
 CMakeLists.txt                                  |    3 +-
 cmake/CMakeCelix.cmake                          |    1 +
 cmake/UseDoxygen.cmake                          |    4 +-
 cmake/cmake_celix/CPackConfig-Installation.in   |   29 -
 cmake/cmake_celix/CPackConfig.in                |   25 -
 cmake/cmake_celix/CPackConfigPKG.in             |   25 -
 cmake/cmake_celix/Dependencies.cmake            |   37 +-
 cmake/cmake_celix/Manifest.template.in          |   10 +
 cmake/cmake_celix/NOTE                          |    4 +-
 cmake/cmake_celix/Packaging.cmake               | 1027 ++++++++++--------
 cmake/cmake_celix/PackagingLegacy.cmake         |  108 ++
 cmake/cmake_celix/config.properties.in          |    2 -
 cmake/cmake_celix/installation.cmake            |   30 -
 cmake/cmake_celix/manifest.in                   |    2 -
 cmake/cmake_celix/run.sh.in                     |    2 -
 config_admin/CMakeLists.txt                     |    3 +
 config_admin/deploy.cmake                       |   24 -
 .../examples/example_test/CMakeLists.txt        |    7 +-
 .../bundle_configuring/CMakeLists.txt           |    6 +-
 .../bundle_managed_service/CMakeLists.txt       |    6 +-
 config_admin/service/CMakeLists.txt             |    7 +-
 dependency_manager/CMakeLists.txt               |   31 +-
 deployment_admin/CMakeLists.txt                 |   60 +-
 deployment_admin/deploy.cmake                   |   24 -
 device_access/CMakeLists.txt                    |    2 +-
 device_access/deploy.cmake                      |   21 -
 device_access/device_access/CMakeLists.txt      |   32 +-
 device_access/driver_locator/CMakeLists.txt     |   14 +-
 device_access/example/CMakeLists.txt            |   11 +-
 .../example/base_driver/CMakeLists.txt          |   14 +-
 .../example/consuming_driver/CMakeLists.txt     |   14 +-
 .../example/refining_driver/CMakeLists.txt      |   14 +-
 dfi/CMakeLists.txt                              |   10 +-
 event_admin/CMakeLists.txt                      |    6 +-
 event_admin/deploy.cmake                        |   23 -
 event_admin/event_admin/CMakeLists.txt          |   10 +-
 event_admin/event_handler/CMakeLists.txt        |    9 +-
 event_admin/event_publisher/CMakeLists.txt      |   10 +-
 examples/CMakeLists.txt                         |   14 +
 examples/deploy.cmake                           |   34 -
 examples/dm_example/CMakeLists.txt              |   15 +
 examples/dm_example/deploy.cmake                |   32 -
 examples/dm_example/phase1/CMakeLists.txt       |   13 +-
 examples/dm_example/phase2a/CMakeLists.txt      |   12 +-
 examples/dm_example/phase2b/CMakeLists.txt      |   12 +-
 examples/dm_example/phase3/CMakeLists.txt       |   12 +-
 examples/echo_service/client/CMakeLists.txt     |   16 +-
 examples/echo_service/server/CMakeLists.txt     |   16 +-
 examples/embedding/CMakeLists.txt               |    8 -
 examples/hello_world/CMakeLists.txt             |   41 +-
 examples/hello_world_test/CMakeLists.txt        |   80 +-
 .../hello_world_test/private/src/activator.c    |    3 -
 examples/hello_world_test/private/src/test.c    |   32 +
 examples/hello_world_test/public/include/test.h |   34 +
 examples/locking/CMakeLists.txt                 |    8 +
 examples/locking/benchmark/CMakeLists.txt       |    9 +-
 examples/locking/deploy.cmake                   |   26 -
 examples/locking/math_provider/CMakeLists.txt   |   11 +-
 .../modified_bool_benchmark/CMakeLists.txt      |    5 +-
 examples/locking/mutex_benchmark/CMakeLists.txt |   11 +-
 .../locking/reference_benchmark/CMakeLists.txt  |    5 +-
 .../locking/start_stop_benchmark/CMakeLists.txt |    5 +-
 examples/mongoose/CMakeLists.txt                |   17 +-
 .../client/CMakeLists.txt                       |    5 +-
 .../greeting/CMakeLists.txt                     |    5 +-
 .../chapter04-correct-listener/CMakeLists.txt   |    3 +-
 .../chapter04-correct-lookup/CMakeLists.txt     |    5 +-
 .../chapter04-paint-example/CMakeLists.txt      |    2 +
 .../circle/CMakeLists.txt                       |    2 +-
 .../chapter04-paint-example/deploy.cmake        |   22 -
 .../paint/CMakeLists.txt                        |    2 +-
 .../square/CMakeLists.txt                       |    2 +-
 .../triangle/CMakeLists.txt                     |    2 +-
 .../producer_consumer/consumer/CMakeLists.txt   |    8 +-
 .../producer_consumer/database/CMakeLists.txt   |    8 +-
 .../producer_consumer/producer/CMakeLists.txt   |    8 +-
 examples/whiteboard/publisherA/CMakeLists.txt   |    4 +-
 examples/whiteboard/publisherB/CMakeLists.txt   |    5 +-
 examples/whiteboard/tracker/CMakeLists.txt      |    5 +-
 .../whiteboard/tracker_depman/CMakeLists.txt    |    5 +-
 framework/CMakeLists.txt                        |   14 +-
 .../test_bundle1/CMakeLists.txt                 |    7 +-
 framework/private/src/framework.c               |   27 +-
 framework/private/src/manifest.c                |    3 +-
 framework/private/src/utils.c                   |   17 +
 framework/public/include/constants.h            |    2 -
 framework/public/include/utils.h                |    1 +
 log_service/CMakeLists.txt                      |   11 +-
 log_writer/log_writer_stdout/CMakeLists.txt     |   18 +-
 log_writer/log_writer_syslog/CMakeLists.txt     |   10 +-
 .../discovery_configured/CMakeLists.txt         |    9 +-
 remote_services/discovery_etcd/CMakeLists.txt   |   11 +-
 remote_services/discovery_shm/CMakeLists.txt    |   10 +-
 remote_services/examples/CMakeLists.txt         |   69 ++
 .../examples/calculator_endpoint/CMakeLists.txt |    7 +-
 .../calculator_endpoint2/CMakeLists.txt         |    7 +-
 .../examples/calculator_proxy/CMakeLists.txt    |    7 +-
 .../examples/calculator_proxy2/CMakeLists.txt   |    7 +-
 .../examples/calculator_service/CMakeLists.txt  |   12 +-
 .../examples/calculator_shell/CMakeLists.txt    |   15 +-
 remote_services/examples/deploy.cmake           |   59 -
 .../remote_service_admin/CMakeLists.txt         |    5 -
 .../remote_service_admin_dfi/rsa/CMakeLists.txt |   10 +-
 .../rsa_tst/CMakeLists.txt                      |   12 +-
 .../rsa_tst/bundle/CMakeLists.txt               |   16 +-
 .../remote_service_admin_http/CMakeLists.txt    |   10 +-
 .../private/test/CMakeLists.txt                 |   14 +-
 .../remote_service_admin_shm/CMakeLists.txt     |    9 +-
 .../private/test/CMakeLists.txt                 |   14 +-
 remote_services/topology_manager/CMakeLists.txt |   10 +-
 .../topology_manager/tms_tst/CMakeLists.txt     |   16 +-
 .../tms_tst/bundle/CMakeLists.txt               |   14 +-
 .../tms_tst/disc_mock/CMakeLists.txt            |    7 +-
 remote_shell/CMakeLists.txt                     |   28 +-
 remote_shell/deploy.cmake                       |   20 -
 scr/scr/CMakeLists.txt                          |    2 +-
 scr/test/CMakeLists.txt                         |    2 +-
 shell/CMakeLists.txt                            |   37 +-
 shell_bonjour/CMakeLists.txt                    |    7 +-
 shell_bonjour/deploy.cmake                      |   25 -
 shell_tui/CMakeLists.txt                        |    9 +-
 utils/CMakeLists.txt                            |    3 +-
 122 files changed, 1406 insertions(+), 1418 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9453411..bfe3288 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,7 +62,6 @@ endif()
 
 
 include(CMakeCelix)
-include(cmake_celix/installation)
 include(UseDoxygen)  
 
 # Default bundle version
@@ -92,4 +91,4 @@ add_subdirectory(framework)
 add_subdirectory(utils)
 add_subdirectory(dfi)
 
-deploy_targets()
+#deploy_targets()

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/cmake/CMakeCelix.cmake
----------------------------------------------------------------------
diff --git a/cmake/CMakeCelix.cmake b/cmake/CMakeCelix.cmake
index c6432db..2bff25b 100644
--- a/cmake/CMakeCelix.cmake
+++ b/cmake/CMakeCelix.cmake
@@ -27,6 +27,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
 
 include(cmake_celix/Dependencies)
 include(cmake_celix/Packaging)
+include(cmake_celix/PackagingLegacy)
 #include(cmake_celix/Test)
 include(cmake_celix/ApacheRat)
 include(cmake_celix/CodeCoverage)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/cmake/UseDoxygen.cmake
----------------------------------------------------------------------
diff --git a/cmake/UseDoxygen.cmake b/cmake/UseDoxygen.cmake
index 7537eeb..376dbe2 100644
--- a/cmake/UseDoxygen.cmake
+++ b/cmake/UseDoxygen.cmake
@@ -159,7 +159,9 @@ if(DOXYGEN_FOUND AND DOXYFILE_IN_FOUND)
 
 	configure_file("${DOXYFILE_IN}" "${DOXYFILE}" @ONLY)
 
-	get_target_property(DOC_TARGET doc TYPE)
+    if(TARGET doc)
+        get_target_property(DOC_TARGET doc TYPE)
+    endif()
 	if(NOT DOC_TARGET)
 		add_custom_target(doc)
 	endif()

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/cmake/cmake_celix/CPackConfig-Installation.in
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/CPackConfig-Installation.in b/cmake/cmake_celix/CPackConfig-Installation.in
deleted file mode 100644
index 0efde50..0000000
--- a/cmake/cmake_celix/CPackConfig-Installation.in
+++ /dev/null
@@ -1,29 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-SET(CPACK_CMAKE_GENERATOR "Unix Makefiles")
-SET(CPACK_GENERATOR "ZIP;STGZ")
-SET(CPACK_INSTALL_CMAKE_PROJECTS "@PROJECT_BINARY_DIR@;Apache Celix;framework;/")
-set(CPACK_PACKAGE_NAME "Apache Celix")
-SET(CPACK_PACKAGE_DESCRIPTION "Package containing a release for Apache Celix")
-SET(CPACK_PACKAGE_FILE_NAME "apache.celix-@CELIX_MAJOR@.@CELIX_MINOR@.@CELIX_MICRO@.@CELIX_QUALIFIER@")
-set(CPACK_PACKAGE_VENDOR "celix.apache.org")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Framework")
-set(CPACK_PACKAGE_VERSION_MAJOR "@CELIX_MAJOR@")
-set(CPACK_PACKAGE_VERSION_MINOR "@CELIX_MINOR@")
-set(CPACK_PACKAGE_VERSION_PATCH "@CELIX_MICRO@.@CELIX_QUALIFIER@")
-set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/LICENSE.txt")

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/cmake/cmake_celix/CPackConfig.in
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/CPackConfig.in b/cmake/cmake_celix/CPackConfig.in
deleted file mode 100644
index 1b8d49b..0000000
--- a/cmake/cmake_celix/CPackConfig.in
+++ /dev/null
@@ -1,25 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-SET(CPACK_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
-SET(CPACK_GENERATOR "@CPACK_GENERATOR@")
-SET(CPACK_INSTALL_CMAKE_PROJECTS "@BUNDLE_BIN_DIR@;@_BUNDLE_NAME@;@_BUNDLE_NAME_INSTALL@;/")
-SET(CPACK_PACKAGE_DESCRIPTION "@BUNDLE_DESCRIPTION@")
-SET(CPACK_PACKAGE_FILE_NAME "@_BUNDLE_NAME@")
-SET(CPACK_PACKAGE_NAME "@_BUNDLE_NAME@")
-SET(CPACK_PACKAGE_VERSION "@BUNDLE_VERSION@")
-SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY "0")

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/cmake/cmake_celix/CPackConfigPKG.in
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/CPackConfigPKG.in b/cmake/cmake_celix/CPackConfigPKG.in
deleted file mode 100644
index 6faa66a..0000000
--- a/cmake/cmake_celix/CPackConfigPKG.in
+++ /dev/null
@@ -1,25 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-SET(CPACK_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
-SET(CPACK_GENERATOR "@CPACK_GENERATOR@")
-SET(CPACK_INSTALL_CMAKE_PROJECTS "@BUNDLE_BIN_DIR@;@INT_BUNDLE_NAME@;@PACKAGE_COMPONENT@;/")
-SET(CPACK_PACKAGE_DESCRIPTION "@INT_BUNDLE_SYMBOLICNAME@ Package")
-SET(CPACK_PACKAGE_FILE_NAME "@PACKAGE_NAME@-dev")
-SET(CPACK_PACKAGE_NAME "@PACKAGE_NAME@")
-SET(CPACK_PACKAGE_VERSION "@BUNDLE_VERSION@")
-SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY "0")

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/cmake/cmake_celix/Dependencies.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Dependencies.cmake b/cmake/cmake_celix/Dependencies.cmake
index b5c31e7..c02db35 100644
--- a/cmake/cmake_celix/Dependencies.cmake
+++ b/cmake/cmake_celix/Dependencies.cmake
@@ -16,11 +16,22 @@
 # under the License.
 
 MACRO(celix_subproject)
-    PARSE_ARGUMENTS(OPTION "DEPS" "" ${ARGN})
-    LIST(GET OPTION_DEFAULT_ARGS 0 OPTION_NAME)
-    LIST(GET OPTION_DEFAULT_ARGS 1 OPTION_DESCRIPTION)
-    LIST(GET OPTION_DEFAULT_ARGS 2 OPTION_DEFAULT)
-    
+    set(ARGS "${ARGN}")
+
+    list(GET ARGS 0 OPTION_NAME)
+    list(REMOVE_AT ARGS 0)
+
+    list(GET ARGS 0 OPTION_DESCRIPTION)
+    list(REMOVE_AT ARGS 0)
+
+    list(GET ARGS 0 OPTION_DEFAULT)
+    list(REMOVE_AT ARGS 0)
+
+    set(OPTIONS )
+    set(ONE_VAL_ARGS )
+    set(MULTI_VAL_ARGS DEPS)
+    cmake_parse_arguments(OPTION "${OPTIONS}" "${ONE_VAL_ARGS}" "${MULTI_VAL_ARGS}" ${ARGS})
+
     string(TOUPPER ${OPTION_NAME} UC_OPTION_NAME)
     set(NAME "BUILD_${UC_OPTION_NAME}")
     
@@ -46,17 +57,13 @@ MACRO(celix_subproject)
 ENDMACRO(celix_subproject)
 
 MACRO(is_enabled name)
-	string(TOUPPER ${name} UC_NAME)
-    set(NAME "BUILD_${UC_NAME}")
+    string(TOUPPER "BUILD_${name}_INTERNAL" OPTION)
     
-    get_property(BUILD GLOBAL PROPERTY ${NAME}_INTERNAL)
-    if (NOT DEFINED BUILD)
-        set(BUILD "OFF")
-    endif (NOT DEFINED BUILD)
+    get_property(BUILD GLOBAL PROPERTY ${OPTION})
     
-    IF (${BUILD})
+    if(BUILD)
         set(${name} "ON")
-    ELSE (${BUILD})
+    else()
         set(${name} "OFF")
-    ENDIF (${BUILD})
-ENDMACRO(is_enabled)
\ No newline at end of file
+    endif()
+ENDMACRO(is_enabled)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/cmake/cmake_celix/Manifest.template.in
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Manifest.template.in b/cmake/cmake_celix/Manifest.template.in
new file mode 100644
index 0000000..c458754
--- /dev/null
+++ b/cmake/cmake_celix/Manifest.template.in
@@ -0,0 +1,10 @@
+Bundle-SymbolicName: $<TARGET_PROPERTY:@BUNDLE_TARGET_NAME@,BUNDLE_SYMBOLIC_NAME>
+Bundle-Name: $<TARGET_PROPERTY:@BUNDLE_TARGET_NAME@,BUNDLE_TARGET_NAME>
+Bundle-Version: $<TARGET_PROPERTY:@BUNDLE_TARGET_NAME@,BUNDLE_VERSION>
+Bundle-Description: $<TARGET_PROPERTY:@BUNDLE_TARGET_NAME@,BUNDLE_DESCRIPTION>
+Bundle-Activator: $<TARGET_PROPERTY:@BUNDLE_TARGET_NAME@,BUNDLE_ACTIVATOR>
+Private-Library: $<JOIN:$<TARGET_PROPERTY:@BUNDLE_TARGET_NAME@,BUNDLE_PRIVATE_LIBS>,, >
+Import-Library: $<JOIN:$<TARGET_PROPERTY:@BUNDLE_TARGET_NAME@,BUNDLE_IMPORT_LIBS>,, >
+Export-Library: $<JOIN:$<TARGET_PROPERTY:@BUNDLE_TARGET_NAME@,BUNDLE_EXPORT_LIBS>,, >
+$<JOIN:$<TARGET_PROPERTY:@BUNDLE_TARGET_NAME@,BUNDLE_HEADERS>,
+>

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/cmake/cmake_celix/NOTE
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/NOTE b/cmake/cmake_celix/NOTE
index 5eca783..de8b7be 100644
--- a/cmake/cmake_celix/NOTE
+++ b/cmake/cmake_celix/NOTE
@@ -18,9 +18,7 @@
 All files in this directory are licensed to the Apache Software Foundation (as included above).
 Normally source/txt files should include this header but for templates this sometimes is not possible.
 The following templates do not include the header:
-* config.properties.in
+* Manifest.template.in
 * run.sh.in
-* RunConfig.in
-* manifest.in
 
 This note is added to explicitly mention that the same licensing applies to these files as to any other having the header.  
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/cmake/cmake_celix/Packaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Packaging.cmake b/cmake/cmake_celix/Packaging.cmake
index f802a9c..aadc4b4 100644
--- a/cmake/cmake_celix/Packaging.cmake
+++ b/cmake/cmake_celix/Packaging.cmake
@@ -15,501 +15,582 @@
 # specific language governing permissions and limitations
 # under the License.
 
-GET_FILENAME_COMPONENT(__cmake_path ${CMAKE_COMMAND} PATH)
-FIND_PROGRAM(CPACK_COMMAND cpack ${__cmake_path})
-MESSAGE(STATUS "Found CPack at: ${CPACK_COMMAND}")
-IF(NOT CPACK_COMMAND)
-	MESSAGE(FATAL_ERROR "Need CPack!")
-ENDIF(NOT CPACK_COMMAND)
-
-include(CPackComponent)
-
-macro( CELIX_ADD_COMPONENT_GROUP _group )
-  set( _readVariable )
-  set( _parentGroup )
-  foreach( _i ${ARGN} )
-    if( _readVariable )
-      set( ${_readVariable} "${_i}" )
-      break()
-    else( _readVariable )
-      if( "${_i}" STREQUAL PARENT_GROUP )
-        set( _readVariable _parentGroup )
-      endif( "${_i}" STREQUAL PARENT_GROUP )
-    endif( _readVariable )
-  endforeach( _i ${ARGN} )
-
-  cpack_add_component_group( ${_group} ${ARGN} )
-  add_custom_target( install-${_group} )
-  if( _parentGroup )
-    add_dependencies( install-${_parentGroup} install-${_group} )
-  endif( _parentGroup )
-endmacro( CELIX_ADD_COMPONENT_GROUP _group )
-
-macro( CELIX_ADD_COMPONENT _component )
-  set( _readVariable )
-  set( _group )
-  foreach( _i ${ARGN} )
-    if( _readVariable )
-      set( ${_readVariable} "${_i}" )
-      break()
-    else( _readVariable )
-      if( "${_i}" STREQUAL GROUP )
-        set( _readVariable _group )
-      endif( "${_i}" STREQUAL GROUP )
-    endif( _readVariable )
-  endforeach( _i ${ARGN} )
-
-  cpack_add_component( ${_component} ${ARGN} )
-  add_custom_target( install-${_component}
-                     COMMAND ${CMAKE_COMMAND} -DCOMPONENT=${_component} -P
-"${CMAKE_BINARY_DIR}/cmake_install.cmake" )
-  add_dependencies( install-${_group} install-${_component} )
-endmacro( CELIX_ADD_COMPONENT _component _group )
-
-find_program(JAR_COMMAND jar)
-if(JAR_COMMAND)
-	message(STATUS "Using JAR to repack bundles, bundles can be used by Apache ACE")
-else(JAR_COMMAND)
-    message("No JAR support, generated bundles are not usable for Apache ACE")
-endif(JAR_COMMAND)
+find_program(JAR_COMMAND jar) #TODO enable
 
-SET(CPACK_GENERATOR "ZIP")
+if(JAR_COMMAND)
+    message(STATUS "Using jar to create bundles")
+else()
+    find_program(ZIP_COMMAND zip) #TODO enable
+    if(ZIP_COMMAND)
+        message(STATUS "Using zip to create bundles")
+    else()
+        get_filename_component(__cmake_path ${CMAKE_COMMAND} PATH)
+        find_program(CPACK_COMMAND cpack ${__cmake_path})
+        if(CPACK_COMMAND)
+            message(STATUS "Using cpack to create bundles.")
+            message(WARNING "Please note that using jar and/or zip is prefered. When packaging bundles with cpack you must use 'make install-all' to install the project instead of 'make install'")
+        else()
+            message(FATAL_ERROR "A jar,zip or cpack command is needed to jar,zip or pack bundles")
+        endif()
+    endif()
+endif()
 
-celix_add_component_group(all)
-celix_add_component_group(bundles PARENT_GROUP all)
 
+##### setup bundles/deploy target
 add_custom_target(bundles ALL)
+add_custom_target(deploy ALL)
+set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_BINARY_DIR}/deploy")
+#####
+
+macro(extract_version_parts VERSION MAJOR MINOR PATCH)
+    set(MAJOR "0")
+    set(MINOR "0")
+    set(PATCH "0")
+
+    string(REGEX MATCH "^([0-9]+).*" TMP "${VERSION}")
+    if (CMAKE_MATCH_1)
+        set(MAJOR ${CMAKE_MATCH_1})
+    endif()
+    string(REGEX MATCH "^([0-9]+)\\.([0-9])+.*" TMP "${VERSION}")
+    if (CMAKE_MATCH_2)
+        set(MINOR ${CMAKE_MATCH_2})
+    endif()
+    string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+).*" TMP "${VERSION}")
+    if (CMAKE_MATCH_3)
+        set(PATCH ${CMAKE_MATCH_3})
+    endif()
 
-MACRO(CHECK_HEADERS)
-    if (NOT BUNDLE_SYMBOLICNAME)
-        MESSAGE(FATAL_ERROR "Bundle Symbolic Name not set, please set it using \"SET(BUNDLE_SYMBOLICNAME \"bundle_symbolic_name\")\".")
-    endif (NOT BUNDLE_SYMBOLICNAME)
-    
-    if (NOT BUNDLE_VERSION)
-        MESSAGE(WARNING "Bundle version not set, using default \"0.0.0\" version.")
-        SET(BUNDLE_VERSION "0.0.0")
-    endif (NOT BUNDLE_VERSION)
-ENDMACRO(CHECK_HEADERS)
-
-MACRO(SET_HEADER header content)
-    SET(${header} "${content}")
-    string(STRIP ${${header}} ${${header}})
-ENDMACRO(SET_HEADER)
-
-MACRO(SET_HEADERS content)
-	SET(INT_BUNDLE_EXTRAHEADER "${INT_BUNDLE_EXTRAHEADER}\n${content}")
-	string(STRIP "${INT_BUNDLE_EXTRAHEADER}" INT_BUNDLE_EXTRAHEADER)
-ENDMACRO(SET_HEADERS)
-
-MACRO(BUNDLE_PRIVATE_LIBRARY)
-    PARSE_ARGUMENTS(BUNDLE_LIBRARY "SOURCES;LINK_LIBRARIES" "" ${ARGN})
-    LIST(GET BUNDLE_LIBRARY_DEFAULT_ARGS 0 BUNDLE_LIBRARY_NAME)
-    
-    CHECK_HEADERS()
-    
-    SET(BUNDLE_LIBRARY_VERSIONED_NAME ${BUNDLE_SYMBOLICNAME}-${BUNDLE_LIBRARY_NAME})
-    
-    add_library(${BUNDLE_LIBRARY_VERSIONED_NAME} SHARED ${BUNDLE_LIBRARY_SOURCES})
-    target_link_libraries(${BUNDLE_LIBRARY_VERSIONED_NAME} ${BUNDLE_LIBRARY_LINK_LIBRARIES})
-ENDMACRO(BUNDLE_PRIVATE_LIBRARY)
-
-MACRO(BUNDLE_LIBRARY)
-    PARSE_ARGUMENTS(BUNDLE_LIBRARY "SOURCES;LINK_LIBRARIES" "" ${ARGN})
-    LIST(GET BUNDLE_LIBRARY_DEFAULT_ARGS 0 BUNDLE_LIBRARY_NAME)
-    
-    SET(BUNDLE_LIBRARY_VERSIONED_NAME ${BUNDLE_LIBRARY_NAME})
-    
-    add_library(${BUNDLE_LIBRARY_VERSIONED_NAME} SHARED ${BUNDLE_LIBRARY_SOURCES})
-    target_link_libraries(${BUNDLE_LIBRARY_VERSIONED_NAME} ${BUNDLE_LIBRARY_LINK_LIBRARIES})
-ENDMACRO(BUNDLE_LIBRARY)
-
-MACRO(_parseExportLibraryName _export)
-    STRING(REPLACE "|" ";" _exports ${_export})
-    LIST(LENGTH _exports _size)
-    LIST(GET _exports 0 _library)
-    SET(EXPORT_LIBRARY_NAME ${_library})
-    
-    IF(${_size} EQUAL 2)
-        LIST(GET _exports 1 _version)
-        IF(_version)
-            string(FIND ${_version} "\"" _start)
-            string(FIND ${_version} "\"" _end REVERSE)
-            MATH(EXPR _start ${_start}+1)
-            MATH(EXPR _length ${_end}-${_start})
-            string(SUBSTRING ${_version} ${_start} ${_length} ENDIF)
-            
-            SET(EXPORT_LIBRARY_NAME ${_library}-${ENDIF})
-        ENDIF()
-    ENDIF()
-ENDMACRO()
-
-MACRO(PROCESS_MANIFEST_HEADERS)
-    IF(BUNDLE_DESCRIPTION)
-        SET_HEADERS("Bundle-Description: ${BUNDLE_DESCRIPTION}")
-    ENDIF()
-    IF(BUNDLE_VERSION)
-        SET_HEADERS("Bundle-Version: ${BUNDLE_VERSION}")
-    ENDIF()
-    IF(BUNDLE_NAME)
-        SET_HEADERS("Bundle-Name: ${BUNDLE_NAME}")
-    ENDIF()
-
-    SET_HEADERS("Manifest-Version: 1.0")
-
-ENDMACRO()
-
-
-MACRO(bundle)
-    PARSE_ARGUMENTS(_BUNDLE "SOURCES;LINK_LIBRARIES;EXPORT_VERSION;ACTIVATOR;PRIVATE_LIBRARIES;EXPORT_LIBRARIES;IMPORT_LIBRARIES;FILES;DIRECTORIES;INSTALL_FILES" "PRIVATE;EXPORT;INSTALL" ${ARGN})
-    LIST(GET _BUNDLE_DEFAULT_ARGS 0 _BUNDLE_NAME)
-    
-    CHECK_HEADERS()
-    
-    PROCESS_MANIFEST_HEADERS()
-    
-    if (NOT _BUNDLE_NAME)
-      message(STATUS "NO bundle name set, using symbolic name")
-      SET(_BUNDLE_NAME ${BUNDLE_SYMBOLICNAME})
-    endif(NOT _BUNDLE_NAME)
-    
-    set(_BUNDLE_NAME_INSTALL ${_BUNDLE_NAME}_install)
-    
-    if(_BUNDLE_SOURCES)
-        add_library(${_BUNDLE_NAME} SHARED ${_BUNDLE_SOURCES})
-        target_link_libraries(${_BUNDLE_NAME} ${_BUNDLE_LINK_LIBRARIES})
-        SET_HEADERS("Bundle-Activator: ${_BUNDLE_NAME}")
-    else(_BUNDLE_SOURCES)
-        add_custom_target(${_BUNDLE_NAME})
-        add_dependencies(bundles ${_BUNDLE_NAME})
-    endif(_BUNDLE_SOURCES)
-    
-    SET(TEMP)
-    foreach(_PRIVATE_LIBRARY ${_BUNDLE_PRIVATE_LIBRARIES})
-        SET(_BUNDLE_LIBRARY_VERSIONED_NAME ${BUNDLE_SYMBOLICNAME}-${_PRIVATE_LIBRARY})
-        add_dependencies(${_BUNDLE_NAME} "${_BUNDLE_LIBRARY_VERSIONED_NAME}")
-        install(TARGETS ${_BUNDLE_LIBRARY_VERSIONED_NAME} DESTINATION . COMPONENT ${_BUNDLE_NAME}_install)
-        
-        SET(TEMP ${TEMP} ${_BUNDLE_LIBRARY_VERSIONED_NAME})
-    endforeach()
-    SET(_BUNDLE_PRIVATE_LIBRARIES ${TEMP})
-    UNSET(TEMP)
-    
-    FOREACH(_EXPORT_LIBRARY ${_BUNDLE_EXPORT_LIBRARIES})
-        _parseExportLibraryName(${_EXPORT_LIBRARY})
-        ADD_DEPENDENCIES(${_BUNDLE_NAME} ${EXPORT_LIBRARY_NAME})
-        INSTALL(TARGETS ${EXPORT_LIBRARY_NAME} DESTINATION . COMPONENT ${_BUNDLE_NAME}_install)
-    ENDFOREACH()
-    
-    set_property(TARGET ${_BUNDLE_NAME} PROPERTY BUNDLE "${CMAKE_CURRENT_BINARY_DIR}/${_BUNDLE_NAME}.zip")
-    
-    if(_BUNDLE_SOURCES)
-        list(APPEND _BUNDLE_PRIVATE_LIBRARIES ${_BUNDLE_NAME})
-    endif(_BUNDLE_SOURCES)
-    
-    string (REPLACE ";" "," _BUNDLE_PRIVATE_LIBRARIES "${_BUNDLE_PRIVATE_LIBRARIES}")
-    string (REPLACE ";" "," _BUNDLE_EXPORT_LIBRARIES "${_BUNDLE_EXPORT_LIBRARIES}")
-    string (REPLACE "|" ";" _BUNDLE_EXPORT_LIBRARIES "${_BUNDLE_EXPORT_LIBRARIES}")
-    string (REPLACE ";" "," _BUNDLE_IMPORT_LIBRARIES "${_BUNDLE_IMPORT_LIBRARIES}")
-    string (REPLACE "|" ";" _BUNDLE_IMPORT_LIBRARIES "${_BUNDLE_IMPORT_LIBRARIES}")
-    
-    if(_BUNDLE_ACTIVATOR)
-        SET_HEADERS("Bundle-Activator: ${_BUNDLE_ACTIVATOR}")
+    #TODO add support qualifier 
+endmacro()
+
+function(set_library_version TARGET VERSION) 
+    if (VERSION AND TARGET)
+        extract_version_parts("${VERSION}" MAJOR MINOR PATCH)
+
+        #NOTE setting aligning ABI version with major part of the interface version.
+        #This is simpeler than using the <current>:<revision>:<age> approach of libtool
+        set_property(TARGET ${TARGET} PROPERTY VERSION "${VERSION}")
+        set_property(TARGET ${TARGET} PROPERTY SOVERSION ${MAJOR})
+        #set_property(TARGET ${TARGET} PROPERTY VERSION "${VERSION}")
+        #message("target '${TARGET}' with provided version '${VERSION}' has version parts: '${MAJOR}' '${MINOR}' '${PATCH}'")
+    else ()
+        message(WARNING "set_library_version: Cannot set version info TARGET and/or VERSION not provided")
+    endif ()
+endfunction()
+
+function(check_lib LIB)
+   if(TARGET ${LIB})
+        #ok
+    elseif(IS_ABSOLUTE ${LIB} AND EXISTS ${LIB})
+        #ok
+    else() 
+        message(FATAL_ERROR "Provided library (${LIB}) is not a target nor a absolute path to an existing library")
     endif()
-    if(_BUNDLE_PRIVATE_LIBRARIES)
-        SET_HEADERS("Private-Library: ${_BUNDLE_PRIVATE_LIBRARIES}")
+endfunction()
+
+function(check_bundle BUNDLE)
+    if(TARGET ${BUNDLE})
+        get_target_property(BUNDLE_FILE ${BUNDLE} "BUNDLE_FILE")
+        if(NOT BUNDLE_FILE)
+            message(FATAL_ERROR "Provided target must be a bundle target")
+        endif()
+    else()
+        message(FATAL_ERROR "first argument must be a target")
     endif()
-    if(_BUNDLE_EXPORT_LIBRARIES)
-        SET_HEADERS("Export-Library: ${_BUNDLE_EXPORT_LIBRARIES}")
+endfunction()
+
+
+function(add_bundle)
+    list(GET ARGN 0 BUNDLE_TARGET_NAME)
+    list(REMOVE_AT ARGN 0)
+
+    set(OPTIONS NO_ACTIVATOR)
+    set(ONE_VAL_ARGS VERSION ACTIVATOR SYMBOLIC_NAME NAME) 
+    set(MULTI_VAL_ARGS SOURCES PRIVATE_LIBRARIES EXPORT_LIBRARIES HEADERS)
+    cmake_parse_arguments(BUNDLE "${OPTIONS}" "${ONE_VAL_ARGS}" "${MULTI_VAL_ARGS}" ${ARGN})
+
+    ##check arguments
+    if(NOT BUNDLE_TARGET_NAME)
+        message(FATAL_ERROR "add_bunde function requires first target name argument")
     endif()
-    if(_BUNDLE_IMPORT_LIBRARIES)
-        SET_HEADERS("Import-Library: ${_BUNDLE_IMPORT_LIBRARIES}")
+    if((NOT (BUNDLE_SOURCES OR BUNDLE_ACTIVATOR)) AND (NOT BUNDLE_NO_ACTIVATOR))
+        message(FATAL_ERROR "Bundle contain no SOURCES or ACTIVATOR target and the option NO_ACTIVATOR is not set")
     endif()
-    
-    SET(__bundleManifest ${CMAKE_CURRENT_BINARY_DIR}/MANIFEST.MF)
-    CONFIGURE_FILE(${CELIX_CMAKE_DIRECTORY}/cmake_celix/manifest.in ${__bundleManifest} @ONLY)
-    install (FILES ${__bundleManifest} DESTINATION ./META-INF COMPONENT ${_BUNDLE_NAME_INSTALL})
-    
-    if(_BUNDLE_SOURCES)
-        install (TARGETS ${_BUNDLE_NAME} DESTINATION . COMPONENT ${_BUNDLE_NAME_INSTALL})
-    endif(_BUNDLE_SOURCES)
-    
-    if(_BUNDLE_FILES)
-        install (FILES ${_BUNDLE_FILES} DESTINATION . COMPONENT ${_BUNDLE_NAME_INSTALL})
+    if(BUNDLE_SOURCES AND BUNDLE_ACTIVATOR)
+        message(FATAL_ERROR "add_bundle function requires a value for SOURCES or ACTIVATOR not both")
     endif()
-    if(_BUNDLE_DIRECTORIES)
-        install (DIRECTORY ${_BUNDLE_DIRECTORIES} DESTINATION . COMPONENT ${_BUNDLE_NAME_INSTALL})
+    if(BUNDLE_ACTIVATOR)
+        check_lib(${BUNDLE_ACTIVATOR})
     endif()
 
-    SET(__bundleConfig ${CMAKE_CURRENT_BINARY_DIR}/CPackConfig-${_BUNDLE_NAME}-bundle.cmake)
-    SET(BUNDLE_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR})
-    CONFIGURE_FILE(${CELIX_CMAKE_DIRECTORY}/cmake_celix/CPackConfig.in ${__bundleConfig} @ONLY)
-
+    #setting defaults
+    if(NOT BUNDLE_VERSION) 
+        set(BUNDLE_VERSION "0.0.0")
+        message(WARNING "Bundle version for ${BUNDLE_NAME} not provided. Using 0.0.0")
+    endif()
+    if (NOT BUNDLE_NAME)
+        set(BUNDLE_NAME ${BUNDLE_TARGET_NAME})
+    endif()
+    if (NOT BUNDLE_SYMBOLIC_NAME)
+        set(BUNDLE_SYMBOLIC_NAME ${BUNDLE_TARGET_NAME})
+    endif()
+    set(BUNDLE_FILE "${CMAKE_CURRENT_BINARY_DIR}/${BUNDLE_TARGET_NAME}.zip") 
+    set(BUNDLE_CONTENT_DIR "${CMAKE_CURRENT_BINARY_DIR}/${BUNDLE_TARGET_NAME}_content")
+    set(BUNDLE_GEN_DIR "${CMAKE_CURRENT_BINARY_DIR}/${BUNDLE_TARGET_NAME}_gen")
+
+
+    ###### Setting up dependency for bundles target
+    get_target_property(DEPS bundles "BUNDLES_DEPS")
+    list(APPEND DEPS "${BUNDLE_FILE}")
+    set_target_properties(bundles PROPERTIES "BUNDLES_DEPS" "${DEPS}")
+    #####
+
+    ####### Setting target for activator lib if neccesary ####################
+    if(BUNDLE_SOURCES)
+        #create lib from sources
+        add_library(${BUNDLE_TARGET_NAME} SHARED ${BUNDLE_SOURCES})
+        set_library_version(${BUNDLE_TARGET_NAME} ${BUNDLE_VERSION})
+        set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_TARGET_IS_LIB" TRUE)
+        add_dependencies(bundles ${BUNDLE_TARGET_NAME})
+    else()
+        add_custom_target(${BUNDLE_TARGET_NAME}
+          DEPENDS "$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_FILE>"
+        )
+    endif()
+    add_custom_target(${BUNDLE_TARGET_NAME}_bundle
+        DEPENDS "$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_FILE>"
+    )
+    add_dependencies(bundles ${BUNDLE_TARGET_NAME}_bundle)
+    #######################################################################
+   
+
+    ##### MANIFEST configuration and generation ##################
+    #Step1 configure the file so that the target name is present in in the template
+    configure_file(${CELIX_CMAKE_DIRECTORY}/cmake_celix/Manifest.template.in ${BUNDLE_GEN_DIR}/MANIFEST.template @ONLY)
+    #Step2 replace headers with target property values. Note this is done build time
+    file(GENERATE 
+        OUTPUT "${BUNDLE_GEN_DIR}/MANIFEST.tmp"
+        INPUT "${BUNDLE_GEN_DIR}/MANIFEST.template"
+    )
+    #Step3 The replaced values in step 2 can contain generator expresssion, generated again to resolve those. Note this is done build time
+    file(GENERATE 
+        OUTPUT "${BUNDLE_GEN_DIR}/MANIFEST.MF"
+        INPUT "${BUNDLE_GEN_DIR}/MANIFEST.tmp"
+    )   
+    #########################################################
+
+    ###### Packaging the bundle using using jar,zip or cpack and a content dir. Configuring dependencies ######
     if(JAR_COMMAND)
-        ADD_CUSTOM_COMMAND(TARGET ${_BUNDLE_NAME}
-        POST_BUILD
-            COMMAND ${CPACK_COMMAND} ARGS -C Debug --config ${__bundleConfig}
-            COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/ziptojar
-            COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_CURRENT_BINARY_DIR}/ziptojar ${JAR_COMMAND} -xf ${CMAKE_CURRENT_BINARY_DIR}/${_BUNDLE_NAME}.zip
-            COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_CURRENT_BINARY_DIR}/ziptojar ${JAR_COMMAND} -cfm ${CMAKE_CURRENT_BINARY_DIR}/${_BUNDLE_NAME}.zip META-INF/MANIFEST.MF .
-            COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_BINARY_DIR}/ziptojar
+        add_custom_command(OUTPUT ${BUNDLE_FILE}
+            COMMAND ${JAR_COMMAND} -cfm ${BUNDLE_FILE} ${BUNDLE_GEN_DIR}/MANIFEST.MF -C ${BUNDLE_CONTENT_DIR} .
+            COMMENT "Packaging ${BUNDLE_TARGET_NAME}"
+            DEPENDS  ${BUNDLE_TARGET_NAME} "$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_DEPEND_TARGETS>" ${BUNDLE_GEN_DIR}/MANIFEST.MF
             WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
         )
-    else(JAR_COMMAND)
-        ADD_CUSTOM_COMMAND(TARGET ${_BUNDLE_NAME}
-        POST_BUILD
-            COMMAND ${CPACK_COMMAND} ARGS -C Debug --config ${__bundleConfig}
-            WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+    elseif(ZIP_COMMAND)
+        add_custom_command(OUTPUT ${BUNDLE_FILE}
+            COMMAND ${CMAKE_COMMAND} -E copy_if_different ${BUNDLE_GEN_DIR}/MANIFEST.MF META-INF/MANIFEST.MF
+            COMMAND ${ZIP_COMMAND} -rq ${BUNDLE_FILE} *
+            COMMENT "Packaging ${BUNDLE_TARGET_NAME}"
+            DEPENDS  ${BUNDLE_TARGET_NAME} "$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_DEPEND_TARGETS>" ${BUNDLE_GEN_DIR}/MANIFEST.MF
+            WORKING_DIRECTORY ${BUNDLE_CONTENT_DIR}
         )
-    endif(JAR_COMMAND)
-    
-    if (_BUNDLE_INSTALL)
-        CELIX_ADD_COMPONENT(${_BUNDLE_NAME}
-            DISPLAY_NAME ${BUNDLE_SYMBOLICNAME}
-            DESCRIPTION ${BUNDLE_DESCRIPTION}
-            GROUP bundles
+    elseif(CPACK_COMMAND)
+        install(DIRECTORY ${BUNDLE_CONTENT_DIR}/ DESTINATION . COMPONENT ${BUNDLE_TARGET_NAME}_install_cmp)
+        install(FILES ${BUNDLE_GEN_DIR}/MANIFEST.MF DESTINATION META-INF COMPONENT ${BUNDLE_TARGET_NAME}_install_cmp)
+        file(GENERATE OUTPUT ${BUNDLE_GEN_DIR}/cpack.cmake CONTENT "
+SET(CPACK_CMAKE_GENERATOR \"Unix Makefiles\")
+SET(CPACK_GENERATOR \"ZIP\")
+SET(CPACK_INSTALL_CMAKE_PROJECTS \"${CMAKE_CURRENT_BINARY_DIR};${BUNDLE_TARGET_NAME};${BUNDLE_TARGET_NAME}_install_cmp;/\")
+SET(CPACK_PACKAGE_DESCRIPTION \"\")
+SET(CPACK_PACKAGE_FILE_NAME \"${BUNDLE_TARGET_NAME}\")
+SET(CPACK_PACKAGE_NAME \"${BUNDLE_TARGET_NAME}\")
+SET(CPACK_PACKAGE_VERSION \"0.0.1\")
+SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY \"0\")
+")
+        add_custom_command(OUTPUT ${BUNDLE_FILE}
+            COMMAND ${CPACK_COMMAND} ARGS -C Debug --config ${BUNDLE_GEN_DIR}/cpack.cmake
+            COMMENT "Packaging ${BUNDLE_TARGET_NAME}"
+            DEPENDS  ${BUNDLE_TARGET_NAME} "$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_DEPEND_TARGETS>" ${BUNDLE_GEN_DIR}/MANIFEST.MF
+            WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
         )
-        add_dependencies( install-${_BUNDLE_NAME} ${_BUNDLE_NAME} )
-        
-        if (_BUNDLE_INSTALL_FILES)
-            install (FILES ${_BUNDLE_INSTALL_FILES} DESTINATION include/celix/${_BUNDLE_NAME} COMPONENT ${_BUNDLE_NAME})
+    endif()
+    ###################################################################################
+
+
+    ###################################
+    ##### Additional Cleanup info #####
+    ###################################
+    set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_GEN_DIR>;$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_CONTENT_DIR>")
+
+    #############################
+    ### BUNDLE TARGET PROPERTIES
+    #############################
+    #internal use
+    set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_DEPEND_TARGETS" "") #bundle target dependencies. Note can be extended after the add_bundle call
+    set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_GEN_DIR" ${BUNDLE_GEN_DIR}) #location for generated output. 
+
+    #bundle specific
+    set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_CONTENT_DIR" ${BUNDLE_CONTENT_DIR}) #location where the content to be jar/zipped. 
+    set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_FILE" ${BUNDLE_FILE}) #target bundle file (.zip)
+
+    #name and version
+    set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_NAME" ${BUNDLE_NAME}) #The bundle name default target name
+    set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_SYMBOLIC_NAME" ${BUNDLE_SYMBOLIC_NAME}) #The bundle symbolic name. Default target name
+    set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_VERSION" ${BUNDLE_VERSION}) #The bundle version. Default 0.0.0
+
+    #headers
+    set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_ACTIVATOR" 1) #Library containing the activator (if any)
+    set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_PRIVATE_LIBS" "") #List of private libs. 
+    set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_IMPORT_LIBS" "") #List of libs to import
+    set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_EXPORT_LIBS" "") #list of libs to export
+    set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_HEADERS" "") #Additional headers will be added (new line seperated) to the manifest
+    ################################
+    ################################
+
+    if(BUNDLE_SOURCES) 
+        bundle_private_libs(${BUNDLE_TARGET_NAME} ${BUNDLE_TARGET_NAME})
+        set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_ACTIVATOR" "$<TARGET_SONAME_FILE_NAME:${BUNDLE_TARGET_NAME}>")
+
+        if(APPLE)
+            set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES INSTALL_RPATH "@loader_path")
+        else()
+            set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN")
         endif()
-        
-        INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_BUNDLE_NAME}.zip DESTINATION share/celix/bundles COMPONENT ${_BUNDLE_NAME})
+    else() #ACTIVATOR 
+        bundle_private_libs(${BUNDLE_TARGET_NAME} ${BUNDLE_ACTIVATOR})
+        get_filename_component(ACT_NAME ${BUNDLE_ACTIVATOR} NAME)
+        set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_ACTIVATOR" ${ACT_NAME})
     endif()
-    
-    SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_BUNDLE_NAME}.zip)
-ENDMACRO(bundle)
 
-MACRO(install_bundle)
-    PARSE_ARGUMENTS(BUNDLE "HEADERS;RESOURCES" "" ${ARGN})
-    LIST(GET BUNDLE_DEFAULT_ARGS 0 INT_BUNDLE_NAME)
+    bundle_private_libs(${BUNDLE_TARGET_NAME} ${BUNDLE_PRIVATE_LIBRARIES})
+    bundle_export_libs(${BUNDLE_TARGET_NAME} ${BUNDLE_EXPORT_LIBRARIES})
+    bundle_headers(${BUNDLE_TARGET_NAME} ${BUNDLE_HEADERS})
+endfunction()
+
+function(get_bundle_file BUNDLE OUT)
+    check_bundle(${BUNDLE})
+    get_target_property(${OUT} ${BUNDLE} "BUNDLE_FILE")
+endfunction()
+
+function(bundle_export_libs)
+    list(GET ARGN 0 BUNDLE)
+    list(REMOVE_AT ARGN 0)
+    bundle_libs(${BUNDLE} "EXPORT" ${ARGN})
+endfunction()
+
+function(bundle_private_libs)
+    list(GET ARGN 0 BUNDLE)
+    list(REMOVE_AT ARGN 0)
+    bundle_libs(${BUNDLE} "PRIVATE" ${ARGN})
+endfunction()
+
+function(bundle_libs)
+    #0 is bundle TARGET
+    #1 is type (PRIVATE,EXPORT
+    #2..n is libs
+    list(GET ARGN 0 BUNDLE)
+    list(REMOVE_AT ARGN 0)
+
+    list(GET ARGN 0 TYPE)
+    list(REMOVE_AT ARGN 0)
+
+    #check if arg 0 is corrent
+    check_bundle(${BUNDLE})
+    get_target_property(BUNDLE_DIR ${BUNDLE} "BUNDLE_CONTENT_DIR")
+    get_target_property(BUNDLE_GEN_DIR ${BUNDLE} "BUNDLE_GEN_DIR")
+
+
+    get_target_property(LIBS ${BUNDLE} "BUNDLE_${TYPE}_LIBS")
+    get_target_property(DEPS ${BUNDLE} "BUNDLE_DEPEND_TARGETS")
+
+    foreach(LIB IN ITEMS ${ARGN})
+        check_lib(${LIB})
+
+        if(TARGET ${LIB})
+
+            #NOTE add_custom_command does not support generator expression in OUTPUT value (e.g. $<TARGET_FILE:${LIB}>)
+            #Using a two step approach to be able to use add_custom_command instead of add_custom_target
+            get_target_property(EXTENSION ${LIB} SUFFIX)
+            set(OUT "${BUNDLE_GEN_DIR}/lib-${LIB}-copy")
+            add_custom_command(OUTPUT ${OUT}
+                COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:${LIB}>" ${OUT}
+                COMMAND ${CMAKE_COMMAND} -E copy_if_different ${OUT} "${BUNDLE_DIR}/$<TARGET_SONAME_FILE_NAME:${LIB}>"
+                DEPENDS ${LIB}
+            )
+            list(APPEND DEPS "${OUT}") #NOTE depending on ${OUT} not on $<TARGET_FILE:${LIB}>.
+            list(APPEND LIBS "$<TARGET_SONAME_FILE_NAME:${LIB}>")
+        else()
+            get_filename_component(LIB_NAME ${LIB} NAME) 
+            set(OUT "${BUNDLE_DIR}/${LIB_NAME}") 
+            add_custom_command(OUTPUT ${OUT} 
+                COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LIB} ${OUT} 
+            )
+            list(APPEND LIBS ${LIB_NAME})
+            list(APPEND DEPS ${OUT}) 
+        endif()
+
+        get_target_property(IS_LIB ${BUNDLE} "BUNDLE_TARGET_IS_LIB")
+        if ("${LIB}" STREQUAL "${BUNDLE}")
+            #ignore. Do not have to link agaist own lib
+        elseif(IS_LIB)
+            target_link_libraries(${BUNDLE} ${LIB})
+        endif()
+    endforeach()
+
+
+    set_target_properties(${BUNDLE} PROPERTIES "BUNDLE_${TYPE}_LIBS" "${LIBS}")
+    set_target_properties(${BUNDLE} PROPERTIES "BUNDLE_DEPEND_TARGETS" "${DEPS}")
+endfunction()
+
+#TODO
+#
+# bundle_import_libs(<target> LIB <lib> RANGE <version_range> ?)
+#
+#
+function(bundle_import_libs)
+    #0 is bundle TARGET
+    #1..n is libs
+    list(GET ARGN 0 BUNDLE)
+    list(REMOVE_AT ARGN 0)
+
+    message(WARNING "IMPORT BUNDLES STILL TODO")
+
+endfunction()
+
+function(bundle_files)
+    #0 is bundle TARGET
+    #1..n is header name / header value
+    list(GET ARGN 0 BUNDLE)
+    list(REMOVE_AT ARGN 0)
+
+    set(OPTIONS )
+    set(ONE_VAL_ARGS DESTINATION)
+    set(MULTI_VAL_ARGS )
+    cmake_parse_arguments(FILES "${OPTIONS}" "${ONE_VAL_ARGS}" "${MULTI_VAL_ARGS}" ${ARGN})
+
+    get_target_property(BUNDLE_DIR ${BUNDLE} "BUNDLE_CONTENT_DIR") 
+
+    if (FILES_DESTINATION)
+        set(DESTINATION "${BUNDLE_DIR}/${FILES_DESTINATION}")
+    else()
+        set(DESTINATION "${BUNDLE_DIR}")
+    endif()
+
+    #message("call: files(COPY ${FILES_UNPARSED_ARGUMENTS} DESTINATION \"${DESTINATION}\"")
+    file(COPY ${FILES_UNPARSED_ARGUMENTS} DESTINATION ${DESTINATION})
+endfunction()
+
+function(bundle_headers)
+    #0 is bundle TARGET
+    #1..n is header name / header value
+    list(GET ARGN 0 BUNDLE)
+    list(REMOVE_AT ARGN 0)
+
+    get_target_property(HEADERS ${BUNDLE} "BUNDLE_HEADERS")
+
+    foreach(HEADER IN ITEMS ${ARGN})
+        list(APPEND HEADERS "${HEADER}")
+    endforeach()
+
+    set_target_properties(${BUNDLE} PROPERTIES "BUNDLE_HEADERS" "${HEADERS}")
+endfunction()
+
+function(bundle_symbolic_name BUNDLE SYMBOLIC_NAME) 
+    set_target_properties(${BUNDLE} PROPERTIES "BUNDLE_SYMBOLIC_NAME" ${SYMBOLIC_NAME})
+endfunction()
+
+function(bundle_name BUNDLE NAME) 
+    set_target_properties(${BUNDLE} PROPERTIES "BUNDLE_NAME" ${NAME})
+endfunction()
+
+function(bundle_version BUNDLE VERSION) 
+    set_target_properties(${BUNDLE} PROPERTIES "BUNDLE_VERSION" ${VERSION})
+endfunction()
+
+function(install_bundle)
+    #0 is bundle TARGET
+    list(GET ARGN 0 BUNDLE)
+    list(REMOVE_AT ARGN 0)
+
+    set(OPTIONS )
+    set(ONE_VAL_ARGS PROJECT_NAME BUNDLE_NAME) 
+    set(MULTI_VAL_ARGS HEADERS RESOURCES)
+    cmake_parse_arguments(INSTALL "${OPTIONS}" "${ONE_VAL_ARGS}" "${MULTI_VAL_ARGS}" ${ARGN})
     
-	CELIX_ADD_COMPONENT(${INT_BUNDLE_NAME}
-    	DISPLAY_NAME ${INT_BUNDLE_NAME}
-        DESCRIPTION ${INT_BUNDLE_NAME}
-        GROUP bundles
+    if (NOT INSTALL_PROJECT_NAME)
+        string(TOLOWER ${PROJECT_NAME} INSTALL_PROJECT_NAME)
+    endif()
+    if (NOT INSTALL_BUNDLE_NAME)
+        set(INSTALL_BUNDLE_NAME ${BUNDLE})
+    endif()
+
+    install(FILES "$<TARGET_PROPERTY:${BUNDLE},BUNDLE_FILE>" DESTINATION share/${INSTALL_PROJECT_NAME}/bundles COMPONENT ${BUNDLE})
+    if(INSTALL_HEADERS)
+        install (FILES ${INSTALL_HEADERS} DESTINATION include/${INSTALL_PROJECT_NAME}/${INSTALL_BUNDLE_NAME} COMPONENT ${BUNDLE})
+    endif()
+    if (INSTALL_RESOURCES)
+        install (FILES ${INSTALL_RESOURCES} DESTINATION share/${INSTALL_PROJECT_NAME}/${INSTALL_BUNDLE_NAME} COMPONENT ${BUNDLE})
+    endif()
+
+endfunction()
+
+function(add_deploy)
+    list(GET ARGN 0 DEPLOY_TARGET)
+    list(REMOVE_AT ARGN 0)
+
+    set(OPTIONS COPY)
+    set(ONE_VAL_ARGS GROUP NAME)
+    set(MULTI_VAL_ARGS BUNDLES PROPERTIES)
+    cmake_parse_arguments(DEPLOY "${OPTIONS}" "${ONE_VAL_ARGS}" "${MULTI_VAL_ARGS}" ${ARGN})
+
+    ##### Check arguments #####
+    if(NOT DEPLOY_NAME) 
+        set(DEPLOY_NAME "${DEPLOY_TARGET}")
+    endif()
+    ######
+
+    ##### Setting defaults #####
+    if(DEPLOY_GROUP) 
+        set(DEPLOY_LOCATION "${CMAKE_BINARY_DIR}/deploy/${DEPLOY_GROUP}/${DEPLOY_NAME}")
+    else()
+        set(DEPLOY_LOCATION "${CMAKE_BINARY_DIR}/deploy/${DEPLOY_NAME}")
+    endif()
+    ######
+
+
+    ###### Setup deploy custom target and config.properties file
+    add_custom_target(${DEPLOY_TARGET}
+        DEPENDS  "${DEPLOY_LOCATION}/timestamp"
     )
-    add_dependencies( install-${INT_BUNDLE_NAME} ${INT_BUNDLE_NAME} )
+    add_dependencies(deploy ${DEPLOY_TARGET})
 
+    add_custom_command(OUTPUT ${DEPLOY_LOCATION}/timestamp
+        COMMAND ${CMAKE_COMMAND} -E touch ${DEPLOY_LOCATION}/timestamp
+        DEPENDS  "$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_TARGET_DEPS>" "${DEPLOY_LOCATION}/config.properties" "${DEPLOY_LOCATION}/run.sh"
+        WORKING_DIRECTORY "${DEPLOY_LOCATION}"
+        COMMENT "Deploying ${DEPLOY_NAME}" VERBATIM
+    )
 
-    string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
-    
-    if (BUNDLE_HEADERS)
-        install (FILES ${BUNDLE_HEADERS} DESTINATION include/${PROJECT_NAME_LOWER}/${INT_BUNDLE_NAME} COMPONENT ${INT_BUNDLE_NAME})
-    endif(BUNDLE_HEADERS)
-    if (BUNDLE_RESOURCES)
-        install (FILES ${BUNDLE_RESOURCES} DESTINATION share/${PROJECT_NAME_LOWER}/${INT_BUNDLE_NAME} COMPONENT ${INT_BUNDLE_NAME})
-    endif(BUNDLE_RESOURCES)
-    
-    INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${INT_BUNDLE_NAME}.zip DESTINATION share/${PROJECT_NAME_LOWER}/bundles COMPONENT ${INT_BUNDLE_NAME})
-ENDMACRO(install_bundle)
-	
-MACRO(package)
-    PARSE_ARGUMENTS(PACKAGE "FILES;DIRECTORIES" "" ${ARGN})
-    LIST(GET PACKAGE_DEFAULT_ARGS 0 PACKAGE_NAME)
-	
-	SET(PACKAGE_COMPONENT package_${PACKAGE_NAME})
-	
-	get_property(bundle_file TARGET ${INT_BUNDLE_NAME} PROPERTY BUNDLE)
-	
-	install (FILES ${bundle_file} DESTINATION . COMPONENT ${PACKAGE_COMPONENT})
-	
-	if (PACKAGE_FILES)
-	    install (FILES ${PACKAGE_FILES} DESTINATION . COMPONENT ${PACKAGE_COMPONENT})
-    endif(PACKAGE_FILES)
-    if (PACKAGE_DIRECTORIES)
-	    install (DIRECTORY ${PACKAGE_DIRECTORIES} DESTINATION . COMPONENT ${PACKAGE_COMPONENT})
-    endif(PACKAGE_DIRECTORIES)
-
-	SET(__packageConfig ${CMAKE_CURRENT_BINARY_DIR}/CPackConfig-${PACKAGE_NAME}-pkg.cmake)
-	CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/CPackConfigPKG.in ${__packageConfig} @ONLY)
-	ADD_CUSTOM_COMMAND(TARGET ${PACKAGE_NAME}
-		POST_BUILD
-		COMMAND	${CPACK_COMMAND} --config "${__packageConfig}"
-		WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-	)
-	
-	GET_DIRECTORY_PROPERTY(PROPS ADDITIONAL_MAKE_CLEAN_FILES)
-	SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PROPS};${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE_NAME}-dev.zip")
-ENDMACRO(package)
-
-
-ADD_CUSTOM_TARGET(deploy)
-MACRO(deploy)
-    PARSE_ARGUMENTS(DEPLOY "BUNDLES;DRIVERS;ENDPOINTS;PROPERTIES" "" ${ARGN})
-    LIST(GET DEPLOY_DEFAULT_ARGS 0 DEPLOY_NAME)
-    
-	SET(DEPLOY_COMPONENT deploy_${DEPLOY_NAME})
-	SET(__deployTarget deploy_${DEPLOY_NAME})
-		
-	SET(BUNDLES "")
-	SET(DEPS)
-	SET(PROPERTIES "")
-	
-	FOREACH(BUNDLE ${DEPLOY_BUNDLES})
-		SET(DEP_NAME ${DEPLOY_NAME}_${BUNDLE}) 
-		IF(IS_ABSOLUTE ${BUNDLE} AND EXISTS ${BUNDLE})  #it is a full path not a bundle name (e.g. a target)
-			get_filename_component(BUNDLE_NAME ${BUNDLE} NAME_WE)	
-			add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/bundles/${BUNDLE_NAME}.zip
-				COMMAND ${CMAKE_COMMAND} -E copy ${BUNDLE} 
-				${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/bundles/${BUNDLE_NAME}.zip
-				COMMENT "Deploying ${BUNDLE} to ${DEPLOY_NAME}"
-			)
-		ELSE()
-			set(BUNDLE_NAME ${BUNDLE})
-			get_property(bundle_file TARGET ${BUNDLE} PROPERTY BUNDLE)
-			add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/bundles/${BUNDLE}.zip
-				COMMAND ${CMAKE_COMMAND} -E copy ${bundle_file} 
-				${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/bundles/${BUNDLE}.zip
-				DEPENDS ${BUNDLE}
-				COMMENT "Deploying ${BUNDLE} to ${DEPLOY_NAME}"
-			)
-		ENDIF()
-	    	SET(BUNDLES "${BUNDLES} bundles/${BUNDLE_NAME}.zip")
-	    	SET(DEPS ${DEPS};${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/bundles/${BUNDLE_NAME}.zip)
-	ENDFOREACH(BUNDLE)
-
-	FOREACH(BUNDLE ${DEPLOY_DRIVERS})
-        SET(DEP_NAME ${DEPLOY_NAME}_${BUNDLE}) 
-        get_property(bundle_file TARGET ${BUNDLE} PROPERTY BUNDLE)
-        add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/drivers/${BUNDLE}.zip
-            COMMAND ${CMAKE_COMMAND} -E copy ${bundle_file} 
-                ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/drivers/${BUNDLE}.zip
-            DEPENDS ${BUNDLE}
-            COMMENT "Deploying ${BUNDLE} to ${DEPLOY_NAME}"
-        )
-        #SET(BUNDLES "${BUNDLES} drivers/${BUNDLE}.zip")
-        SET(DEPS ${DEPS};${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/drivers/${BUNDLE}.zip)
-    	ENDFOREACH(BUNDLE)
-
-	FOREACH(BUNDLE ${DEPLOY_ENDPOINTS})
-        SET(DEP_NAME ${DEPLOY_NAME}_${BUNDLE}) 
-        get_property(bundle_file TARGET ${BUNDLE} PROPERTY BUNDLE)
-        add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/endpoints/${BUNDLE}.zip
-            COMMAND ${CMAKE_COMMAND} -E copy ${bundle_file} 
-                ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/endpoints/${BUNDLE}.zip
-            DEPENDS ${BUNDLE}
-            COMMENT "Deploying ${BUNDLE} to ${DEPLOY_NAME}"
-        )
-        #SET(BUNDLES "${BUNDLES} drivers/${BUNDLE}.zip")
-        SET(DEPS ${DEPS};${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/endpoints/${BUNDLE}.zip)
-    	ENDFOREACH(BUNDLE)
-	
-	FOREACH(PROPERTY ${DEPLOY_PROPERTIES})
-		SET(PROPERTIES "${PROPERTIES}\n${PROPERTY}")
-	ENDFOREACH(PROPERTY)
-	
-	IF(NOT(CELIX_FOUND)) #celix project
-		set(DEPS ${DEPS};celix)
-	ENDIF()
-    ADD_CUSTOM_TARGET(${__deployTarget} 
-    	DEPENDS ${DEPS}
-    	COMMENT "Deploy target ${DEPLOY_NAME}")
-    ADD_DEPENDENCIES(deploy ${__deployTarget})
-    
-    GET_DIRECTORY_PROPERTY(PROPS ADDITIONAL_MAKE_CLEAN_FILES)
-	SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PROPS};${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/bundles")
-	SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PROPS};${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/drivers")
-	
-	CONFIGURE_FILE(${CELIX_CMAKE_DIRECTORY}/cmake_celix/config.properties.in ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/config.properties @ONLY)
-	
-	IF(UNIX)
-		if(CELIX_FOUND)
-			GET_FILENAME_COMPONENT(FW_PATH ${CELIX_FRAMEWORK_LIBRARY} PATH)
-			GET_FILENAME_COMPONENT(UTILS_PATH ${CELIX_UTILS_LIBRARY} PATH)
-			set(LAUNCHER ${CELIX_LAUNCHER})
-		ELSE(CELIX_FOUND)
-			set(FW_PATH ${CMAKE_BINARY_DIR}/framework)
-			set(UTILS_PATH ${CMAKE_BINARY_DIR}/utils)
-			set(LAUNCHER ${CMAKE_BINARY_DIR}/launcher/celix)
-		ENDIF(CELIX_FOUND)
-		
-		
-		IF(UNIX)
-		  IF(APPLE)
-		    set(LIBRARY_PATH DYLD_LIBRARY_PATH)
-		  ELSE(APPLE)
-		    set(LIBRARY_PATH LD_LIBRARY_PATH)
-		  ENDIF(APPLE)
-		ENDIF(UNIX)
-	
-		CONFIGURE_FILE(${CELIX_CMAKE_DIRECTORY}/cmake_celix/run.sh.in ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/run.sh @ONLY)
-
-		# Generate an Eclipse launch file to be able to run the deployment from Eclipse	
-		# Linux/unix is assumed since we do only support VS on windows
-		string(REPLACE "/" ";" LIST ${PROJECT_BINARY_DIR})
-		list(LENGTH LIST len)
-		MATH(EXPR test "${len} - 1")
-		LIST(GET LIST ${test} last)
-	
-		SET(CONTAINER_NAME ${DEPLOY_NAME})
-		SET(PROGRAM_NAME ${LAUNCHER})
-		SET(PROJECT_ATTR ${last})
-		SET(WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/")
-		
-		CONFIGURE_FILE(${CELIX_CMAKE_DIRECTORY}/cmake_celix/RunConfig.in ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/${DEPLOY_NAME}.launch @ONLY)
-	ENDIF(UNIX)
-	
-	IF(WIN32)
-		GET_FILENAME_COMPONENT(zlib_path ${ZLIB_LIBRARY} PATH)
-		GET_FILENAME_COMPONENT(curl_path ${CURL_LIBRARY} PATH)
-		
-		IF(CELIX_FOUND)
-			SET(celixutils_path "${CELIX_FRAMEWORK_LIBRARY}/utils/${CMAKE_BUILD_TYPE}")
-			SET(celixframework_path "${CELIX_FRAMEWORK_LIBRARY}/framework/${CMAKE_BUILD_TYPE}")
-		ELSE(CELIX_FOUND)
-			SET(celixutils_path "${PROJECT_BINARY_DIR}/utils/${CMAKE_BUILD_TYPE}")
-			SET(celixframework_path "${PROJECT_BINARY_DIR}/framework/${CMAKE_BUILD_TYPE}")
-		ENDIF(CELIX_FOUND)
-		
-		SET(PATH "%PATH%;${zlib_path};${curl_path};${celixutils_path};${celixframework_path}")
-		
-		CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/vcxproj.user.in ${CMAKE_CURRENT_BINARY_DIR}/deploy_${DEPLOY_NAME}.vcxproj.user @ONLY)
-	ENDIF(WIN32)
-ENDMACRO(deploy)
-
-# macro for scanning subdirectories for deploy.cmake files
-# these files contain the deployment of targets
-MACRO(deploy_targets)
-    FILE(GLOB_RECURSE new_list deploy.cmake)
-    SET(dir_list "")
-    FOREACH(file_path ${new_list})
-        SET(dir_list ${dir_list} ${file_path})
-    ENDFOREACH()
-    LIST(REMOVE_DUPLICATES dir_list)
-    FOREACH(file_path ${dir_list})
-		include(${file_path})
-	ENDFOREACH()
-ENDMACRO()
-
-MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
-  SET(DEFAULT_ARGS)
-  FOREACH(arg_name ${arg_names})    
-    SET(${prefix}_${arg_name})
-  ENDFOREACH(arg_name)
-  FOREACH(option ${option_names})
-    SET(${prefix}_${option} FALSE)
-  ENDFOREACH(option)
-
-  SET(current_arg_name DEFAULT_ARGS)
-  SET(current_arg_list)
-  FOREACH(arg ${ARGN})            
-    SET(larg_names ${arg_names})    
-    LIST(FIND larg_names "${arg}" is_arg_name)                   
-    IF (is_arg_name GREATER -1)
-      SET(${prefix}_${current_arg_name} ${current_arg_list})
-      SET(current_arg_name ${arg})
-      SET(current_arg_list)
-    ELSE (is_arg_name GREATER -1)
-      SET(loption_names ${option_names})    
-      LIST(FIND loption_names "${arg}" is_option)            
-      IF (is_option GREATER -1)
-	     SET(${prefix}_${arg} TRUE)
-      ELSE (is_option GREATER -1)
-	     SET(current_arg_list ${current_arg_list} ${arg})
-      ENDIF (is_option GREATER -1)
-    ENDIF (is_arg_name GREATER -1)
-  ENDFOREACH(arg)
-  SET(${prefix}_${current_arg_name} ${current_arg_list})
-ENDMACRO(PARSE_ARGUMENTS)
+    file(GENERATE 
+        OUTPUT "${DEPLOY_LOCATION}/config.properties.tmp"
+        CONTENT "cosgi.auto.start.1=$<JOIN:$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_BUNDLES>, >
+$<JOIN:$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_PROPERTIES>,
+>
+"
+    )
+
+    file(GENERATE
+        OUTPUT "${DEPLOY_LOCATION}/config.properties"
+        INPUT "${DEPLOY_LOCATION}/config.properties.tmp"
+    )
+
+    file(GENERATE
+        OUTPUT ${DEPLOY_LOCATION}/run.sh
+        CONTENT "export DYLD_LIBRARY_PATH=$<TARGET_FILE_DIR:celix_framework>:$<TARGET_FILE_DIR:celix_utils>:$<TARGET_FILE_DIR:celix_dfi>
+$<TARGET_FILE:celix> $@
+"
+    )
+
+    #TODO eclipse launcher file
+    #####
+
+    ##### Deploy Target Properties #####
+    #internal use
+    set_target_properties(${DEPLOY_TARGET} PROPERTIES "DEPLOY_TARGET_DEPS" "") #bundles to deploy.
+    set_target_properties(${DEPLOY_TARGET} PROPERTIES "DEPLOY_BUNDLES" "") #bundles to deploy.
+    set_target_properties(${DEPLOY_TARGET} PROPERTIES "DEPLOY_COPY_BUNDLES" ${DEPLOY_COPY}) #copy bundles in bundle dir or link using abs paths.
+
+    #deploy specific
+    set_target_properties(${DEPLOY_TARGET} PROPERTIES "DEPLOY_LOCATION" ${DEPLOY_LOCATION})
+    set_target_properties(${DEPLOY_TARGET} PROPERTIES "DEPLOY_PROPERTIES" "")
+    #####
+
+    deploy_bundles(${DEPLOY_TARGET} ${DEPLOY_BUNDLES})
+    deploy_properties(${DEPLOY_TARGET} ${DEPLOY_PROPERTIES})
+endfunction()
+
+#NOTE can be used for drivers/proxies/endpoints bundle dirs
+function(deploy_bundles_dir)
+    list(GET ARGN 0 DEPLOY_NAME)
+    list(REMOVE_AT ARGN 0)
+
+    set(OPTIONS)
+    set(ONE_VAL_ARGS DIR_NAME)
+    set(MULTI_VAL_ARGS BUNDLES)
+    cmake_parse_arguments(BD "${OPTIONS}" "${ONE_VAL_ARGS}" "${MULTI_VAL_ARGS}" ${ARGN})
+
+    if(NOT BD_DIR_NAME)
+        message(FATAL_ERROR "Missing mandatory DIR_NAME argument")
+    endif()
+
+    get_target_property(DEPLOY_LOC ${DEPLOY_NAME} "DEPLOY_LOCATION")
+    get_target_property(DEPS ${DEPLOY_NAME} "DEPLOY_TARGET_DEPS")
+
+    foreach(BUNDLE IN ITEMS ${BD_BUNDLES})
+        set(OUT "${DEPLOY_LOC}/${BD_DIR_NAME}/${BUNDLE}.zip")
+        list(APPEND DEPS "${OUT}")
+
+        if (IS_ABSOLUTE ${BUNDLE} AND EXISTS ${BUNDLE})
+            add_custom_command(OUTPUT ${OUT}
+                COMMAND ${CMAKE_COMMAND} -E copy_if_different ${BUNDLE} ${OUT}
+            )
+        else()
+            add_custom_command(OUTPUT ${OUT}
+                COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_PROPERTY:${BUNDLE},BUNDLE_FILE>" ${OUT}
+                DEPENDS ${BUNDLE}
+                #DEPENDS "$<TARGET_PROPERTY:${BUNDLE},BUNDLE_FILE>"
+            )
+        endif()
+    endforeach()
+
+    set_target_properties(${DEPLOY_NAME} PROPERTIES "DEPLOY_TARGET_DEPS" "${DEPS}")
+endfunction()
+
+function(deploy_bundles)
+    #0 is deploy TARGET
+    #1..n is bundles
+    list(GET ARGN 0 DEPLOY_NAME)
+    list(REMOVE_AT ARGN 0)
+
+    get_target_property(BUNDLES ${DEPLOY_NAME} "DEPLOY_BUNDLES")
+    get_target_property(COPY ${DEPLOY_NAME} "DEPLOY_COPY_BUNDLES")
+
+    foreach(BUNDLE IN ITEMS ${ARGN})
+           if(COPY)
+                if(IS_ABSOLUTE ${BUNDLE} AND EXISTS ${BUNDLE})
+                    get_filename_component(BUNDLE_FILENAME ${BUNDLE} NAME) 
+                    list(APPEND BUNDLES ${BUNDLE_FILENAME})
+                else() #assuming target
+                    list(APPEND BUNDLES "bundles/${BUNDLE}.zip")
+                endif()
+           else()
+                if(IS_ABSOLUTE ${BUNDLE} AND EXISTS ${BUNDLE})
+                    list(APPEND BUNDLES ${BUNDLE})
+                else() #assuming target
+                    list(APPEND BUNDLES "$<TARGET_PROPERTY:${BUNDLE},BUNDLE_FILE>")
+                endif()
+           endif()
+   endforeach()
+
+   if(DEPLOY_COPY) 
+       deploy_bundles_dir(${DEPLOY_NAME} DIR_NAME bundles BUNDLES ${ARGN})
+   endif()
+
+   set_target_properties(${DEPLOY_NAME} PROPERTIES "DEPLOY_BUNDLES" "${BUNDLES}")
+endfunction()
+
+function(deploy_properties)
+    #0 is deploy TARGET
+    #1..n is bundles
+    list(GET ARGN 0 DEPLOY_NAME)
+    list(REMOVE_AT ARGN 0)
+
+    get_target_property(PROPS ${DEPLOY_NAME} "DEPLOY_PROPERTIES")
+
+    foreach(PROP IN ITEMS ${ARGN})
+        list(APPEND PROPS ${PROP})
+    endforeach()
 
+   set_target_properties(${DEPLOY_NAME} PROPERTIES "DEPLOY_PROPERTIES" "${PROPS}")
+endfunction()

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/cmake/cmake_celix/PackagingLegacy.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/PackagingLegacy.cmake b/cmake/cmake_celix/PackagingLegacy.cmake
new file mode 100644
index 0000000..58667cd
--- /dev/null
+++ b/cmake/cmake_celix/PackagingLegacy.cmake
@@ -0,0 +1,108 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+macro(SET_HEADER NAME VALUE)
+    SET(BUNDLE_${NAME} ${VALUE})
+endmacro()
+
+macro(SET_HEADERS HEADERS)
+    if(NOT HEADERS)
+        set(BUNDLE_HEADERS ${HEADERS})
+    else()
+        list(APPEND BUNDLE_HEADERS ${HEADERS})
+    endif()
+endmacro()
+
+function(bundles)
+    list(GET ARGN 0 BUNDLE)
+    list(REMOVE_AT ARGN 0)
+
+    set(OPTIONS INSTALL )
+    set(ONE_VAL_ARGS DESTINATION)
+    set(MULTI_VAL_ARGS SOURCES LINK_LIBRARIES EXPORT_VERSION ACTIVATOR PRIVATE_LIBRARIES EXPORT_LIBRARIES IMPORT_LIBRARIES FILES DIRECTORIES INSTALL_FILES)
+    cmake_parse_arguments(BUNDLE "${OPTIONS}" "${ONE_VAL_ARGS}" "${MULTI_VAL_ARGS}" ${ARGN}) 
+    #original PARSE_ARGUMENTS(_BUNDLE "SOURCES;LINK_LIBRARIES;EXPORT_VERSION;ACTIVATOR;PRIVATE_LIBRARIES;EXPORT_LIBRARIES;IMPORT_LIBRARIES;FILES;DIRECTORIES;INSTALL_FILES" "PRIVATE;EXPORT;INSTALL" ${ARGN})
+
+    if(BUNDLE_SOURCES) 
+        add_bundle(${BUNDLE} SOURCES ${BUNDLE_SOURCES} VERSION 0.0.0) 
+    else()
+        add_bundle(${BUNDLE} ACTIVATOR ${BUNDLE_ACTIVATOR} VERSION 0.0.0)
+    endif()
+
+    if(BUNDLE_FILES)
+        bundle_files(${BUNDLE} ${BUNDLE_FILES} DESTINATION .)
+    if(BUNDLE_EXPORT_VERSION) 
+        message(WARNING "EXPORT_VERSION argument not supported")
+    endif()
+    if(BUNDLE_LINK_LIBRARIES) 
+        target_link_libraries(${BUNDLE} ${BUNDLE_LINK_LIBRARIES})
+    endif()
+    if(BUNDLE_PRIVATE_LIBRARIES) 
+        bundle_private_libs(${BUNDLE} ${BUNDLE_PRIVATE_LIBS})
+    endif()
+    if(BUNDLE_EXPORT_LIBRARIES)
+        bundle_export_libs(${BUNDLE} ${BUNDLE_PRIVATE_LIBS})
+    endif()
+    if(BUNDLE_IMPORT_LIBRARIES)
+        message(FATAL_ERROR "TODO IMPORT LIBRARIES")
+    endif()
+    if(BUNDLE_DIRECTORIES)
+        message(WARNING "DIRECTORIES argument not supported")
+    endif()
+    if(BUNDLE_INSTALL_FILES)
+        message(WARNING "INSTALL_FILES argument not supported")
+    endif()
+    if(BUNDLE_INSTALL)
+        bundle_install(${BUNDLE})
+    endif()
+
+    if(BUNDLE_NAME)
+        bundle_name(${BUNDLE} ${BUNDLE_NAME})
+    endif()
+    if(BUNDLE_SYMBOLICNAME)
+        bundle_symbolic_name(${BUNDLE} ${BUNDLE_SYMBOLICNAME})
+    endif()
+    if(BUNDLE_VERSION)
+        bundle_version(${BUNDLE} ${BUNDLE_VERSION})
+    endif()
+    if (BUNDLE_HEADERS)
+        bundle_headers(${BUNDLE} ${BUNDLE_HEADERS})
+    endif()
+
+    message(STATUS "bundle function is deprecated. update to add_bundle")
+endfunction()
+
+
+function(deploy)
+    list(GET ARGN 0 DEPLOY)
+    list(REMOVE_AT ARGN 0)
+
+    set(OPTIONS )
+    set(ONE_VAL_ARGS )
+    set(MULTI_VAL_ARGS BUNDLES DRIVERS ENDPOINTS PROPERTIES)
+    cmake_parse_arguments(DEPLOY "${OPTIONS}" "${ONE_VAL_ARGS}" "${MULTI_VAL_ARGS}" ${ARGN}) 
+    #original    PARSE_ARGUMENTS(DEPLOY "BUNDLES;DRIVERS;ENDPOINTS;PROPERTIES" "" ${ARGN})                                                                                                                                      
+
+    add_deploy(${DEPLOY} BUNDLES ${DEPLOY_BUNDLES} PROPERTIES ${DEPLOY_PROPERTIES})
+    if(DEPLOY_DRIVERS)
+        deploy_bundles_dir(${DEPLOY} DIR_NAME "drivers" BUNDLES ${DEPLOY_DRIVERS})
+    endif()
+    if(DEPLOY_ENDPOINTS)
+        deploy_bundles_dir(${DEPLOY} DIR_NAME "endpoints" BUNDLES ${DEPLOY_ENDPOINTS})
+    endif()
+    message(STATUS "deploy function is deprecated. update to add_deploy")
+endfunction()

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/cmake/cmake_celix/config.properties.in
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/config.properties.in b/cmake/cmake_celix/config.properties.in
deleted file mode 100644
index 30dd9f5..0000000
--- a/cmake/cmake_celix/config.properties.in
+++ /dev/null
@@ -1,2 +0,0 @@
-cosgi.auto.start.1=@BUNDLES@
-@PROPERTIES@

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/cmake/cmake_celix/installation.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/installation.cmake b/cmake/cmake_celix/installation.cmake
deleted file mode 100644
index 3be7c37..0000000
--- a/cmake/cmake_celix/installation.cmake
+++ /dev/null
@@ -1,30 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-SET(CMAKE_INSTALL_COMPONENT "Framework")
-GET_FILENAME_COMPONENT(__cmake_path ${CMAKE_COMMAND} PATH)
-FIND_PROGRAM(CPACK_COMMAND cpack ${__cmake_path})
-MESSAGE(STATUS "Found CPack at: ${CPACK_COMMAND}")
-IF(NOT CPACK_COMMAND)
-	MESSAGE(FATAL_ERROR "Need CPack!")
-ENDIF(NOT CPACK_COMMAND)
-
-CONFIGURE_FILE(${CMAKE_CURRENT_LIST_DIR}/CPackConfig-Installation.in CPackConfig-Installation.cmake @ONLY)
-ADD_CUSTOM_TARGET(package-release
-  ${CPACK_COMMAND} --config "CPackConfig-Installation.cmake"
-  )
-  

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/cmake/cmake_celix/manifest.in
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/manifest.in b/cmake/cmake_celix/manifest.in
deleted file mode 100644
index d1d9c5c..0000000
--- a/cmake/cmake_celix/manifest.in
+++ /dev/null
@@ -1,2 +0,0 @@
-Bundle-SymbolicName: @BUNDLE_SYMBOLICNAME@
-@INT_BUNDLE_EXTRAHEADER@

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/cmake/cmake_celix/run.sh.in
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/run.sh.in b/cmake/cmake_celix/run.sh.in
deleted file mode 100644
index 606f0e6..0000000
--- a/cmake/cmake_celix/run.sh.in
+++ /dev/null
@@ -1,2 +0,0 @@
-export @LIBRARY_PATH@=@FW_PATH@:@UTILS_PATH@
-@LAUNCHER@ $@

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/config_admin/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/config_admin/CMakeLists.txt b/config_admin/CMakeLists.txt
index 8075c31..81040db 100644
--- a/config_admin/CMakeLists.txt
+++ b/config_admin/CMakeLists.txt
@@ -22,4 +22,7 @@ if (CONFIG_ADMIN)
 	add_subdirectory(service)
 	add_subdirectory(examples)
 
+	add_deploy("config_admin1" BUNDLES config_admin shell shell_tui log_service log_writer example_test)
+	add_deploy("config_admin2" BUNDLES config_admin shell shell_tui log_service log_writer bundle_managed_service bundle_configuring)
+
 endif (CONFIG_ADMIN)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/config_admin/deploy.cmake
----------------------------------------------------------------------
diff --git a/config_admin/deploy.cmake b/config_admin/deploy.cmake
deleted file mode 100644
index d1a769d..0000000
--- a/config_admin/deploy.cmake
+++ /dev/null
@@ -1,24 +0,0 @@
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-if (CONFIG_ADMIN)
- 	
-	deploy("config_admin1" BUNDLES config_admin shell shell_tui log_service log_writer example_test)
-	deploy("config_admin2" BUNDLES config_admin shell shell_tui log_service log_writer bundle_managed_service bundle_configuring)
-
-endif (CONFIG_ADMIN)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/config_admin/examples/example_test/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/config_admin/examples/example_test/CMakeLists.txt b/config_admin/examples/example_test/CMakeLists.txt
index 5529d45..810f381 100644
--- a/config_admin/examples/example_test/CMakeLists.txt
+++ b/config_admin/examples/example_test/CMakeLists.txt
@@ -21,10 +21,9 @@ include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/config_admin/service/public/include")
 include_directories("private/include")
 
-SET(BUNDLE_SYMBOLICNAME "example_test")
-SET(BUNDLE_VERSION "0.1.0")
-
-bundle(example_test SOURCES 
+add_bundle(example_test
+    VERSION 0.1.0
+    SOURCES
 	private/src/activator
 	private/src/example_managed_service_impl
 )

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/config_admin/examples/example_test2/bundle_configuring/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/config_admin/examples/example_test2/bundle_configuring/CMakeLists.txt b/config_admin/examples/example_test2/bundle_configuring/CMakeLists.txt
index 344ace2..915a418 100644
--- a/config_admin/examples/example_test2/bundle_configuring/CMakeLists.txt
+++ b/config_admin/examples/example_test2/bundle_configuring/CMakeLists.txt
@@ -20,11 +20,9 @@ include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/config_admin/service/public/include")
 
-SET(BUNDLE_SYMBOLICNAME  "bundle_configuraring")
-SET(BUNDLE_VERSION "0.1.0")
-
-bundle(bundle_configuring SOURCES 
+add_bundle(bundle_configuring SOURCES
 	private/src/activator
+    VERSION 0.1.0
 )
 
 target_link_libraries(bundle_configuring celix_framework celix_utils config_admin ${APR_LIBRARY})

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/config_admin/examples/example_test2/bundle_managed_service/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/config_admin/examples/example_test2/bundle_managed_service/CMakeLists.txt b/config_admin/examples/example_test2/bundle_managed_service/CMakeLists.txt
index 3de8d69..434496a 100644
--- a/config_admin/examples/example_test2/bundle_managed_service/CMakeLists.txt
+++ b/config_admin/examples/example_test2/bundle_managed_service/CMakeLists.txt
@@ -21,12 +21,10 @@ include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/config_admin/service/public/include")
 include_directories("private/include")
 
-SET(BUNDLE_SYMBOLICNAME "bundle_managed_service")
-SET(BUNDLE_VERSION "0.1.0")
-
-bundle(bundle_managed_service SOURCES 
+add_bundle(bundle_managed_service SOURCES
 	private/src/activator
 	private/src/example_managed_service_impl
+    VERSION 0.1.0
 )
 
 target_link_libraries(bundle_managed_service celix_framework celix_utils config_admin ${APR_LIBRARY})

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/config_admin/service/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/config_admin/service/CMakeLists.txt b/config_admin/service/CMakeLists.txt
index 0dfd419..e194081 100644
--- a/config_admin/service/CMakeLists.txt
+++ b/config_admin/service/CMakeLists.txt
@@ -20,11 +20,10 @@ include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
 include_directories("public/include")
 include_directories("private/include")
-
-SET(BUNDLE_SYMBOLICNAME "config_admin")
-SET(BUNDLE_VERSION "0.0.1")
  		
-bundle(config_admin SOURCES 
+add_bundle(config_admin 
+    VERSION 0.0.1
+    SOURCES
 	private/src/activator 
 	private/src/configuration_admin_factory
 	private/src/configuration_admin_impl

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/dependency_manager/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/dependency_manager/CMakeLists.txt b/dependency_manager/CMakeLists.txt
index 7e86931..48214b0 100644
--- a/dependency_manager/CMakeLists.txt
+++ b/dependency_manager/CMakeLists.txt
@@ -17,9 +17,7 @@
 
 celix_subproject(DEPENDENCY_MANAGER "Option to build the dependency manager static library" ON DEPS framework)
 if (DEPENDENCY_MANAGER)
-    SET(BUNDLE_SYMBOLICNAME "apache_celix_dm_shell")
-    SET(BUNDLE_VERSION "0.0.1")
-    SET(BUNDLE_NAME "Apache Celix DM Shell commands")
+
     # Add -fPIC for x86_64 Unix platforms; this lib will be linked to a shared lib
     if(UNIX AND NOT WIN32)
       find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
@@ -31,13 +29,19 @@ if (DEPENDENCY_MANAGER)
         endif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
       endif(CMAKE_UNAME)
     endif(UNIX AND NOT WIN32)
-    
-    CELIX_ADD_COMPONENT(dependency_manager
-    	DISPLAY_NAME Dependency Manager
-        DESCRIPTION "The Apache Celix dependency manager (static) library"
-        GROUP all
-    )
-    bundle(dm_shell SOURCES
+
+    #TODO check if something needs to be done?
+    #CELIX_ADD_COMPONENT(dependency_manager
+    #	DISPLAY_NAME Dependency Manager
+    #    DESCRIPTION "The Apache Celix dependency manager (static) library"
+    #    GROUP all
+    #)
+
+    add_bundle(dm_shell
+        SYMBOLIC_NAME "apche_celix_dm_shell"
+        VERSION "0.0.1"
+        NAME "Apache Celix DM Shell Commands"
+        SOURCES
             private/src/dm_shell_activator
             private/src/dm_shell_list_command
     )
@@ -66,9 +70,10 @@ if (DEPENDENCY_MANAGER)
             public/include/dm_service_dependency.h
             public/include/dm_info.h
 		DESTINATION 
-			include/celix/dependency_manager
-		COMPONENT 
-			dependency_manager
+	    	include/celix/dependency_manager
+	    #TODO install componnent
+		#COMPONENT
+		#	dependency_manager
 	)
     install_bundle(dm_shell)
     install(TARGETS dependency_manager DESTINATION lib COMPONENT dependency_manager)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/deployment_admin/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/deployment_admin/CMakeLists.txt b/deployment_admin/CMakeLists.txt
index 00dfa13..d299970 100644
--- a/deployment_admin/CMakeLists.txt
+++ b/deployment_admin/CMakeLists.txt
@@ -22,38 +22,39 @@ if (DEPLOYMENT_ADMIN)
     find_package(UUID REQUIRED)
 
     add_definitions(-DUSE_FILE32API)
-    
-    SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_deployment_admin")
-    SET(BUNDLE_VERSION "0.0.1")
-	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")
     
-    bundle(deployment_admin SOURCES
-    	private/src/deployment_package 
-    	private/src/deployment_admin
-    	private/src/deployment_admin_activator
-    	private/src/ioapi
-    	private/src/miniunz
-    	private/src/unzip
-    	private/src/log
-    	private/src/log_store
-    	private/src/log_sync
-        
-        private/include/deployment_admin.h
-        private/include/deployment_package.h
-        private/include/ioapi.h
-        private/include/log.h
-        private/include/log_event.h
-        private/include/log_store.h
-        private/include/log_sync.h
-        private/include/miniunz.h
-        private/include/unzip.h
+    add_bundle(deployment_admin
+        SYMBOLIC_NAME "apache_celix_deployment_admin"
+        VERSION "0.0.1"
+        NAME "Apache Celix Deployment Admin"
+        SOURCES
+            private/src/deployment_package
+            private/src/deployment_admin
+            private/src/deployment_admin_activator
+            private/src/ioapi
+            private/src/miniunz
+            private/src/unzip
+            private/src/log
+            private/src/log_store
+            private/src/log_sync
+
+            private/include/deployment_admin.h
+            private/include/deployment_package.h
+            private/include/ioapi.h
+            private/include/log.h
+            private/include/log_event.h
+            private/include/log_store.h
+            private/include/log_sync.h
+            private/include/miniunz.h
+            private/include/unzip.h
     )
+
     
     install_bundle(deployment_admin
     	HEADERS
@@ -61,4 +62,13 @@ if (DEPLOYMENT_ADMIN)
 	)
     
     target_link_libraries(deployment_admin celix_framework ${CURL_LIBRARIES})
+
+
+    add_deploy(deployment-admin
+        BUNDLES deployment_admin shell shell_tui log_service log_writer
+        PROPERTIES
+    		"deployment_admin_url=http://localhost:8080"
+    		"deployment_admin_identification=celix"
+    		"org.osgi.framework.storage.clean=onFirstInit"
+    )
 endif (DEPLOYMENT_ADMIN)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/deployment_admin/deploy.cmake
----------------------------------------------------------------------
diff --git a/deployment_admin/deploy.cmake b/deployment_admin/deploy.cmake
deleted file mode 100644
index 6ab6e3e..0000000
--- a/deployment_admin/deploy.cmake
+++ /dev/null
@@ -1,24 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-is_enabled(DEPLOYMENT_ADMIN)
-if (DEPLOYMENT_ADMIN)
-	deploy("deployment-admin" BUNDLES deployment_admin shell shell_tui log_service log_writer PROPERTIES 
-		"deployment_admin_url=http://localhost:8080"
-		"deployment_admin_identification=celix"
-		"org.osgi.framework.storage.clean=onFirstInit"
-	)
-endif (DEPLOYMENT_ADMIN)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/device_access/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/CMakeLists.txt b/device_access/CMakeLists.txt
index e707df0..63576f6 100644
--- a/device_access/CMakeLists.txt
+++ b/device_access/CMakeLists.txt
@@ -21,5 +21,5 @@ if(DEVICE_ACCESS)
     add_subdirectory(device_access)
     add_subdirectory(driver_locator)   
     add_subdirectory(example)
-    
+
 endif(DEVICE_ACCESS)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/device_access/deploy.cmake
----------------------------------------------------------------------
diff --git a/device_access/deploy.cmake b/device_access/deploy.cmake
deleted file mode 100644
index b335dc7..0000000
--- a/device_access/deploy.cmake
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-is_enabled(DEVICE_ACCESS_EXAMPLE)
-if(DEVICE_ACCESS_EXAMPLE)
-	deploy("device_access_example" BUNDLES device_manager driver_locator shell shell_tui log_service base_driver
-	                               DRIVERS word_consumingdriver char_refiningdriver)
-endif(DEVICE_ACCESS_EXAMPLE)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/device_access/device_access/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/device_access/CMakeLists.txt b/device_access/device_access/CMakeLists.txt
index 03e7817..f3eec60 100644
--- a/device_access/device_access/CMakeLists.txt
+++ b/device_access/device_access/CMakeLists.txt
@@ -15,23 +15,23 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_device_manager")
-SET(BUNDLE_VERSION "0.0.1")
-SET_HEADERS("Bundle-Name: Apache Celix Device Access Device Manager") 
+add_bundle(device_manager
+	SYMBOLIC_NAME "apache_celix_device_manager"
+	VERSION "0.0.1"
+	NAME "Apache Celix Device Access Device Manager"
+	SOURCES
+		private/src/activator
+		private/src/driver_attributes
+		private/src/device_manager
+		private/src/driver_loader
+		private/src/driver_matcher
 
-bundle(device_manager SOURCES 
-	private/src/activator
-	private/src/driver_attributes 
-	private/src/device_manager
-	private/src/driver_loader
-	private/src/driver_matcher
-    
-    ${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
-    
-    private/include/device_manager.h
-    private/include/driver_attributes.h
-    private/include/driver_loader.h
-    private/include/driver_matcher.h
+		${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
+
+		private/include/device_manager.h
+		private/include/driver_attributes.h
+		private/include/driver_loader.h
+		private/include/driver_matcher.h
 )
 
 install_bundle(device_manager

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/device_access/driver_locator/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/driver_locator/CMakeLists.txt b/device_access/driver_locator/CMakeLists.txt
index f47696a..12b23d6 100644
--- a/device_access/driver_locator/CMakeLists.txt
+++ b/device_access/driver_locator/CMakeLists.txt
@@ -15,13 +15,13 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_driver_locator")
-SET(BUNDLE_VERSION "0.0.1")
-SET_HEADERS("Bundle-Name: Apache Celix Device Access Driver Locator")
-
-bundle(driver_locator SOURCES 
-	private/src/activator 
-	private/src/driver_locator
+add_bundle(driver_locator
+	SYMBOLIC_NAME "apache_celix_driver_locator"
+	VERSION "0.0.1"
+	NAME "Apache Celix Device Access Driver Locator"
+	SOURCES
+		private/src/activator
+		private/src/driver_locator
 )
 
 install_bundle(driver_locator)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/device_access/example/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/example/CMakeLists.txt b/device_access/example/CMakeLists.txt
index dc888a6..acf16f7 100644
--- a/device_access/example/CMakeLists.txt
+++ b/device_access/example/CMakeLists.txt
@@ -20,4 +20,13 @@ if(DEVICE_ACCESS_EXAMPLE)
 	add_subdirectory(base_driver)
 	add_subdirectory(consuming_driver)
 	add_subdirectory(refining_driver)
-endif(DEVICE_ACCESS_EXAMPLE)
\ No newline at end of file
+
+    add_deploy(device_access_example
+        BUNDLES device_manager driver_locator shell shell_tui log_service base_driver
+    )
+
+    deploy_bundles_dir(device_access_example
+            DIR_NAME "DRIVERS"
+            BUNDLES word_consumingdriver char_refiningdriver
+    )
+endif(DEVICE_ACCESS_EXAMPLE)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/device_access/example/base_driver/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/example/base_driver/CMakeLists.txt b/device_access/example/base_driver/CMakeLists.txt
index 82b916e..c354d3b 100644
--- a/device_access/example/base_driver/CMakeLists.txt
+++ b/device_access/example/base_driver/CMakeLists.txt
@@ -15,13 +15,13 @@
 # specific language governing permissions and limitations
 # under the License.
 
-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")
-
-bundle(base_driver SOURCES 
-	private/src/activator 
-	private/src/base_driver
+add_bundle(base_driver
+ 	SYMBOLIC_NAME "apache_celix_base_driver_example"
+ 	VERSION "0.0.1"
+ 	NAME "Apache Celix Device Access Base Driver Example"
+	SOURCES
+		private/src/activator
+		private/src/base_driver
 )
 
 include_directories(${PROJECT_SOURCE_DIR}/device_access/device_access/public/include)


[31/42] celix git commit: CELIX-335: Change make install-all -> make install for travis config

Posted by pn...@apache.org.
CELIX-335: Change make install-all -> make install for travis config


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/da78d305
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/da78d305
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/da78d305

Branch: refs/heads/develop
Commit: da78d305a734708da4890b5ecfb176d57babdaf0
Parents: a43d78b
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Tue Jan 26 09:09:59 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Tue Jan 26 09:09:59 2016 +0100

----------------------------------------------------------------------
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/da78d305/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 5ff6b65..905c714 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -83,7 +83,7 @@ script:
     - if [ "$CC" = "gcc" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then export BUILD_OPTS="${BUILD_OPTS} -DENABLE_CODE_COVERAGE=ON"; fi
     - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ -z "$ANDROID" ]; then cmake ${BUILD_OPTIONS} ${BUILD_OPTIONS_LINUX} -DBUILD_FRAMEWORK_TESTS=ON -DBUILD_UTILS-TESTS=ON -DENABLE_TESTING=ON ${BUILD_OPTS} -DCMAKE_INSTALL_PREFIX=../install ..; fi
     - if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake ${BUILD_OPTIONS} ${BUILD_OPTIONS_OSX} -DBUILD_FRAMEWORK_TESTS=ON -DBUILD_UTILS-TESTS=ON -DENABLE_TESTING=ON -DFFI_LIBRARY=/usr/local/opt/libffi/lib/libffi.dylib ${BUILD_OPTS} -DCMAKE_INSTALL_PREFIX=../install ..; fi
-    - if [ -z "$ANDROID" ]; then make all && make deploy && make install-all; else cd .. && docker build -t celixandroid - < Dockerfile.Android ; fi
+    - if [ -z "$ANDROID" ]; then make all && make deploy && make install; else cd .. && docker build -t celixandroid - < Dockerfile.Android ; fi
     - if [ -z "$ANDROID" ]; then export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH:`pwd`/utils:`pwd`/framework:`pwd`/dfi && make test ARGS="-V"; else docker run celixandroid; fi 
 
 after_success:


[10/42] celix git commit: CELIX-335: Update travis config to use make install instead of make install-all

Posted by pn...@apache.org.
CELIX-335: Update travis config to use make install instead of make install-all


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/6acd0b96
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/6acd0b96
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/6acd0b96

Branch: refs/heads/develop
Commit: 6acd0b96917ab177454c68c0bdb8d05ac187399f
Parents: c8920f2
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Fri Jan 8 10:40:12 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Fri Jan 8 10:40:12 2016 +0100

----------------------------------------------------------------------
 .travis.yml | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/6acd0b96/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 264f1a4..22e77b0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,14 +1,17 @@
 language: c
 
-dist: trusty
-
-os:
-    - linux
-    - osx
-
-compiler:
-    - gcc
-    - clang
+matrix:
+    include:
+        - os: linux
+          dist: trustry
+          compiler: gcc
+        - os: linux
+          dist: trustry
+          compiler: clang
+        - os: osx
+          compiler: gcc
+        - os: osx
+          compiler: clang
 
 before_install:
   - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq update && sudo apt-get install -y uuid-dev libxml2-dev lcov libffi-dev; fi
@@ -36,7 +39,7 @@ script:
     - if [ "$CC" = "gcc" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then export BUILD_OPTS="${BUILD_OPTS} -DENABLE_CODE_COVERAGE=ON"; fi
     - if [ "$TRAVIS_OS_NAME" = "linux" ]; then cmake -DBUILD_CONFIG_ADMIN=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_DFI=ON -DBUILD_DEPLOYMENT_ADMIN=ON -DBUILD_DEPENDENCY_MANAGER=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 -DBUILD_FRAMEWORK_TESTS=ON -DBUILD_UTILS-TESTS=ON -DENABLE_TESTING=ON ${BUILD_OPTS} -DCMAKE_INSTALL_PREFIX=../install ..; fi
     - if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake -DBUILD_CONFIG_ADMIN=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_DFI=ON -DBUILD_DEPLOYMENT_ADMIN=ON -DBUILD_DEPENDENCY_MANAGER=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=OFF -DBUILD_RSA_EXAMPLES=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_SHM=OFF -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 -DBUILD_FRAMEWORK_TESTS=ON -DBUILD_UTILS-TESTS=ON -DENABLE_TESTING=ON -DFFI_LIBRARY=/usr/local/opt/libffi/lib/libffi.dylib ${BUILD_OPTS} -DCMAKE_INSTALL_PREFIX=../install ..; fi
-    - make all && make deploy && make install-all
+    - make && make install
     - export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH:`pwd`/utils:`pwd`/framework:`pwd`/dfi && make test ARGS="-V" 
 
 after_success:


[15/42] celix git commit: CElIX-335: Revert to static depenency manager ussage

Posted by pn...@apache.org.
CElIX-335: Revert to static depenency manager ussage


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/9c7892b0
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/9c7892b0
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/9c7892b0

Branch: refs/heads/develop
Commit: 9c7892b0bbdf9a1e03915df495ea39af8b2077cf
Parents: 9ba259e
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Mon Jan 11 20:06:34 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Mon Jan 11 20:06:34 2016 +0100

----------------------------------------------------------------------
 .travis.yml                                     |  2 +-
 dependency_manager/CMakeLists.txt               | 22 +++++-----
 .../private/src/dm_activator_base.c             | 45 --------------------
 examples/dm_example/phase1/CMakeLists.txt       | 20 ++++++---
 examples/dm_example/phase2a/CMakeLists.txt      | 12 +++---
 examples/dm_example/phase2b/CMakeLists.txt      | 17 +++++---
 examples/dm_example/phase3/CMakeLists.txt       | 17 +++++---
 .../whiteboard/tracker_depman/CMakeLists.txt    |  4 +-
 8 files changed, 56 insertions(+), 83 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/9c7892b0/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 13f37aa..da5f3f0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,7 +18,7 @@ allow_failures:
 
 before_install:
   - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq update && sudo apt-get install -y uuid-dev libxml2-dev lcov libffi-dev; fi
-  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update && brew install lcov libffi && brew link --force libffi; fi
+  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update && brew install lcov libffi cmake && brew link --force libffi; fi
 
 before_script:
     - cmake -version

http://git-wip-us.apache.org/repos/asf/celix/blob/9c7892b0/dependency_manager/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/dependency_manager/CMakeLists.txt b/dependency_manager/CMakeLists.txt
index efd3be7..7a2761b 100644
--- a/dependency_manager/CMakeLists.txt
+++ b/dependency_manager/CMakeLists.txt
@@ -49,21 +49,20 @@ if (DEPENDENCY_MANAGER)
     	private/src/dm_dependency_manager_impl
     )
 
-    add_library(dependency_manager SHARED 
-    	private/src/dm_activator_base 
-    	private/src/dm_component_impl 
-    	private/src/dm_service_dependency
-    	private/src/dm_event
-    	private/src/dm_dependency_manager_impl
-    )
-    set_target_properties(dependency_manager PROPERTIES SOVERSION 1)
-    target_compile_definitions(dependency_manager PRIVATE DM_USE_WEAK_DEFAULT_FUNCTIONS)
+    #add_library(dependency_manager SHARED 
+    #	private/src/dm_activator_base 
+    #	private/src/dm_component_impl 
+    #	private/src/dm_service_dependency
+    # 	private/src/dm_event
+    #   private/src/dm_dependency_manager_impl
+    #)
+    #set_target_properties(dependency_manager PROPERTIES SOVERSION 1)
+    #target_link_libraries(dependency_manager celix_framework -undefined dynamic_load)
 
    	include_directories("public/include")
    	include_directories("private/include")
     include_directories("../shell/public/include")
     include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
-    target_link_libraries(dependency_manager celix_framework)
     target_link_libraries(dependency_manager_static celix_framework)
     
     install(
@@ -79,5 +78,6 @@ if (DEPENDENCY_MANAGER)
 			dependency_manager
 	)
     install_bundle(dm_shell)
-    install(TARGETS dependency_manager dependency_manager_static DESTINATION lib COMPONENT dependency_manager)
+    #install(TARGETS dependency_manager dependency_manager_static DESTINATION lib COMPONENT dependency_manager)
+    install(TARGETS dependency_manager_static DESTINATION lib COMPONENT dependency_manager)
 endif (DEPENDENCY_MANAGER)

http://git-wip-us.apache.org/repos/asf/celix/blob/9c7892b0/dependency_manager/private/src/dm_activator_base.c
----------------------------------------------------------------------
diff --git a/dependency_manager/private/src/dm_activator_base.c b/dependency_manager/private/src/dm_activator_base.c
index 2f86707..c636364 100644
--- a/dependency_manager/private/src/dm_activator_base.c
+++ b/dependency_manager/private/src/dm_activator_base.c
@@ -34,13 +34,7 @@
 #include "bundle_activator.h"
 #include "dm_info.h"
 
-#ifdef DM_USE_WEAK_DEFAULT_FUNCTIONS
-celix_status_t dm_create(bundle_context_pt context, void ** userData) __attribute__((weak));
-celix_status_t dm_init(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) __attribute__((weak));
-celix_status_t dm_destroy(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) __attribute__((weak));
-#else
 #include "dm_activator.h"
-#endif
 
 struct dm_dependency_activator_base {
 	dm_dependency_manager_pt manager;
@@ -135,42 +129,3 @@ celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt contex
 
 	return status;
 }
-
-#ifdef DM_USE_WEAK_DEFAULT_FUNCTIONS
-
-static char * dm_getSymbolicNameFromContext(bundle_context_pt context) {
-    celix_status_t status = CELIX_SUCCESS;
-    bundle_pt bundle = NULL;
-    module_pt module = NULL;
-    char *name =  NULL;
-    if (context != NULL) {
-        status = bundleContext_getBundle(context, &bundle);
-    } 
-    if (status == CELIX_SUCCESS) {
-        status = bundle_getCurrentModule(bundle, &module);
-    }
-    if (status == CELIX_SUCCESS) {
-        status = module_getSymbolicName(module, &name);
-    }
-    return name;
-}
-
-celix_status_t dm_create(bundle_context_pt context, void ** userData) {
-    //NOTE weak version
-    printf("Error: Bundle '%s' should implement the dm_create function\n", dm_getSymbolicNameFromContext(context));
-    *userData = NULL;
-    return CELIX_SUCCESS;
-}
-
-celix_status_t dm_init(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
-    //NOTE weak version
-    printf("Error: Bundle '%s' should implement the dm_init function\n", dm_getSymbolicNameFromContext(context));
-    return CELIX_SUCCESS;
-}
-
-celix_status_t dm_destroy(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
-    //NOTE weak version
-    printf("Error: Bundle '%s' should implement the dm_destroy function\n", dm_getSymbolicNameFromContext(context));
-    return CELIX_SUCCESS;
-}
-#endif

http://git-wip-us.apache.org/repos/asf/celix/blob/9c7892b0/examples/dm_example/phase1/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase1/CMakeLists.txt b/examples/dm_example/phase1/CMakeLists.txt
index b746200..d61fc77 100644
--- a/examples/dm_example/phase1/CMakeLists.txt
+++ b/examples/dm_example/phase1/CMakeLists.txt
@@ -15,18 +15,24 @@
 # specific language governing permissions and limitations
 # under the License.
 
+include_directories(
+        private/include
+        ../services
+)
+
 add_bundle(phase1
-    SYMBOLIC_NAME phase2
+    SYMBOLIC_NAME phase1
     VERSION 0.0.1
     SOURCES
         private/src/phase1_activator
         private/src/phase1_cmp.c
 )
 
-bundle_private_libs(phase1 dependency_manager)
-
-include_directories(
-        private/include
-        ../services
-)
+#Not possbile yet.
+#bundle_private_libs(phase1 dependency_manager)
 
+IF(APPLE)
+target_link_libraries(phase1 celix_framework -Wl,-all_load dependency_manager_static)
+else()
+target_link_libraries(phase1 -Wl,--whole-archive dependency_manager_static -Wl,--no-whole-archive celix_framework)
+ENDIF()

http://git-wip-us.apache.org/repos/asf/celix/blob/9c7892b0/examples/dm_example/phase2a/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase2a/CMakeLists.txt b/examples/dm_example/phase2a/CMakeLists.txt
index d540dc5..0884250 100644
--- a/examples/dm_example/phase2a/CMakeLists.txt
+++ b/examples/dm_example/phase2a/CMakeLists.txt
@@ -15,6 +15,11 @@
 # specific language governing permissions and limitations
 # under the License.
 
+include_directories(
+        private/include
+        ../services
+)
+
 add_bundle(phase2a
         SYMBOLIC_NAME phase2a
         VERSION 0.0.1
@@ -23,13 +28,6 @@ add_bundle(phase2a
                 private/src/phase2a_cmp
 )
 
-include_directories(
-        private/include
-        ../services
-)
-
-# Note as example the phase2a uses the dependency manager as static library. 
-# Some additional linking argument magic is needed to make this work
 IF(APPLE)
 target_link_libraries(phase2a celix_framework -Wl,-all_load dependency_manager_static)
 else()

http://git-wip-us.apache.org/repos/asf/celix/blob/9c7892b0/examples/dm_example/phase2b/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase2b/CMakeLists.txt b/examples/dm_example/phase2b/CMakeLists.txt
index d2d6a2f..5bd2a6e 100644
--- a/examples/dm_example/phase2b/CMakeLists.txt
+++ b/examples/dm_example/phase2b/CMakeLists.txt
@@ -15,6 +15,11 @@
 # specific language governing permissions and limitations
 # under the License.
 
+include_directories(
+        private/include
+        ../services
+)
+
 add_bundle(phase2b
         SYMBOLIC_NAME phase2b
         VERSION 0.0.1
@@ -22,9 +27,11 @@ add_bundle(phase2b
                 private/src/phase2b_activator
                 private/src/phase2b_cmp
 )
-bundle_private_libs(phase2b dependency_manager)
 
-include_directories(
-        private/include
-        ../services
-)
+#bundle_private_libs(phase2b dependency_manager)
+
+IF(APPLE)
+target_link_libraries(phase2b celix_framework -Wl,-all_load dependency_manager_static)
+else()
+target_link_libraries(phase2b -Wl,--whole-archive dependency_manager_static -Wl,--no-whole-archive celix_framework)
+ENDIF()

http://git-wip-us.apache.org/repos/asf/celix/blob/9c7892b0/examples/dm_example/phase3/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase3/CMakeLists.txt b/examples/dm_example/phase3/CMakeLists.txt
index 496a67f..ba195cd 100644
--- a/examples/dm_example/phase3/CMakeLists.txt
+++ b/examples/dm_example/phase3/CMakeLists.txt
@@ -15,6 +15,11 @@
 # specific language governing permissions and limitations
 # under the License.
 
+include_directories(
+        private/include
+        ../services
+)
+
 add_bundle(phase3
         SYMBOLIC_NAME phase3
         VERSION 0.0.1
@@ -22,9 +27,11 @@ add_bundle(phase3
                 private/src/phase3_activator
                 private/src/phase3_cmp
 )
-bundle_private_libs(phase3 dependency_manager)
 
-include_directories(
-        private/include
-        ../services
-)
+#bundle_private_libs(phase3 dependency_manager)
+
+IF(APPLE)
+target_link_libraries(phase3 celix_framework -Wl,-all_load dependency_manager_static)
+else()
+target_link_libraries(phase3 -Wl,--whole-archive dependency_manager_static -Wl,--no-whole-archive celix_framework)
+ENDIF()

http://git-wip-us.apache.org/repos/asf/celix/blob/9c7892b0/examples/whiteboard/tracker_depman/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/whiteboard/tracker_depman/CMakeLists.txt b/examples/whiteboard/tracker_depman/CMakeLists.txt
index 895da6c..a2d6287 100644
--- a/examples/whiteboard/tracker_depman/CMakeLists.txt
+++ b/examples/whiteboard/tracker_depman/CMakeLists.txt
@@ -30,7 +30,7 @@ include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
 
 # Use some magic to include all symbols of the static library
 IF(APPLE)
-target_link_libraries(tracker_depman celix_framework -Wl,-all_load dependency_manager)
+target_link_libraries(tracker_depman celix_framework -Wl,-all_load dependency_manager_static)
 else()
-target_link_libraries(tracker_depman -Wl,--whole-archive dependency_manager -Wl,--no-whole-archive celix_framework)
+target_link_libraries(tracker_depman -Wl,--whole-archive dependency_manager -Wl,--no-whole-archive celix_framework_static)
 ENDIF()


[19/42] celix git commit: CELIX-335: Fix in configure_file usage. Still contained @ONLY arguments

Posted by pn...@apache.org.
CELIX-335: Fix in configure_file usage. Still contained @ONLY arguments


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/0fe3c6ab
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/0fe3c6ab
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/0fe3c6ab

Branch: refs/heads/develop
Commit: 0fe3c6aba7f1eadab07565772fd9bcd0bb449424
Parents: 7a042fd
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Thu Jan 14 15:58:11 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Thu Jan 14 15:58:11 2016 +0100

----------------------------------------------------------------------
 CMakeLists.txt                                          |  4 +---
 .../remote_service_admin_dfi/rsa_tst/CMakeLists.txt     |  6 +++---
 .../private/test/CMakeLists.txt                         |  4 ++--
 remote_services/topology_manager/tms_tst/CMakeLists.txt | 12 ++++++------
 4 files changed, 12 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/0fe3c6ab/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d32f96f..aea2c23 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,13 +15,11 @@
 # specific language governing permissions and limitations
 # under the License.
 
-cmake_minimum_required (VERSION 3.0)
+cmake_minimum_required (VERSION 3.2)
 project (Celix C CXX)
 
 cmake_policy(SET CMP0012 NEW)
 
-#SET(CMAKE_VERBOSE_MAKEFILE ON)
-
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
 
 set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)

http://git-wip-us.apache.org/repos/asf/celix/blob/0fe3c6ab/remote_services/remote_service_admin_dfi/rsa_tst/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa_tst/CMakeLists.txt b/remote_services/remote_service_admin_dfi/rsa_tst/CMakeLists.txt
index ac845e6..d28ad0b 100644
--- a/remote_services/remote_service_admin_dfi/rsa_tst/CMakeLists.txt
+++ b/remote_services/remote_service_admin_dfi/rsa_tst/CMakeLists.txt
@@ -46,9 +46,9 @@ get_property(discovery_configured_bundle_file TARGET discovery_configured PROPER
 get_property(topology_manager_bundle_file TARGET topology_manager PROPERTY BUNDLE_FILE)
 get_property(tst_bundle_file TARGET rsa_dfi_tst_bundle PROPERTY BUNDLE_FILE)
 
-configure_file(config.properties.in config.properties @ONLY)
-configure_file(client.properties.in client.properties @ONLY)
-configure_file(server.properties.in server.properties @ONLY)
+configure_file(config.properties.in config.properties)
+configure_file(client.properties.in client.properties)
+configure_file(server.properties.in server.properties)
 
 add_dependencies(test_rsa_dfi remote_service_admin_dfi calculator)
 

http://git-wip-us.apache.org/repos/asf/celix/blob/0fe3c6ab/remote_services/remote_service_admin_shm/private/test/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_shm/private/test/CMakeLists.txt b/remote_services/remote_service_admin_shm/private/test/CMakeLists.txt
index 4a0ae10..22d9c0b 100644
--- a/remote_services/remote_service_admin_shm/private/test/CMakeLists.txt
+++ b/remote_services/remote_service_admin_shm/private/test/CMakeLists.txt
@@ -48,8 +48,8 @@ get_property(calc_endpoint_bundle_file TARGET  org.apache.celix.calc.api.Calcula
 get_filename_component(client_endpoints ${calc_proxy_bundle_file} PATH)
 get_filename_component(server_endpoints ${calc_endpoint_bundle_file} PATH)
 
-configure_file(client.properties.in client.properties @ONLY)
-configure_file(server.properties.in server.properties @ONLY)
+configure_file(client.properties.in client.properties)
+configure_file(server.properties.in server.properties)
 
 add_dependencies(test_rsa_shm remote_service_admin_shm calculator org.apache.celix.calc.api.Calculator_proxy org.apache.celix.calc.api.Calculator_endpoint)
  

http://git-wip-us.apache.org/repos/asf/celix/blob/0fe3c6ab/remote_services/topology_manager/tms_tst/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/topology_manager/tms_tst/CMakeLists.txt b/remote_services/topology_manager/tms_tst/CMakeLists.txt
index f55fe74..f985d00 100644
--- a/remote_services/topology_manager/tms_tst/CMakeLists.txt
+++ b/remote_services/topology_manager/tms_tst/CMakeLists.txt
@@ -44,13 +44,13 @@ get_property(test_bundle_file TARGET topology_manager_test_bundle PROPERTY BUNDL
 #LOGHELPER_ENABLE_STDOUT_FALLBACK=true
 #org.osgi.framework.storage.clean=onFirstInit
 #")
-configure_file(config.properties.in config.properties @ONLY)
+configure_file(config.properties.in config.properties)
 
-configure_file(config_import.properties.in config_import.properties @ONLY)
-configure_file(scope.json scope.json @ONLY)
-configure_file(scope2.json scope2.json @ONLY)
-configure_file(scope3.json scope3.json @ONLY)
-configure_file(scope4.json scope4.json @ONLY)
+configure_file(config_import.properties.in config_import.properties)
+configure_file(scope.json scope.json)
+configure_file(scope2.json scope2.json)
+configure_file(scope3.json scope3.json)
+configure_file(scope4.json scope4.json)
 
 
 add_test(NAME run_test_tm_scoped COMMAND test_tm_scoped)


[40/42] celix git commit: CELIX-335: Fix in bundle CMakeLists.txt generation. Added bundle_target to add_bundle command.

Posted by pn...@apache.org.
CELIX-335: Fix in bundle CMakeLists.txt generation. Added bundle_target to add_bundle command.


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/b2b8505a
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/b2b8505a
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/b2b8505a

Branch: refs/heads/develop
Commit: b2b8505a27c6215c7772dd322aab1f2f3fae92b9
Parents: a733db4
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Fri Feb 5 10:51:42 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Fri Feb 5 10:51:42 2016 +0100

----------------------------------------------------------------------
 celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/b2b8505a/celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt b/celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt
index d96c422..c5d280f 100644
--- a/celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt
+++ b/celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt
@@ -30,6 +30,7 @@ include_directories(
 
 add_bundle(
 #{{ 
+#cog.outl("\t%s" % bundle['name'])
 #cog.outl("\tNAME \"%s\"" % bundle['name'])
 #cog.outl("\tSYMBOLIC_NAME \"%s\"" % bundle['symbolicName']) 
 #cog.outl("\tVERSION \"0.0.1\"")


[05/42] celix git commit: CELIX-335: Add cmake -version command in travis to be able to inspect the cmake version

Posted by pn...@apache.org.
CELIX-335: Add cmake -version command in travis to be able to inspect the cmake version


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/414bc1b0
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/414bc1b0
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/414bc1b0

Branch: refs/heads/develop
Commit: 414bc1b0841b41e1d327789bb33b85fe7108a544
Parents: d2be40f
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Thu Jan 7 19:02:44 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Thu Jan 7 19:02:44 2016 +0100

----------------------------------------------------------------------
 .travis.yml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/414bc1b0/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 27cc4f6..e4391b5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,6 +13,7 @@ before_install:
   - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update && brew install lcov libffi && brew link --force libffi; fi
 
 before_script:
+    - cmake -version
     - wget https://github.com/cpputest/cpputest.github.io/blob/master/releases/cpputest-3.7.1.tar.gz?raw=true -O /tmp/cpputest.tar.gz
     - tar -xzvf /tmp/cpputest.tar.gz -C /tmp
     - if [ "$CC" = "clang" ]; then export CXX="clang++"; fi && cd /tmp/cpputest-3.7.1 && ./configure --prefix=/usr && make && sudo make install && cd -


[13/42] celix git commit: CELIX-335: Change some files names for tmp file generation during build. Seperate run.sh generation for max and linux. Added option for dm as shared lib

Posted by pn...@apache.org.
CELIX-335: Change some files names for tmp file generation during build. Seperate run.sh generation for max and linux. Added option for dm as shared lib


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/61a71138
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/61a71138
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/61a71138

Branch: refs/heads/develop
Commit: 61a71138927978ec5e40a565e068d3651c7f16eb
Parents: 2b4c8c2
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Sat Jan 9 20:44:36 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Sat Jan 9 20:44:36 2016 +0100

----------------------------------------------------------------------
 cmake/cmake_celix/Packaging.cmake               | 53 ++++++++++++--------
 dependency_manager/CMakeLists.txt               | 29 ++++++-----
 .../private/src/dm_activator_base.c             | 50 +++++++++++++++++-
 .../public/include/dm_activator.h               | 40 +++++++++++++++
 .../public/include/dm_activator_base.h          | 41 ---------------
 examples/dm_example/phase1/CMakeLists.txt       |  9 +---
 .../phase1/private/src/phase1_activator.c       |  2 +-
 .../dm_example/phase1/private/src/phase1_cmp.c  |  2 +-
 examples/dm_example/phase2a/CMakeLists.txt      |  8 +--
 .../phase2a/private/src/phase2a_activator.c     |  2 +-
 examples/dm_example/phase2b/CMakeLists.txt      |  9 +---
 .../phase2b/private/src/phase2b_activator.c     |  2 +-
 .../phase2b/private/src/phase2b_cmp.c           |  2 +-
 examples/dm_example/phase3/CMakeLists.txt       |  9 +---
 .../phase3/private/src/phase3_activator.c       |  2 +-
 .../private/src/dependency_activator.c          |  2 +-
 16 files changed, 152 insertions(+), 110 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/61a71138/cmake/cmake_celix/Packaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Packaging.cmake b/cmake/cmake_celix/Packaging.cmake
index 0b50812..48b8eec 100644
--- a/cmake/cmake_celix/Packaging.cmake
+++ b/cmake/cmake_celix/Packaging.cmake
@@ -166,16 +166,18 @@ function(add_bundle)
 
     ##### MANIFEST configuration and generation ##################
     #Step1 configure the file so that the target name is present in in the template
-    configure_file(${CELIX_CMAKE_DIRECTORY}/cmake_celix/Manifest.template.in ${BUNDLE_GEN_DIR}/MANIFEST.template)
+    configure_file(${CELIX_CMAKE_DIRECTORY}/cmake_celix/Manifest.template.in ${BUNDLE_GEN_DIR}/MANIFEST.step1)
+
     #Step2 replace headers with target property values. Note this is done build time
     file(GENERATE 
-        OUTPUT "${BUNDLE_GEN_DIR}/MANIFEST.tmp"
-        INPUT "${BUNDLE_GEN_DIR}/MANIFEST.template"
+        OUTPUT "${BUNDLE_GEN_DIR}/MANIFEST.step2"
+        INPUT "${BUNDLE_GEN_DIR}/MANIFEST.step1"
     )
+
     #Step3 The replaced values in step 2 can contain generator expresssion, generated again to resolve those. Note this is done build time
     file(GENERATE 
         OUTPUT "${BUNDLE_GEN_DIR}/MANIFEST.MF"
-        INPUT "${BUNDLE_GEN_DIR}/MANIFEST.tmp"
+        INPUT "${BUNDLE_GEN_DIR}/MANIFEST.step2"
     )   
     #########################################################
 
@@ -305,10 +307,16 @@ function(bundle_libs)
     get_target_property(DEPS ${BUNDLE} "BUNDLE_DEPEND_TARGETS")
 
     foreach(LIB IN ITEMS ${ARGN})
-        check_lib(${LIB})
-
-        if(TARGET ${LIB})
-
+        if(IS_ABSOLUTE ${LIB} AND EXISTS ${LIB})
+            get_filename_component(LIB_NAME ${LIB} NAME) 
+            set(OUT "${BUNDLE_DIR}/${LIB_NAME}") 
+            add_custom_command(OUTPUT ${OUT} 
+                COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LIB} ${OUT} 
+            )
+            list(APPEND LIBS ${LIB_NAME})
+            list(APPEND DEPS ${OUT}) 
+        else()
+            #Assuming target
             #NOTE add_custom_command does not support generator expression in OUTPUT value (e.g. $<TARGET_FILE:${LIB}>)
             #Using a two step approach to be able to use add_custom_command instead of add_custom_target
             set(OUT "${BUNDLE_GEN_DIR}/lib-${LIB}-copy-timestamp")
@@ -319,14 +327,6 @@ function(bundle_libs)
             )
             list(APPEND DEPS "${OUT}") #NOTE depending on ${OUT} not on $<TARGET_FILE:${LIB}>.
             list(APPEND LIBS "$<TARGET_SONAME_FILE_NAME:${LIB}>")
-        else()
-            get_filename_component(LIB_NAME ${LIB} NAME) 
-            set(OUT "${BUNDLE_DIR}/${LIB_NAME}") 
-            add_custom_command(OUTPUT ${OUT} 
-                COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LIB} ${OUT} 
-            )
-            list(APPEND LIBS ${LIB_NAME})
-            list(APPEND DEPS ${OUT}) 
         endif()
 
         get_target_property(IS_LIB ${BUNDLE} "BUNDLE_TARGET_IS_LIB")
@@ -471,8 +471,10 @@ function(add_deploy)
         COMMENT "Deploying ${DEPLOY_NAME}" VERBATIM
     )
 
+
+    #TODO generate in the CMakeFiles/deploy.dir/<GROUP_NAME>/DEPLOY_NAME> location
     file(GENERATE 
-        OUTPUT "${DEPLOY_LOCATION}/config.properties.tmp"
+        OUTPUT "${DEPLOY_LOCATION}/config.properties.step1"
         CONTENT "cosgi.auto.start.1=$<JOIN:$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_BUNDLES>, >
 $<JOIN:$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_PROPERTIES>,
 >
@@ -481,15 +483,24 @@ $<JOIN:$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_PROPERTIES>,
 
     file(GENERATE
         OUTPUT "${DEPLOY_LOCATION}/config.properties"
-        INPUT "${DEPLOY_LOCATION}/config.properties.tmp"
+        INPUT "${DEPLOY_LOCATION}/config.properties.step1"
     )
 
-    file(GENERATE
-        OUTPUT ${DEPLOY_LOCATION}/run.sh
-        CONTENT "export DYLD_LIBRARY_PATH=$<TARGET_FILE_DIR:celix_framework>:$<TARGET_FILE_DIR:celix_utils>:$<TARGET_FILE_DIR:celix_dfi>
+    if(APPLE) 
+        file(GENERATE
+            OUTPUT ${DEPLOY_LOCATION}/run.sh
+            CONTENT "export DYLD_LIBRARY_PATH=$<TARGET_FILE_DIR:celix_framework>:$<TARGET_FILE_DIR:celix_utils>:$<TARGET_FILE_DIR:celix_dfi>
+$<TARGET_FILE:celix> $@
+"
+    )
+    else() 
+        file(GENERATE
+            OUTPUT ${DEPLOY_LOCATION}/run.sh
+            CONTENT "export LD_LIBRARY_PATH=$<TARGET_FILE_DIR:celix_framework>:$<TARGET_FILE_DIR:celix_utils>:$<TARGET_FILE_DIR:celix_dfi>
 $<TARGET_FILE:celix> $@
 "
     )
+    endif()
 
     #TODO eclipse launcher file
     #####

http://git-wip-us.apache.org/repos/asf/celix/blob/61a71138/dependency_manager/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/dependency_manager/CMakeLists.txt b/dependency_manager/CMakeLists.txt
index 48214b0..efd3be7 100644
--- a/dependency_manager/CMakeLists.txt
+++ b/dependency_manager/CMakeLists.txt
@@ -30,13 +30,6 @@ if (DEPENDENCY_MANAGER)
       endif(CMAKE_UNAME)
     endif(UNIX AND NOT WIN32)
 
-    #TODO check if something needs to be done?
-    #CELIX_ADD_COMPONENT(dependency_manager
-    #	DISPLAY_NAME Dependency Manager
-    #    DESCRIPTION "The Apache Celix dependency manager (static) library"
-    #    GROUP all
-    #)
-
     add_bundle(dm_shell
         SYMBOLIC_NAME "apche_celix_dm_shell"
         VERSION "0.0.1"
@@ -48,33 +41,43 @@ if (DEPENDENCY_MANAGER)
     target_link_libraries(dm_shell celix_framework celix_utils)
 
 
-    add_library(dependency_manager STATIC 
+    add_library(dependency_manager_static STATIC 
+    	private/src/dm_activator_base 
+    	private/src/dm_component_impl 
+    	private/src/dm_service_dependency
+    	private/src/dm_event
+    	private/src/dm_dependency_manager_impl
+    )
+
+    add_library(dependency_manager SHARED 
     	private/src/dm_activator_base 
     	private/src/dm_component_impl 
     	private/src/dm_service_dependency
     	private/src/dm_event
     	private/src/dm_dependency_manager_impl
     )
+    set_target_properties(dependency_manager PROPERTIES SOVERSION 1)
+    target_compile_definitions(dependency_manager PRIVATE DM_USE_WEAK_DEFAULT_FUNCTIONS)
 
    	include_directories("public/include")
    	include_directories("private/include")
     include_directories("../shell/public/include")
     include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
     target_link_libraries(dependency_manager celix_framework)
+    target_link_libraries(dependency_manager_static celix_framework)
     
     install(
     	FILES
-    	    public/include/dm_activator_base.h
+    	    public/include/dm_activator.h
             public/include/dm_component.h
             public/include/dm_dependency_manager.h
             public/include/dm_service_dependency.h
             public/include/dm_info.h
 		DESTINATION 
 	    	include/celix/dependency_manager
-	    #TODO install componnent
-		#COMPONENT
-		#	dependency_manager
+		COMPONENT
+			dependency_manager
 	)
     install_bundle(dm_shell)
-    install(TARGETS dependency_manager DESTINATION lib COMPONENT dependency_manager)
+    install(TARGETS dependency_manager dependency_manager_static DESTINATION lib COMPONENT dependency_manager)
 endif (DEPENDENCY_MANAGER)

http://git-wip-us.apache.org/repos/asf/celix/blob/61a71138/dependency_manager/private/src/dm_activator_base.c
----------------------------------------------------------------------
diff --git a/dependency_manager/private/src/dm_activator_base.c b/dependency_manager/private/src/dm_activator_base.c
index 60a47ac..2f86707 100644
--- a/dependency_manager/private/src/dm_activator_base.c
+++ b/dependency_manager/private/src/dm_activator_base.c
@@ -28,10 +28,20 @@
 
 #include <stdlib.h>
 
+#include "bundle_context.h"
+#include "celix_errno.h"
+#include "dm_dependency_manager.h"
 #include "bundle_activator.h"
-#include "dm_activator_base.h"
 #include "dm_info.h"
 
+#ifdef DM_USE_WEAK_DEFAULT_FUNCTIONS
+celix_status_t dm_create(bundle_context_pt context, void ** userData) __attribute__((weak));
+celix_status_t dm_init(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) __attribute__((weak));
+celix_status_t dm_destroy(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) __attribute__((weak));
+#else
+#include "dm_activator.h"
+#endif
+
 struct dm_dependency_activator_base {
 	dm_dependency_manager_pt manager;
 	bundle_context_pt context;
@@ -42,6 +52,7 @@ struct dm_dependency_activator_base {
 
 typedef struct dm_dependency_activator_base * dependency_activator_base_pt;
 
+
 celix_status_t bundleActivator_create(bundle_context_pt context, void **userData) {
 	celix_status_t status = CELIX_ENOMEM;
 
@@ -125,4 +136,41 @@ celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt contex
 	return status;
 }
 
+#ifdef DM_USE_WEAK_DEFAULT_FUNCTIONS
 
+static char * dm_getSymbolicNameFromContext(bundle_context_pt context) {
+    celix_status_t status = CELIX_SUCCESS;
+    bundle_pt bundle = NULL;
+    module_pt module = NULL;
+    char *name =  NULL;
+    if (context != NULL) {
+        status = bundleContext_getBundle(context, &bundle);
+    } 
+    if (status == CELIX_SUCCESS) {
+        status = bundle_getCurrentModule(bundle, &module);
+    }
+    if (status == CELIX_SUCCESS) {
+        status = module_getSymbolicName(module, &name);
+    }
+    return name;
+}
+
+celix_status_t dm_create(bundle_context_pt context, void ** userData) {
+    //NOTE weak version
+    printf("Error: Bundle '%s' should implement the dm_create function\n", dm_getSymbolicNameFromContext(context));
+    *userData = NULL;
+    return CELIX_SUCCESS;
+}
+
+celix_status_t dm_init(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
+    //NOTE weak version
+    printf("Error: Bundle '%s' should implement the dm_init function\n", dm_getSymbolicNameFromContext(context));
+    return CELIX_SUCCESS;
+}
+
+celix_status_t dm_destroy(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
+    //NOTE weak version
+    printf("Error: Bundle '%s' should implement the dm_destroy function\n", dm_getSymbolicNameFromContext(context));
+    return CELIX_SUCCESS;
+}
+#endif

http://git-wip-us.apache.org/repos/asf/celix/blob/61a71138/dependency_manager/public/include/dm_activator.h
----------------------------------------------------------------------
diff --git a/dependency_manager/public/include/dm_activator.h b/dependency_manager/public/include/dm_activator.h
new file mode 100644
index 0000000..a439ee5
--- /dev/null
+++ b/dependency_manager/public/include/dm_activator.h
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0 
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*
+ * dm_activator_base.h
+ *
+ *  \date       26 Jul 2014
+ *  \author     <a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ *  \copyright  Apache License, Version 2.0
+ */
+
+
+#ifndef DM_ACTIVATOR_BASE_H_
+#define DM_ACTIVATOR_BASE_H_
+
+#include "bundle_context.h"
+#include "celix_errno.h"
+#include "dm_dependency_manager.h"
+
+celix_status_t dm_create(bundle_context_pt context, void ** userData);
+celix_status_t dm_init(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager);
+celix_status_t dm_destroy(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager);
+
+#endif /* DM_ACTIVATOR_BASE_H_ */

http://git-wip-us.apache.org/repos/asf/celix/blob/61a71138/dependency_manager/public/include/dm_activator_base.h
----------------------------------------------------------------------
diff --git a/dependency_manager/public/include/dm_activator_base.h b/dependency_manager/public/include/dm_activator_base.h
deleted file mode 100644
index 80196e2..0000000
--- a/dependency_manager/public/include/dm_activator_base.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0 
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/*
- * dm_activator_base.h
- *
- *  \date       26 Jul 2014
- *  \author     <a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
- *  \copyright  Apache License, Version 2.0
- */
-
-
-#ifndef DM_ACTIVATOR_BASE_H_
-#define DM_ACTIVATOR_BASE_H_
-
-#include "bundle_context.h"
-#include "celix_errno.h"
-#include "dm_dependency_manager.h"
-
-celix_status_t dm_create(bundle_context_pt context, void ** userData);
-celix_status_t dm_init(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager);
-celix_status_t dm_deinit(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager);
-celix_status_t dm_destroy(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager);
-
-#endif /* DM_ACTIVATOR_BASE_H_ */

http://git-wip-us.apache.org/repos/asf/celix/blob/61a71138/examples/dm_example/phase1/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase1/CMakeLists.txt b/examples/dm_example/phase1/CMakeLists.txt
index 91c3d4f..b746200 100644
--- a/examples/dm_example/phase1/CMakeLists.txt
+++ b/examples/dm_example/phase1/CMakeLists.txt
@@ -23,15 +23,10 @@ add_bundle(phase1
         private/src/phase1_cmp.c
 )
 
+bundle_private_libs(phase1 dependency_manager)
+
 include_directories(
         private/include
         ../services
 )
 
-# Use some magic to include all symbols of the static library
-IF(APPLE)
-target_link_libraries(phase1 celix_framework -Wl,-all_load dependency_manager)
-else()
-target_link_libraries(phase1 -Wl,--whole-archive dependency_manager -Wl,--no-whole-archive celix_framework)
-ENDIF()
-

http://git-wip-us.apache.org/repos/asf/celix/blob/61a71138/examples/dm_example/phase1/private/src/phase1_activator.c
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase1/private/src/phase1_activator.c b/examples/dm_example/phase1/private/src/phase1_activator.c
index 299228a..783e642 100644
--- a/examples/dm_example/phase1/private/src/phase1_activator.c
+++ b/examples/dm_example/phase1/private/src/phase1_activator.c
@@ -27,7 +27,7 @@
 #include <phase1_cmp.h>
 
 #include "bundle_activator.h"
-#include "dm_activator_base.h"
+#include "dm_activator.h"
 
 #include "phase1.h"
 

http://git-wip-us.apache.org/repos/asf/celix/blob/61a71138/examples/dm_example/phase1/private/src/phase1_cmp.c
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase1/private/src/phase1_cmp.c b/examples/dm_example/phase1/private/src/phase1_cmp.c
index e050ba2..75de182 100644
--- a/examples/dm_example/phase1/private/src/phase1_cmp.c
+++ b/examples/dm_example/phase1/private/src/phase1_cmp.c
@@ -96,4 +96,4 @@ static void *phase1_thread(void *data) {
 int phase1_getData(phase1_cmp_t *cmp, unsigned int *data) {
     *data = cmp->counter;
     return 0;
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/celix/blob/61a71138/examples/dm_example/phase2a/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase2a/CMakeLists.txt b/examples/dm_example/phase2a/CMakeLists.txt
index da4804b..f5617fa 100644
--- a/examples/dm_example/phase2a/CMakeLists.txt
+++ b/examples/dm_example/phase2a/CMakeLists.txt
@@ -28,10 +28,10 @@ include_directories(
         ../services
 )
 
-#target_link_libraries(fase2_a -Wl,--whole-archive dependency_manager2 -Wl,--no-whole-archive celix_framework)
-#target_link_libraries(fase2_a celix_framework)
+# Note as example the phase2a uses the dependency manager as static library. 
+# Some additional linking argument magic is needed to make this work
 IF(APPLE)
-target_link_libraries(phase2a celix_framework -Wl,-all_load dependency_manager)
+target_link_libraries(phase2a celix_framework -Wl,-all_load dependency_manager_static)
 else()
-target_link_libraries(phase2a -Wl,--whole-archive dependency_manager -Wl,--no-whole-archive celix_framework)
+target_link_libraries(phase2a -Wl,--whole-archive dependency_manager -Wl,--no-whole-archive celix_framework_static)
 ENDIF()

http://git-wip-us.apache.org/repos/asf/celix/blob/61a71138/examples/dm_example/phase2a/private/src/phase2a_activator.c
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase2a/private/src/phase2a_activator.c b/examples/dm_example/phase2a/private/src/phase2a_activator.c
index df639a8..a05ab54 100644
--- a/examples/dm_example/phase2a/private/src/phase2a_activator.c
+++ b/examples/dm_example/phase2a/private/src/phase2a_activator.c
@@ -27,7 +27,7 @@
 #include <phase2a_cmp.h>
 
 #include "bundle_activator.h"
-#include "dm_activator_base.h"
+#include "dm_activator.h"
 
 #include "phase1.h"
 #include "phase2.h"

http://git-wip-us.apache.org/repos/asf/celix/blob/61a71138/examples/dm_example/phase2b/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase2b/CMakeLists.txt b/examples/dm_example/phase2b/CMakeLists.txt
index c032fed..d2d6a2f 100644
--- a/examples/dm_example/phase2b/CMakeLists.txt
+++ b/examples/dm_example/phase2b/CMakeLists.txt
@@ -22,16 +22,9 @@ add_bundle(phase2b
                 private/src/phase2b_activator
                 private/src/phase2b_cmp
 )
+bundle_private_libs(phase2b dependency_manager)
 
 include_directories(
         private/include
         ../services
 )
-
-#target_link_libraries(fase2_a -Wl,--whole-archive dependency_manager2 -Wl,--no-whole-archive celix_framework)
-#target_link_libraries(fase2_a celix_framework)
-IF(APPLE)
-target_link_libraries(phase2b celix_framework -Wl,-all_load dependency_manager)
-else()
-target_link_libraries(phase2b -Wl,--whole-archive dependency_manager -Wl,--no-whole-archive celix_framework)
-ENDIF()

http://git-wip-us.apache.org/repos/asf/celix/blob/61a71138/examples/dm_example/phase2b/private/src/phase2b_activator.c
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase2b/private/src/phase2b_activator.c b/examples/dm_example/phase2b/private/src/phase2b_activator.c
index 8797271..ca66d44 100644
--- a/examples/dm_example/phase2b/private/src/phase2b_activator.c
+++ b/examples/dm_example/phase2b/private/src/phase2b_activator.c
@@ -27,7 +27,7 @@
 #include <phase2b_cmp.h>
 
 #include "bundle_activator.h"
-#include "dm_activator_base.h"
+#include "dm_activator.h"
 
 #include "phase1.h"
 #include "phase2.h"

http://git-wip-us.apache.org/repos/asf/celix/blob/61a71138/examples/dm_example/phase2b/private/src/phase2b_cmp.c
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase2b/private/src/phase2b_cmp.c b/examples/dm_example/phase2b/private/src/phase2b_cmp.c
index 9d6d3d5..3f8d319 100644
--- a/examples/dm_example/phase2b/private/src/phase2b_cmp.c
+++ b/examples/dm_example/phase2b/private/src/phase2b_cmp.c
@@ -113,4 +113,4 @@ static void *phase2b_thread(void *data) {
 int phase2b_getData(phase2b_cmp_t *cmp, double *data) {
     *data = cmp->currentValue;
     return 0;
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/celix/blob/61a71138/examples/dm_example/phase3/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase3/CMakeLists.txt b/examples/dm_example/phase3/CMakeLists.txt
index 6ec41d8..496a67f 100644
--- a/examples/dm_example/phase3/CMakeLists.txt
+++ b/examples/dm_example/phase3/CMakeLists.txt
@@ -22,16 +22,9 @@ add_bundle(phase3
                 private/src/phase3_activator
                 private/src/phase3_cmp
 )
+bundle_private_libs(phase3 dependency_manager)
 
 include_directories(
         private/include
         ../services
 )
-
-#target_link_libraries(fase2_a -Wl,--whole-archive dependency_manager2 -Wl,--no-whole-archive celix_framework)
-#target_link_libraries(fase2_a celix_framework)
-IF(APPLE)
-target_link_libraries(phase3 celix_framework -Wl,-all_load dependency_manager)
-else()
-target_link_libraries(phase3 -Wl,--whole-archive dependency_manager -Wl,--no-whole-archive celix_framework)
-ENDIF()

http://git-wip-us.apache.org/repos/asf/celix/blob/61a71138/examples/dm_example/phase3/private/src/phase3_activator.c
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase3/private/src/phase3_activator.c b/examples/dm_example/phase3/private/src/phase3_activator.c
index d2a1b9c..6377fcf 100644
--- a/examples/dm_example/phase3/private/src/phase3_activator.c
+++ b/examples/dm_example/phase3/private/src/phase3_activator.c
@@ -26,7 +26,7 @@
 #include <stdlib.h>
 
 #include "bundle_activator.h"
-#include "dm_activator_base.h"
+#include "dm_activator.h"
 
 #include "phase2.h"
 #include "phase3_cmp.h"

http://git-wip-us.apache.org/repos/asf/celix/blob/61a71138/examples/whiteboard/tracker_depman/private/src/dependency_activator.c
----------------------------------------------------------------------
diff --git a/examples/whiteboard/tracker_depman/private/src/dependency_activator.c b/examples/whiteboard/tracker_depman/private/src/dependency_activator.c
index 2e17daf..1ee279e 100644
--- a/examples/whiteboard/tracker_depman/private/src/dependency_activator.c
+++ b/examples/whiteboard/tracker_depman/private/src/dependency_activator.c
@@ -27,7 +27,7 @@
 #include <stdio.h>
 #include "celixbool.h"
 
-#include "dm_activator_base.h"
+#include "dm_activator.h"
 #include "publisher.h"
 #include "tracker.h"
 


[21/42] celix git commit: CELIX-335: Fix error in travis.yml

Posted by pn...@apache.org.
CELIX-335: Fix  error in travis.yml


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/de7915aa
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/de7915aa
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/de7915aa

Branch: refs/heads/develop
Commit: de7915aaa810d3d539b7bcde31aa45f4a22b5d53
Parents: d7ae9b5
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Thu Jan 14 17:42:56 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Thu Jan 14 17:42:56 2016 +0100

----------------------------------------------------------------------
 .travis.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/de7915aa/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 3d50f61..8cfddf8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,7 +38,8 @@ before_script:
     - sudo make install
     - cd -
     - mkdir build install
-    - if [ "${BUILD_SYSTEM}" = "make" ] then export BUILD_CMD=make; export BUILD_GEN=""; else export BUILD_CMD=ninja; export BUILD_GEN="-G Ninja"; fi
+    - if [ "${BUILD_SYSTEM}" = "make" ]; then export BUILD_CMD=make;    export BUILD_GEN=""; 
+    - if [ "${BUILD_SYSTEM}" = "ninja"]; then export BUILD_CMD=ninja;   export BUILD_GEN="-G Ninja"; fi
 
 
 script:


[32/42] celix git commit: CELIX-335: Add cmake install for osx in travis config

Posted by pn...@apache.org.
CELIX-335: Add cmake install for osx in travis config


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/edf549c0
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/edf549c0
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/edf549c0

Branch: refs/heads/develop
Commit: edf549c01b286dce261a74f9b838731fee77de2f
Parents: da78d30
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Tue Jan 26 11:17:03 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Tue Jan 26 11:17:03 2016 +0100

----------------------------------------------------------------------
 .travis.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/edf549c0/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 905c714..3e8b170 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,7 +38,8 @@ matrix:
 
 before_install:
   - if [ "$TRAVIS_OS_NAME" = "linux" ] &&  [ -z "$ANDROID" ]; then sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt-get -qq update && sudo apt-get install -y uuid-dev libxml2-dev lcov libffi-dev gcc-4.8 g++-4.8; fi
-  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update && brew install lcov libffi && brew link --force libffi; fi
+  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew uninstall cmake; fi
+  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update && brew install lcov libffi cmake && brew link --force libffi; fi
 
 before_script:
     - wget https://github.com/cpputest/cpputest.github.io/blob/master/releases/cpputest-3.7.1.tar.gz?raw=true -O /tmp/cpputest.tar.gz


[41/42] celix git commit: CELIX-335: Fix run.sh generated. Generation now also works for celix based projects.

Posted by pn...@apache.org.
CELIX-335: Fix run.sh generated. Generation now also works for celix based projects.


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/da797a08
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/da797a08
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/da797a08

Branch: refs/heads/develop
Commit: da797a080e393388bc48f8b52744e55a75d4ab85
Parents: b2b8505
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Fri Feb 5 11:16:56 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Fri Feb 5 11:16:56 2016 +0100

----------------------------------------------------------------------
 celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/da797a08/celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt b/celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt
index c5d280f..1c80a04 100644
--- a/celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt
+++ b/celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt
@@ -34,7 +34,7 @@ add_bundle(
 #cog.outl("\tNAME \"%s\"" % bundle['name'])
 #cog.outl("\tSYMBOLIC_NAME \"%s\"" % bundle['symbolicName']) 
 #cog.outl("\tVERSION \"0.0.1\"")
-#cog.outl("\t%s SOURCES" % bundle['name']) 
+#cog.outl("\t%s SOURCES") 
 #cog.outl("\t\tprivate/src/bundle_activator")
 #for comp in bundle['components'] :
 #	cog.outl("\t\tprivate/src/%s" % comp['name'])


[04/42] celix git commit: CELIX-335: Remove bundle examples with explicit lib location (platform dependend)

Posted by pn...@apache.org.
CELIX-335: Remove bundle examples with explicit lib location (platform dependend)


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/d2be40f3
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/d2be40f3
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/d2be40f3

Branch: refs/heads/develop
Commit: d2be40f30479e072afc61afe3b1f31751ef1796f
Parents: 49ab9ab
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Thu Jan 7 16:59:25 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Thu Jan 7 16:59:25 2016 +0100

----------------------------------------------------------------------
 examples/hello_world_test/CMakeLists.txt | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/d2be40f3/examples/hello_world_test/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/hello_world_test/CMakeLists.txt b/examples/hello_world_test/CMakeLists.txt
index 49df4ff..39198ed 100644
--- a/examples/hello_world_test/CMakeLists.txt
+++ b/examples/hello_world_test/CMakeLists.txt
@@ -38,14 +38,14 @@ add_library(tlib SHARED
 )
 set_library_version(tlib "4.3.2") # sets target propery VERSION to 4.3.2 and SOVERSION to 4
 
-bundle_private_libs(hellotest1
-    #/usr/local/lib/libjansson.4.dylib
-    /usr/lib64/libjansson.so.4
-)
+#bundle_private_libs(hellotest1
+#    #/usr/local/lib/libjansson.4.dylib
+#    /usr/lib64/libjansson.so.4
+#)
 bundle_private_libs(hellotest1
     tlib
     #/usr/lib/libcurl.4.dylib 
-    /usr/lib64/libcurl.so.4
+    #    /usr/lib64/libcurl.so.4
 )
 
 
@@ -77,10 +77,10 @@ add_bundle(hellotest2
     ACTIVATOR hello2act
 )
 
-add_bundle(hellotest3
-    VERSION "2.1.2"
+#add_bundle(hellotest3
+#    VERSION "2.1.2"
     #ACTIVATOR /usr/local/lib/libjansson.4.dylib
-    ACTIVATOR /usr/lib64/libjansson.so.4
-)
+    #ACTIVATOR /usr/lib64/libjansson.so.4
+    #)
 
 


[09/42] celix git commit: CELIX-335: Added trusty dist for travis config

Posted by pn...@apache.org.
CELIX-335: Added trusty dist for travis config


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/c8920f2a
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/c8920f2a
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/c8920f2a

Branch: refs/heads/develop
Commit: c8920f2a64aab41ff2c24b63db590da05bcf65ab
Parents: fa1f5c8
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Fri Jan 8 10:30:12 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Fri Jan 8 10:30:12 2016 +0100

----------------------------------------------------------------------
 .travis.yml | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/c8920f2a/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index e4391b5..264f1a4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,7 @@
 language: c
 
+dist: trusty
+
 os:
     - linux
     - osx


[39/42] celix git commit: CELIX-335: Remove deploy_targets() from project CMakeLists.txt template. Not needed with rewrite Packaging.cmake

Posted by pn...@apache.org.
CELIX-335: Remove deploy_targets() from project CMakeLists.txt template. Not needed with rewrite Packaging.cmake


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/a733db4d
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/a733db4d
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/a733db4d

Branch: refs/heads/develop
Commit: a733db4d4347a41fcc6513dfe6b840247e2b7b36
Parents: 1eb9eb0
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Fri Feb 5 10:49:39 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Fri Feb 5 10:49:39 2016 +0100

----------------------------------------------------------------------
 celix-bootstrap/celix/bootstrap/templates/project/CMakeLists.txt | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/a733db4d/celix-bootstrap/celix/bootstrap/templates/project/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/bootstrap/templates/project/CMakeLists.txt b/celix-bootstrap/celix/bootstrap/templates/project/CMakeLists.txt
index 6991e4a..d5d6d81 100644
--- a/celix-bootstrap/celix/bootstrap/templates/project/CMakeLists.txt
+++ b/celix-bootstrap/celix/bootstrap/templates/project/CMakeLists.txt
@@ -35,4 +35,3 @@ include_directories(${CELIX_INCLUDE_DIRS})
 #
 #{{end}}
 
-deploy_targets()


[11/42] celix git commit: CELIX-335: Fix issue in deploy_bundles_dir dependencies setup. Now 'make -j' and ninja works

Posted by pn...@apache.org.
CELIX-335: Fix issue in deploy_bundles_dir dependencies setup. Now 'make -j' and ninja works


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/919a3eb5
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/919a3eb5
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/919a3eb5

Branch: refs/heads/develop
Commit: 919a3eb505d90b3afe8762de071a47624b71755b
Parents: 6acd0b9
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Fri Jan 8 10:56:00 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Fri Jan 8 10:56:00 2016 +0100

----------------------------------------------------------------------
 .travis.yml                       | 4 ++--
 cmake/cmake_celix/Packaging.cmake | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/919a3eb5/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 22e77b0..40155d7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,10 +3,10 @@ language: c
 matrix:
     include:
         - os: linux
-          dist: trustry
+          dist: trusty
           compiler: gcc
         - os: linux
-          dist: trustry
+          dist: trusty
           compiler: clang
         - os: osx
           compiler: gcc

http://git-wip-us.apache.org/repos/asf/celix/blob/919a3eb5/cmake/cmake_celix/Packaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Packaging.cmake b/cmake/cmake_celix/Packaging.cmake
index bb7daa9..534a2a8 100644
--- a/cmake/cmake_celix/Packaging.cmake
+++ b/cmake/cmake_celix/Packaging.cmake
@@ -538,8 +538,7 @@ function(deploy_bundles_dir)
         else()
             add_custom_command(OUTPUT ${OUT}
                 COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_PROPERTY:${BUNDLE},BUNDLE_FILE>" ${OUT}
-                DEPENDS ${BUNDLE}
-                #DEPENDS "$<TARGET_PROPERTY:${BUNDLE},BUNDLE_FILE>"
+                DEPENDS ${BUNDLE}_bundle
             )
         endif()
     endforeach()


[02/42] celix git commit: CELIX-335: Refactor cmake packaging

Posted by pn...@apache.org.
http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/device_access/example/consuming_driver/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/example/consuming_driver/CMakeLists.txt b/device_access/example/consuming_driver/CMakeLists.txt
index 96dc8e8..061d350 100644
--- a/device_access/example/consuming_driver/CMakeLists.txt
+++ b/device_access/example/consuming_driver/CMakeLists.txt
@@ -15,13 +15,13 @@
 # specific language governing permissions and limitations
 # under the License.
 
-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")
-
-bundle(word_consumingdriver SOURCES 
-	private/src/activator 
-	private/src/consuming_driver
+add_bundle(word_consumingdriver
+ 	SYMBOLIC_NAME "apache_celix_word_consuming_driver_example"
+ 	VERSION "0.0.1"
+ 	NAME "Apache Celix Device Access Word Consuming Driver Example"
+	SOURCES
+		private/src/activator
+		private/src/consuming_driver
 )
 
 include_directories(${PROJECT_SOURCE_DIR}/device_access/device_access/public/include)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/device_access/example/refining_driver/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/device_access/example/refining_driver/CMakeLists.txt b/device_access/example/refining_driver/CMakeLists.txt
index df5470b..d16584f 100644
--- a/device_access/example/refining_driver/CMakeLists.txt
+++ b/device_access/example/refining_driver/CMakeLists.txt
@@ -15,13 +15,13 @@
 # specific language governing permissions and limitations
 # under the License.
 
-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")
-
-bundle(char_refiningdriver SOURCES 
-	private/src/activator 
-	private/src/refining_driver
+add_bundle(char_refiningdriver
+ 	SYMBOLIC_NAME "apache_celix_char_refining_driver_example"
+ 	NAME "Apache Celix Device Access Char Refining Driver Example"
+ 	VERSION "0.0.1"
+	SOURCES
+		private/src/activator
+		private/src/refining_driver
 )
 
 include_directories(${PROJECT_SOURCE_DIR}/device_access/device_access/public/include)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/dfi/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/dfi/CMakeLists.txt b/dfi/CMakeLists.txt
index 8e3c0b1..4697a0c 100644
--- a/dfi/CMakeLists.txt
+++ b/dfi/CMakeLists.txt
@@ -53,6 +53,7 @@ add_library(celix_dfi SHARED
     public/include/json_rpc.h
     ${MEMSTREAM_INCLUDES}
 )
+set_target_properties(celix_dfi PROPERTIES "SOVERSION" 1)
 target_link_libraries(celix_dfi celix_utils ${FFI_LIBRARIES} ${JANSSON_LIBRARY})
 
 install(TARGETS celix_dfi DESTINATION lib COMPONENT framework)
@@ -67,7 +68,7 @@ if (ENABLE_TESTING)
 
 	SET(CMAKE_SKIP_BUILD_RPATH  FALSE) #TODO needed?
 	SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) #TODO needed?
-	SET(CMAKE_INSTALL_RPATH "${PROJECT_BINARY_DIR}/dfi")
+    SET(CMAKE_INSTALL_RPATH "${PROJECT_BINARY_DIR}/dfi" "${PROJECT_BINARY_DIR}/utils")
 
 
 	add_executable(test_dfi
@@ -82,11 +83,8 @@ if (ENABLE_TESTING)
 	)
 	target_link_libraries(test_dfi celix_dfi ${FFI_LIBRARIES} ${CPPUTEST_LIBRARY})
 
-	add_custom_target(copy-input
-		COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_LIST_DIR}/private/test/schemas schemas
-		COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_LIST_DIR}/private/test/descriptors descriptors
-	)
-	add_dependencies(test_dfi copy-input)
+    file(COPY ${CMAKE_CURRENT_LIST_DIR}/private/test/schemas DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+    file(COPY ${CMAKE_CURRENT_LIST_DIR}/private/test/descriptors DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
 
 	add_test(NAME run_test_dfi COMMAND test_dfi)
 	SETUP_TARGET_FOR_COVERAGE(test_dfi_cov test_dfi ${CMAKE_BINARY_DIR}/coverage/test_dfi/test_dfi)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/event_admin/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/event_admin/CMakeLists.txt b/event_admin/CMakeLists.txt
index 277e5f9..68a582f 100644
--- a/event_admin/CMakeLists.txt
+++ b/event_admin/CMakeLists.txt
@@ -25,4 +25,8 @@ if(EVENT_ADMIN)
 	add_subdirectory(event_handler)
 	add_subdirectory(event_publisher)
 	
-endif(EVENT_ADMIN)
\ No newline at end of file
+	deploy("event_admin" BUNDLES event_admin shell shell_tui log_service log_writer)
+    deploy("event_publisher_example" BUNDLES event_admin event_publisher shell shell_tui log_service log_writer)
+	deploy("event_handler_example" BUNDLES event_admin event_handler shell shell_tui log_service log_writer)
+	deploy("event_admin_example" BUNDLES event_admin event_publisher event_handler shell shell_tui log_service log_writer)
+endif(EVENT_ADMIN)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/event_admin/deploy.cmake
----------------------------------------------------------------------
diff --git a/event_admin/deploy.cmake b/event_admin/deploy.cmake
deleted file mode 100644
index 3b1c15b..0000000
--- a/event_admin/deploy.cmake
+++ /dev/null
@@ -1,23 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-is_enabled(EVENT_ADMIN)
-if(EVENT_ADMIN)
-	deploy("event_admin" BUNDLES event_admin shell shell_tui log_service log_writer)
-    deploy("event_publisher_example" BUNDLES event_admin event_publisher shell shell_tui log_service log_writer)
-	deploy("event_handler_example" BUNDLES event_admin event_handler shell shell_tui log_service log_writer)
-	deploy("event_admin_example" BUNDLES event_admin event_publisher event_handler shell shell_tui log_service log_writer)
-endif(EVENT_ADMIN)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/event_admin/event_admin/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/event_admin/event_admin/CMakeLists.txt b/event_admin/event_admin/CMakeLists.txt
index 3245a41..b2e8013 100644
--- a/event_admin/event_admin/CMakeLists.txt
+++ b/event_admin/event_admin/CMakeLists.txt
@@ -22,12 +22,8 @@ include_directories(private/include)
 include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
 
-SET_HEADER(BUNDLE_SYMBOLICNAME "eventadmin")
-SET(BUNDLE_VERSION "0.0.1")
-SET_HEADERS("Bundle-Name: Event admin")
-
-
-bundle(event_admin 
+add_bundle(event_admin
+    VERSION 0.0.0
 	SOURCES 
 		private/src/event_admin_activator.c
 		private/src/event_admin_impl.c
@@ -38,7 +34,7 @@ bundle(event_admin
 		${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
 )
 
-install_bundle(event_admin
+install_add_bundle(event_admin
 	HEADERS
 	    public/include/event_admin.h
 	    public/include/event_constants.h

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/event_admin/event_handler/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/event_admin/event_handler/CMakeLists.txt b/event_admin/event_handler/CMakeLists.txt
index fc02c0b..6c269aa 100644
--- a/event_admin/event_handler/CMakeLists.txt
+++ b/event_admin/event_handler/CMakeLists.txt
@@ -22,18 +22,15 @@ include_directories(private/include)
 include_directories(${PROJECT_SOURCE_DIR}/event_admin/event_admin/public/include)
 include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
 
-SET_HEADER(BUNDLE_SYMBOLICNAME "eventhandler")
-SET(BUNDLE_VERSION "0.0.1")
-SET_HEADERS("Bundle-Name: Event Handler")
 
-
-bundle(event_handler 
+add_bundle(event_handler
+    VERSION 0.0.0
 	SOURCES 
 		private/src/event_handler_activator.c
 		private/src/event_handler_impl.c
 		${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c
 )
 
-install_bundle(event_handler)
+install_add_bundle(event_handler)
 
 target_link_libraries(event_handler celix_framework celix_utils ${APR_LIBRARY} ${APRUTIL_LIBRARY})

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/event_admin/event_publisher/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/event_admin/event_publisher/CMakeLists.txt b/event_admin/event_publisher/CMakeLists.txt
index 4989ea4..a7fd886 100644
--- a/event_admin/event_publisher/CMakeLists.txt
+++ b/event_admin/event_publisher/CMakeLists.txt
@@ -22,17 +22,13 @@ include_directories(private/include)
 include_directories(${PROJECT_SOURCE_DIR}/event_admin/event_admin/public/include)
 include_directories(${PROJECT_SOURCE_DIR}/log_service/public/include)
 
-SET_HEADER(BUNDLE_SYMBOLICNAME "event_publisher")
-SET(BUNDLE_VERSION "0.0.1")
-SET_HEADERS("Bundle-Name: Event Publisher")
-
-
-bundle(event_publisher SOURCES 
+add_bundle(event_publisher SOURCES
+    VERSION 0.0.0
 	private/src/event_publisher_activator.c
 	private/src/event_publisher_impl.c
 	${PROJECT_SOURCE_DIR}/log_service/public/src/log_helper.c	
 )
 
-install_bundle(event_publisher)
+install_add_bundle(event_publisher)
 
 target_link_libraries(event_publisher celix_framework celix_utils ${APR_LIBRARY} ${APRUTIL_LIBRARY})

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index c4eb9b4..81fe2e1 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -35,4 +35,18 @@ if (EXAMPLES)
     add_subdirectory(locking)
     
     add_subdirectory(embedding)
+
+    add_deploy(chapter01-greeting-example-d BUNDLES shell shell_tui log_service chapter01-greeting-example-client chapter01-greeting-example)
+    add_deploy(chapter04-correct-lookup-d BUNDLES shell shell_tui log_service chapter04-correct-lookup)
+    add_deploy(chapter04-correct-listener-d BUNDLES shell shell_tui log_service chapter04-correct-listener)
+
+    #deploy("hello_world" BUNDLES shell shell_tui apache_celix_examples_hello_world hello_world_test log_service log_writer)
+    add_deploy("wb" BUNDLES tracker publisherA publisherB shell shell_tui log_service log_writer)
+    add_deploy("wb_dp" BUNDLES tracker_depman publisherA publisherB shell shell_tui log_service log_writer dm_shell)
+    add_deploy("echo" BUNDLES echo_server echo_client shell shell_tui)
+    add_deploy("producer_consumer" BUNDLES producer consumer database shell shell_tui)
+    if (NOT ANDROID)
+        add_deploy("mongoose_deploy" BUNDLES shell shell_tui log_service mongoose)
+    endif ()
+
 endif(EXAMPLES)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/deploy.cmake
----------------------------------------------------------------------
diff --git a/examples/deploy.cmake b/examples/deploy.cmake
deleted file mode 100644
index cd7debd..0000000
--- a/examples/deploy.cmake
+++ /dev/null
@@ -1,34 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-is_enabled(EXAMPLES)
-if (EXAMPLES)
-	deploy(chapter01-greeting-example BUNDLES shell shell_tui log_service chapter01-greeting-example-client chapter01-greeting-example)
-	deploy(chapter04-correct-lookup BUNDLES shell shell_tui log_service chapter04-correct-lookup)
-	deploy(chapter04-correct-listener BUNDLES shell shell_tui log_service chapter04-correct-listener)
-	
-	deploy("hello_world" BUNDLES shell shell_tui apache_celix_examples_hello_world hello_world_test log_service log_writer)
-	deploy("wb" BUNDLES tracker publisherA publisherB shell shell_tui log_service log_writer)
-	deploy("wb_dp" BUNDLES tracker_depman publisherA publisherB shell shell_tui log_service log_writer dm_shell)
-	deploy("echo" BUNDLES echo_server echo_client shell shell_tui)
-	deploy("producer_consumer" BUNDLES producer consumer database shell shell_tui)
-	if (NOT ANDROID)
-		deploy("mongoose" BUNDLES shell shell_tui log_service apache_celix_examples_mongoose)
-	endif ()
-
-    #deploy("locking_example" BUNDLES benchmark_runner reference_benchmark start_stop_benchmark mutex_benchmark math_provider shell shell_tui log_service log_writer)
-
-endif (EXAMPLES)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/dm_example/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example/CMakeLists.txt b/examples/dm_example/CMakeLists.txt
index a08e7b4..18738ef 100644
--- a/examples/dm_example/CMakeLists.txt
+++ b/examples/dm_example/CMakeLists.txt
@@ -26,4 +26,19 @@ if (BUILD_DEPENDENCY_MANAGER)
     add_subdirectory(phase2b)
     add_subdirectory(phase3)
 
+
+    add_deploy("dm_example"
+        COPY 
+        BUNDLES
+            phase1
+            phase2a
+            phase2b
+            phase3
+            shell
+            shell_tui
+            dm_shell
+        PROPERTIES
+            LOGHELPER_ENABLE_STDOUT_FALLBACK=true
+    )
+
 endif ()

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/dm_example/deploy.cmake
----------------------------------------------------------------------
diff --git a/examples/dm_example/deploy.cmake b/examples/dm_example/deploy.cmake
deleted file mode 100644
index 1def6fc..0000000
--- a/examples/dm_example/deploy.cmake
+++ /dev/null
@@ -1,32 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-if (BUILD_EXAMPLES AND BUILD_DEPENDENCY_MANAGER AND BUILD_SHELL AND BUILD_SHELL_TUI)
-    deploy("dm_example"
-            BUNDLES
-                phase1
-                phase2a
-                phase2b
-                phase3
-                shell
-                shell_tui
-                dm_shell
-            PROPERTIES
-                LOGHELPER_ENABLE_STDOUT_FALLBACK=true
-
-    )
-endif ()
-

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/dm_example/phase1/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase1/CMakeLists.txt b/examples/dm_example/phase1/CMakeLists.txt
index 6fc8c77..91c3d4f 100644
--- a/examples/dm_example/phase1/CMakeLists.txt
+++ b/examples/dm_example/phase1/CMakeLists.txt
@@ -15,13 +15,12 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME "phase1")
-SET(BUNDLE_VERSION "0.0.1")
-
-bundle(phase1
-        SOURCES
-            private/src/phase1_activator
-            private/src/phase1_cmp.c
+add_bundle(phase1
+    SYMBOLIC_NAME phase2
+    VERSION 0.0.1
+    SOURCES
+        private/src/phase1_activator
+        private/src/phase1_cmp.c
 )
 
 include_directories(

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/dm_example/phase2a/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase2a/CMakeLists.txt b/examples/dm_example/phase2a/CMakeLists.txt
index afe53cc..da4804b 100644
--- a/examples/dm_example/phase2a/CMakeLists.txt
+++ b/examples/dm_example/phase2a/CMakeLists.txt
@@ -15,12 +15,12 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME "phase2a")
-SET(BUNDLE_VERSION "0.0.1")
-
-bundle(phase2a SOURCES
-        private/src/phase2a_activator
-        private/src/phase2a_cmp
+add_bundle(phase2a
+        SYMBOLIC_NAME phase2a
+        VERSION 0.0.1
+        SOURCES
+                private/src/phase2a_activator
+                private/src/phase2a_cmp
 )
 
 include_directories(

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/dm_example/phase2b/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase2b/CMakeLists.txt b/examples/dm_example/phase2b/CMakeLists.txt
index 820f6c9..c032fed 100644
--- a/examples/dm_example/phase2b/CMakeLists.txt
+++ b/examples/dm_example/phase2b/CMakeLists.txt
@@ -15,12 +15,12 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME "phase2b")
-SET(BUNDLE_VERSION "0.0.1")
-
-bundle(phase2b SOURCES
-        private/src/phase2b_activator
-        private/src/phase2b_cmp
+add_bundle(phase2b
+        SYMBOLIC_NAME phase2b
+        VERSION 0.0.1
+        SOURCES
+                private/src/phase2b_activator
+                private/src/phase2b_cmp
 )
 
 include_directories(

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/dm_example/phase3/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/dm_example/phase3/CMakeLists.txt b/examples/dm_example/phase3/CMakeLists.txt
index 22c3d95..6ec41d8 100644
--- a/examples/dm_example/phase3/CMakeLists.txt
+++ b/examples/dm_example/phase3/CMakeLists.txt
@@ -15,12 +15,12 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME "phase3")
-SET(BUNDLE_VERSION "0.0.1")
-
-bundle(phase3 SOURCES
-        private/src/phase3_activator
-        private/src/phase3_cmp
+add_bundle(phase3
+        SYMBOLIC_NAME phase3
+        VERSION 0.0.1
+        SOURCES
+                private/src/phase3_activator
+                private/src/phase3_cmp
 )
 
 include_directories(

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/echo_service/client/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/echo_service/client/CMakeLists.txt b/examples/echo_service/client/CMakeLists.txt
index db512e6..de66952 100644
--- a/examples/echo_service/client/CMakeLists.txt
+++ b/examples/echo_service/client/CMakeLists.txt
@@ -15,15 +15,15 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME "apache_celix_examples_echo_client")
-SET(BUNDLE_VERSION "0.0.1")
-SET(BUNDLE_NAME "Apache Celix Echo Client")
+add_bundle(echo_client
+	SYMBOLIC_NAME  "apache_celix_examples_echo_client"
+	VERSION "0.0.1"
+	NAME "Apache Celix Echo Client"
+	SOURCES
+		private/src/echo_client_activator
+		private/src/echo_client
 
-bundle(echo_client SOURCES 
-	private/src/echo_client_activator 
-	private/src/echo_client
-
-    private/include/echo_client_private.h
+		private/include/echo_client_private.h
 )
 
 include_directories("private/include")

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/echo_service/server/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/echo_service/server/CMakeLists.txt b/examples/echo_service/server/CMakeLists.txt
index b2f3001..fe2b268 100644
--- a/examples/echo_service/server/CMakeLists.txt
+++ b/examples/echo_service/server/CMakeLists.txt
@@ -15,15 +15,15 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME "apache_celix_examples_echo_server")
-SET(BUNDLE_VERSION "0.0.1")
-SET(BUNDLE_NAME "Apache Celix Echo Server")
+add_bundle(echo_server
+	SYMBOLIC_NAME "apache_celix_examples_echo_server"
+	VERSION "0.0.1"
+	NAME "Apache Celix Echo Server"
+	SOURCES
+		private/src/echo_server_activator
+		private/src/echo_server
 
-bundle(echo_server SOURCES 
-	private/src/echo_server_activator 
-	private/src/echo_server
-    
-    private/include/echo_server_private.h
+		private/include/echo_server_private.h
 )
 
 include_directories("private/include")

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/embedding/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/embedding/CMakeLists.txt b/examples/embedding/CMakeLists.txt
index 44f2f19..c7475e7 100644
--- a/examples/embedding/CMakeLists.txt
+++ b/examples/embedding/CMakeLists.txt
@@ -15,14 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 
-#SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_examples_embedding")
-#SET_HEADERS("Bundle-Name: Apache Celix Shell TUI") 
-	
-#bundle(hello_world SOURCES private/src/activator)
-
-if(NOT ${WITH_APR})
-    message(FATAL_ERROR "Embedding example requires APR, enable WITH_APR option.")
-endif()
 
 add_executable(embedding private/src/main)
 include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/hello_world/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/hello_world/CMakeLists.txt b/examples/hello_world/CMakeLists.txt
index 4792e13..57bbce4 100644
--- a/examples/hello_world/CMakeLists.txt
+++ b/examples/hello_world/CMakeLists.txt
@@ -15,27 +15,32 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME "apache_celix_examples_hello_world")
-SET(BUNDLE_VERSION "0.0.1")
-SET(BUNDLE_NAME "Apache Celix Shell TUI")
-
 include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
 include_directories("public/include")
 
-BUNDLE_LIBRARY(org.apache.incubator.celix.helloworld.sub
-    SOURCES private/src/test
-    LINK_LIBRARIES celix_framework
-    )
 
-BUNDLE_PRIVATE_LIBRARY(private
-    SOURCES private/src/activator
-    LINK_LIBRARIES celix_framework org.apache.incubator.celix.helloworld.sub
-    )
-    
-BUNDLE(
-    ACTIVATOR "apache_celix_examples_hello_world-private"
-    PRIVATE_LIBRARIES "private"
-    EXPORT_LIBRARIES org.apache.incubator.celix.helloworld.sub
-    )
+add_bundle(hello
+    VERSION "1.2"
+    SOURCES
+        private/src/activator.c
+)
+
+add_library(hello_testlib SHARED
+    private/src/test
+)
+set_library_version(hello_testlib "4.3.2") # sets target propery VERSION to 4.3.2 and SOVERSION to 4
+
+bundle_private_libs(hello
+    hello_testlib
+)
 
+add_deploy(helloworld_byref
+    GROUP hello
+    BUNDLES hello shell shell_tui
+)
 
+add_deploy(helloworld_withcopy
+    GROUP hello
+    COPY #Ensures that bundles are copied in the deploy location
+    BUNDLES hello shell shell_tui
+)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/hello_world_test/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/hello_world_test/CMakeLists.txt b/examples/hello_world_test/CMakeLists.txt
index e6fe6d0..49df4ff 100644
--- a/examples/hello_world_test/CMakeLists.txt
+++ b/examples/hello_world_test/CMakeLists.txt
@@ -15,16 +15,72 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME "apache_celix_examples_hello_world_test")
-SET(BUNDLE_VERSION "0.0.1")
-SET_HEADERS("Bundle-Name: Apache Celix Shell TUI") 
-    
-bundle(hello_world_test 
-    SOURCES private/src/activator 
-    IMPORT_LIBRARIES "org.apache.incubator.celix.helloworld.sub")
-    #IMPORT_LIBRARIES "org.apache.incubator.celix.helloworld.sub;version=\"[1.0,2.0\)\"")
-target_link_libraries(hello_world_test celix_framework)
-target_link_libraries(hello_world_test org.apache.incubator.celix.helloworld.sub)
+#############################################################################
+## NOTE Examples of using add_bundle and add_deploy and assorted commands ##
+#############################################################################
+
 include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/examples/hello_world/public/include")
-include_directories("private/include")
+include_directories(public/include)
+
+add_bundle(hellotest1
+    VERSION "1.2"
+    SOURCES
+        private/src/activator
+)
+
+bundle_headers(hellotest1
+    "X-WebContent: web"
+    "X-MediaType: application/json"
+)
+
+add_library(tlib SHARED
+    private/src/test
+)
+set_library_version(tlib "4.3.2") # sets target propery VERSION to 4.3.2 and SOVERSION to 4
+
+bundle_private_libs(hellotest1
+    #/usr/local/lib/libjansson.4.dylib
+    /usr/lib64/libjansson.so.4
+)
+bundle_private_libs(hellotest1
+    tlib
+    #/usr/lib/libcurl.4.dylib 
+    /usr/lib64/libcurl.so.4
+)
+
+
+add_deploy(hello_test_deploy
+    BUNDLES hellotest1 hellotest2 #NOTE hellotest2 is still a unknown target
+    PROPERTIES 
+        "Test=true"
+)
+
+#add_deploy(hello_test_deploy_fail
+#    BUNDLES nonexisting
+#)
+
+#NOTE: Gives error:
+#Error evaluating generator expression:
+#
+#    $<TARGET_PROPERTY:nonexisting,BUNDLE_FILE>
+#
+#  Target "nonexisting" not found.
+
+
+
+add_library(hello2act SHARED
+    private/src/activator
+)
+set_library_version(hello2act "3.2.4") #sets VERSION prop to 3.2.4 and SOVERSION to 3
+add_bundle(hellotest2
+    VERSION "1.0.0" #can be the same as activator lib, but does not have to be
+    ACTIVATOR hello2act
+)
+
+add_bundle(hellotest3
+    VERSION "2.1.2"
+    #ACTIVATOR /usr/local/lib/libjansson.4.dylib
+    ACTIVATOR /usr/lib64/libjansson.so.4
+)
+
+

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/hello_world_test/private/src/activator.c
----------------------------------------------------------------------
diff --git a/examples/hello_world_test/private/src/activator.c b/examples/hello_world_test/private/src/activator.c
index 1a5f724..8bf9501 100644
--- a/examples/hello_world_test/private/src/activator.c
+++ b/examples/hello_world_test/private/src/activator.c
@@ -28,7 +28,6 @@
 
 #include "bundle_activator.h"
 
-#include "test.h"
 
 struct userData {
 	char * word;
@@ -49,8 +48,6 @@ celix_status_t bundleActivator_start(void * userData, bundle_context_pt __attrib
 	struct userData * data = (struct userData *) userData;
 	printf("Hello %s\n", data->word);
 
-	doo();
-
 	return CELIX_SUCCESS;
 }
 

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/hello_world_test/private/src/test.c
----------------------------------------------------------------------
diff --git a/examples/hello_world_test/private/src/test.c b/examples/hello_world_test/private/src/test.c
new file mode 100644
index 0000000..280fc61
--- /dev/null
+++ b/examples/hello_world_test/private/src/test.c
@@ -0,0 +1,32 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * test.c
+ *
+ *  \date       12 Feb 2014
+ *  \author     <a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ *  \copyright  Apache License, Version 2.0
+ */
+
+#include <stdio.h>
+
+void doo()
+{
+    printf("Hello from second lib\n");
+}

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/hello_world_test/public/include/test.h
----------------------------------------------------------------------
diff --git a/examples/hello_world_test/public/include/test.h b/examples/hello_world_test/public/include/test.h
new file mode 100644
index 0000000..cdbd05d
--- /dev/null
+++ b/examples/hello_world_test/public/include/test.h
@@ -0,0 +1,34 @@
+/**
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ */
+/*
+ * test.h
+ *
+ *  \date       12 Feb 2014
+ *  \author     <a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ *  \copyright  Apache License, Version 2.0
+ */
+
+#ifndef TEST_H_
+#define TEST_H_
+
+
+void doo(void);
+
+
+#endif /* TEST_H_ */

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/locking/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/locking/CMakeLists.txt b/examples/locking/CMakeLists.txt
index ccbdb70..fee34c6 100644
--- a/examples/locking/CMakeLists.txt
+++ b/examples/locking/CMakeLists.txt
@@ -24,3 +24,11 @@ add_subdirectory(mutex_benchmark)
 #add_subdirectory(reference_benchmark)
 #add_subdirectory(start_stop_benchmark)
 #add_subdirectory(modified_bool_benchmark)
+
+
+#add_deploy("locking_example_reference" BUNDLES benchmark_runner reference_benchmark math_provider shell shell_tui log_service log_writer)
+add_deploy("locking_example_mutex" BUNDLES benchmark_runner mutex_benchmark math_provider shell shell_tui log_service log_writer)
+
+#add_deploy("locking_example_suspend" BUNDLES benchmark_runner start_stop_benchmark math_provider shell shell_tui log_service log_writer)
+#add_deploy("locking_example_rcu" BUNDLES benchmark_runner rcu_benchmark mutex_benchmark math_provider shell shell_tui log_service log_writer)
+

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/locking/benchmark/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/locking/benchmark/CMakeLists.txt b/examples/locking/benchmark/CMakeLists.txt
index 12db9f5..7992c36 100644
--- a/examples/locking/benchmark/CMakeLists.txt
+++ b/examples/locking/benchmark/CMakeLists.txt
@@ -15,17 +15,16 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME benchmark_runner)
-SET(BUNDLE_VERSION 0.0.0)
-
 include_directories(private/include)
 include_directories(public/include)
 include_directories(${PROJECT_SOURCE_DIR}/framework/public/include)
 include_directories(${PROJECT_SOURCE_DIR}/utils/public/include)
 include_directories(${PROJECT_SOURCE_DIR}/shell/public/include)
 
-bundle(benchmark_runner SOURCES
-	private/src/benchmark_runner_activator 
+add_bundle(benchmark_runner
+	VERSION 0.0.1
+	SOURCES
+		private/src/benchmark_runner_activator
 )
 
 target_link_libraries(benchmark_runner celix_framework)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/locking/deploy.cmake
----------------------------------------------------------------------
diff --git a/examples/locking/deploy.cmake b/examples/locking/deploy.cmake
deleted file mode 100644
index ddc784e..0000000
--- a/examples/locking/deploy.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-is_enabled(EXAMPLES)
-if (EXAMPLES)
-
-	#deploy("locking_example_reference" BUNDLES benchmark_runner reference_benchmark math_provider shell shell_tui log_service log_writer)
-	deploy("locking_example_mutex" BUNDLES benchmark_runner mutex_benchmark math_provider shell shell_tui log_service log_writer)
-
-	#deploy("locking_example_suspend" BUNDLES benchmark_runner start_stop_benchmark math_provider shell shell_tui log_service log_writer)
-	#deploy("locking_example_rcu" BUNDLES benchmark_runner rcu_benchmark mutex_benchmark math_provider shell shell_tui log_service log_writer)
-
-endif (EXAMPLES)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/locking/math_provider/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/locking/math_provider/CMakeLists.txt b/examples/locking/math_provider/CMakeLists.txt
index 31be386..de83d7e 100644
--- a/examples/locking/math_provider/CMakeLists.txt
+++ b/examples/locking/math_provider/CMakeLists.txt
@@ -15,9 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME math_provider)
-SET(BUNDLE_VERSION 0.0.0)
-
 include_directories(public/include)
 include_directories(../benchmark/public/include)
 include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
@@ -25,9 +22,11 @@ include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/shell/public/include")
 include_directories(private/include)
 
-bundle(math_provider SOURCES 
-	private/src/provider_activator 
-	private/src/math_component
+add_bundle(math_provider
+	VERSION 0.0.1
+	SOURCES
+		private/src/provider_activator
+		private/src/math_component
 )
 
 target_link_libraries(math_provider celix_framework)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/locking/modified_bool_benchmark/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/locking/modified_bool_benchmark/CMakeLists.txt b/examples/locking/modified_bool_benchmark/CMakeLists.txt
index 46ceb7a..4f3d002 100644
--- a/examples/locking/modified_bool_benchmark/CMakeLists.txt
+++ b/examples/locking/modified_bool_benchmark/CMakeLists.txt
@@ -15,10 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME bool_benchmark)
-SET(BUNDLE_VERSION 0.0.0)
-
-bundle(modified_bool_benchmark SOURCES
+add_bundle(modified_bool_benchmark SOURCES
 	../benchmark/public/src/benchmark_activator
 	private/src/modified_bool_benchmark 
 )

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/locking/mutex_benchmark/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/locking/mutex_benchmark/CMakeLists.txt b/examples/locking/mutex_benchmark/CMakeLists.txt
index 11aa1f7..71ab71d 100644
--- a/examples/locking/mutex_benchmark/CMakeLists.txt
+++ b/examples/locking/mutex_benchmark/CMakeLists.txt
@@ -15,18 +15,17 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME mutex_benchmark)
-SET(BUNDLE_VERSION 0.0.0)
-
 include_directories(public/include)
 include_directories(../benchmark/public/include)
 include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/shell/public/include")
 
-bundle(mutex_benchmark SOURCES
-	../benchmark/public/src/benchmark_activator
-	private/src/mutex_benchmark 
+add_bundle(mutex_benchmark
+	VERSION 0.0.1
+	SOURCES
+		../benchmark/public/src/benchmark_activator
+		private/src/mutex_benchmark
 )
 
 target_link_libraries(mutex_benchmark celix_framework)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/locking/reference_benchmark/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/locking/reference_benchmark/CMakeLists.txt b/examples/locking/reference_benchmark/CMakeLists.txt
index 592bb9c..017d195 100644
--- a/examples/locking/reference_benchmark/CMakeLists.txt
+++ b/examples/locking/reference_benchmark/CMakeLists.txt
@@ -15,10 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME reference_benchmark)
-SET(BUNDLE_VERSION 0.0.0)
-
-bundle(reference_benchmark SOURCES
+add_bundle(reference_benchmark SOURCES
 	../benchmark/public/src/benchmark_activator
 	private/src/reference_benchmark 
 )

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/locking/start_stop_benchmark/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/locking/start_stop_benchmark/CMakeLists.txt b/examples/locking/start_stop_benchmark/CMakeLists.txt
index bca651e..ec88166 100644
--- a/examples/locking/start_stop_benchmark/CMakeLists.txt
+++ b/examples/locking/start_stop_benchmark/CMakeLists.txt
@@ -15,10 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME stop_benchmark)
-SET(BUNDLE_VERSION 0.0.0)
-
-bundle(start_stop_benchmark SOURCES
+add_bundle(start_stop_benchmark SOURCES
 	../benchmark/public/src/benchmark_activator
 	private/src/start_stop_benchmark 
 )

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/mongoose/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/mongoose/CMakeLists.txt b/examples/mongoose/CMakeLists.txt
index f67c3fc..0ef71e3 100644
--- a/examples/mongoose/CMakeLists.txt
+++ b/examples/mongoose/CMakeLists.txt
@@ -15,8 +15,8 @@
 # specific language governing permissions and limitations
 # under the License.
 
-add_library(mongoose STATIC private/src/mongoose.c)
-SET_TARGET_PROPERTIES(mongoose PROPERTIES COMPILE_FLAGS -fPIC)
+add_library(mongooselib STATIC private/src/mongoose.c)
+SET_TARGET_PROPERTIES(mongooselib PROPERTIES COMPILE_FLAGS -fPIC)
 
 SET(BUNDLE_SYMBOLICNAME "apache_celix_examples_mongoose")
 SET(BUNDLE_VERSION "0.0.1")
@@ -28,14 +28,11 @@ if(WIN32)
 	  set(LIBS wsock32)
 endif(WIN32)
 
-bundle(
+add_bundle(mongoose
+    VERSION 0.0.1
     SOURCES
         private/src/activator
-    
         private/include/mongoose.h
-    DIRECTORIES 
-        root
-    LINK_LIBRARIES
-        celix_framework mongoose ${LIBS}
-        
-)
\ No newline at end of file
+)
+
+target_link_libraries(mongoose celix_framework mongooselib ${LIBS})
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/osgi-in-action/chapter01-greeting-example/client/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/osgi-in-action/chapter01-greeting-example/client/CMakeLists.txt b/examples/osgi-in-action/chapter01-greeting-example/client/CMakeLists.txt
index a124709..4639292 100644
--- a/examples/osgi-in-action/chapter01-greeting-example/client/CMakeLists.txt
+++ b/examples/osgi-in-action/chapter01-greeting-example/client/CMakeLists.txt
@@ -15,10 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME "apache_celix_examples_chapter01_greeting_example_client")
-SET(BUNDLE_VERSION "0.0.1")
-
-bundle(chapter01-greeting-example-client SOURCES private/src/client)
+add_bundle(chapter01-greeting-example-client VERSION 0.0.1 SOURCES private/src/client)
 include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
 include_directories("../greeting/public/include")
 target_link_libraries(chapter01-greeting-example-client celix_framework)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/osgi-in-action/chapter01-greeting-example/greeting/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/osgi-in-action/chapter01-greeting-example/greeting/CMakeLists.txt b/examples/osgi-in-action/chapter01-greeting-example/greeting/CMakeLists.txt
index 1127439..625cbda 100644
--- a/examples/osgi-in-action/chapter01-greeting-example/greeting/CMakeLists.txt
+++ b/examples/osgi-in-action/chapter01-greeting-example/greeting/CMakeLists.txt
@@ -15,10 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME "apache_celix_examples_chapter01_greeting_example")
-SET(BUNDLE_VERSION "0.0.1")
-
-bundle(chapter01-greeting-example SOURCES
+add_bundle(chapter01-greeting-example VERSION 0.0.1 SOURCES
     private/src/activator
     private/src/greeting_impl
     

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/osgi-in-action/chapter04-correct-listener/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/osgi-in-action/chapter04-correct-listener/CMakeLists.txt b/examples/osgi-in-action/chapter04-correct-listener/CMakeLists.txt
index 29ea04b..2e68124 100644
--- a/examples/osgi-in-action/chapter04-correct-listener/CMakeLists.txt
+++ b/examples/osgi-in-action/chapter04-correct-listener/CMakeLists.txt
@@ -16,8 +16,7 @@
 # under the License.
 
 SET(BUNDLE_SYMBOLICNAME "apache_celix_examples_chapter04_correct_listener")
-SET(BUNDLE_VERSION "0.0.1")
-bundle(chapter04-correct-listener SOURCES private/src/listener_example)
+add_bundle(chapter04-correct-listener VERSION 0.0.1 SOURCES private/src/listener_example)
 include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
 target_link_libraries(chapter04-correct-listener celix_framework)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/osgi-in-action/chapter04-correct-lookup/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/osgi-in-action/chapter04-correct-lookup/CMakeLists.txt b/examples/osgi-in-action/chapter04-correct-lookup/CMakeLists.txt
index fdd2f7b..abbb3cf 100644
--- a/examples/osgi-in-action/chapter04-correct-lookup/CMakeLists.txt
+++ b/examples/osgi-in-action/chapter04-correct-lookup/CMakeLists.txt
@@ -15,10 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME "apache_celix_examples_chapter04_correct_lookup")
-SET(BUNDLE_VERSION "0.0.1")
-
-bundle(chapter04-correct-lookup SOURCES private/src/activator)
+add_bundle(chapter04-correct-lookup VERSION 0.0.1 SOURCES private/src/activator)
 include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
 target_link_libraries(chapter04-correct-lookup celix_framework)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt b/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt
index 4eeac73..23537c3 100644
--- a/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt
+++ b/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt
@@ -24,6 +24,8 @@ if(PKG_CONFIG_EXECUTABLE)
 	add_subdirectory(paint)
 	add_subdirectory(square)
 	add_subdirectory(triangle)
+
+	add_deploy("chapter04-paint-example" BUNDLES chapter04-paint-example circle square triangle shell shell_tui log_service log_writer)
 else(PKG_CONFIG_EXECUTABLE)
 	MESSAGE("No GTK found, not building the Paint Example")	
 endif(PKG_CONFIG_EXECUTABLE)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/osgi-in-action/chapter04-paint-example/circle/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/osgi-in-action/chapter04-paint-example/circle/CMakeLists.txt b/examples/osgi-in-action/chapter04-paint-example/circle/CMakeLists.txt
index 4fee874..5769ac9 100644
--- a/examples/osgi-in-action/chapter04-paint-example/circle/CMakeLists.txt
+++ b/examples/osgi-in-action/chapter04-paint-example/circle/CMakeLists.txt
@@ -31,7 +31,7 @@ link_directories(${GTK_LIBRARY_DIRS})
 link_directories(${GLIB_LIBRARY_DIRS})
 link_directories(${GTHR_LIBRARY_DIRS})
 
-bundle(circle SOURCES 
+add_bundle(circle VERSION 0.0.1 SOURCES
  	private/src/activator
  	private/src/circle_shape
     

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/osgi-in-action/chapter04-paint-example/deploy.cmake
----------------------------------------------------------------------
diff --git a/examples/osgi-in-action/chapter04-paint-example/deploy.cmake b/examples/osgi-in-action/chapter04-paint-example/deploy.cmake
deleted file mode 100644
index 1ad24bf..0000000
--- a/examples/osgi-in-action/chapter04-paint-example/deploy.cmake
+++ /dev/null
@@ -1,22 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-is_enabled(EXAMPLES)
-if (EXAMPLES)
-	if(PKG_CONFIG_EXECUTABLE)
-		#deploy("chapter04-paint-example" BUNDLES chapter04-paint-example circle square triangle shell shell_tui log_service log_writer)
-	endif(PKG_CONFIG_EXECUTABLE)
-endif (EXAMPLES)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/osgi-in-action/chapter04-paint-example/paint/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/osgi-in-action/chapter04-paint-example/paint/CMakeLists.txt b/examples/osgi-in-action/chapter04-paint-example/paint/CMakeLists.txt
index 2e97760..6caa87f 100644
--- a/examples/osgi-in-action/chapter04-paint-example/paint/CMakeLists.txt
+++ b/examples/osgi-in-action/chapter04-paint-example/paint/CMakeLists.txt
@@ -35,7 +35,7 @@ link_directories(${GLIB_LIBRARY_DIRS})
 link_directories(${GTHR_LIBRARY_DIRS})
 link_directories(${GMODULE_LIBRARY_DIRS})
 
-bundle(chapter04-paint-example SOURCES 
+add_bundle(chapter04-paint-example  VERSION 0.0.1 SOURCES
 	private/src/activator
 	private/src/default_shape
 	private/src/shape_component

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/osgi-in-action/chapter04-paint-example/square/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/osgi-in-action/chapter04-paint-example/square/CMakeLists.txt b/examples/osgi-in-action/chapter04-paint-example/square/CMakeLists.txt
index d29b914..df87ee4 100644
--- a/examples/osgi-in-action/chapter04-paint-example/square/CMakeLists.txt
+++ b/examples/osgi-in-action/chapter04-paint-example/square/CMakeLists.txt
@@ -31,7 +31,7 @@ link_directories(${GTK_LIBRARY_DIRS})
 link_directories(${GLIB_LIBRARY_DIRS})
 link_directories(${GTHR_LIBRARY_DIRS})
 
-bundle(square SOURCES 
+add_bundle(square  VERSION 0.0.1  SOURCES
  	private/src/activator
  	private/src/square_shape
     

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/osgi-in-action/chapter04-paint-example/triangle/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/osgi-in-action/chapter04-paint-example/triangle/CMakeLists.txt b/examples/osgi-in-action/chapter04-paint-example/triangle/CMakeLists.txt
index d86295e..ff069b3 100644
--- a/examples/osgi-in-action/chapter04-paint-example/triangle/CMakeLists.txt
+++ b/examples/osgi-in-action/chapter04-paint-example/triangle/CMakeLists.txt
@@ -31,7 +31,7 @@ link_directories(${GTK_LIBRARY_DIRS})
 link_directories(${GLIB_LIBRARY_DIRS})
 link_directories(${GTHR_LIBRARY_DIRS})
 
-bundle(triangle SOURCES 
+add_bundle(triangle  VERSION 0.0.1 SOURCES
  	private/src/activator
  	private/src/triangle_shape
     

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/producer_consumer/consumer/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/producer_consumer/consumer/CMakeLists.txt b/examples/producer_consumer/consumer/CMakeLists.txt
index 4306d96..2803af7 100644
--- a/examples/producer_consumer/consumer/CMakeLists.txt
+++ b/examples/producer_consumer/consumer/CMakeLists.txt
@@ -15,15 +15,11 @@
 # specific language governing permissions and limitations
 # under the License.
 
-set(BUNDLE_SYMBOLICNAME "apache_celix_examples_consumer")
-set(BUNDLE_VERSION "1.0.0")
-set(BUNDLE_NAME "Apache Celix Consumer")
-
-
 include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/examples/producer_consumer/database/public/include")
 
-bundle(consumer
+add_bundle(consumer
+	VERSION 1.0.0
 	SOURCES
 	 	private/src/activator.c
 )

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/producer_consumer/database/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/producer_consumer/database/CMakeLists.txt b/examples/producer_consumer/database/CMakeLists.txt
index 87e8288..40b8b35 100644
--- a/examples/producer_consumer/database/CMakeLists.txt
+++ b/examples/producer_consumer/database/CMakeLists.txt
@@ -15,16 +15,12 @@
 # specific language governing permissions and limitations
 # under the License.
 
-set(BUNDLE_SYMBOLICNAME "apache_celix_examples_database")
-set(BUNDLE_VERSION "1.0.0")
-set(BUNDLE_NAME "Apache Celix Database")
-
-
 include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/examples/producer_consumer/database/private/include")
 include_directories("${PROJECT_SOURCE_DIR}/examples/producer_consumer/database/public/include")
 
-bundle(database 
+add_bundle(database
+	VERSION 1.0.0
 	SOURCES private/src/activator 
 		private/src/writer 
 		private/src/reader

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/producer_consumer/producer/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/producer_consumer/producer/CMakeLists.txt b/examples/producer_consumer/producer/CMakeLists.txt
index 6d764c8..83ba7d4 100644
--- a/examples/producer_consumer/producer/CMakeLists.txt
+++ b/examples/producer_consumer/producer/CMakeLists.txt
@@ -15,15 +15,11 @@
 # specific language governing permissions and limitations
 # under the License.
 
-set(BUNDLE_SYMBOLICNAME "apache_celix_examples_producer")
-set(BUNDLE_VERSION "1.0.0")
-set(BUNDLE_NAME "Apache Celix Producer")
-
-
 include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/examples/producer_consumer/database/public/include")
 
-bundle(producer
+add_bundle(producer
+	VERSION 1.0.0
 	SOURCES
 	 	private/src/activator.c
 )

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/whiteboard/publisherA/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/whiteboard/publisherA/CMakeLists.txt b/examples/whiteboard/publisherA/CMakeLists.txt
index ac86c00..a219360 100644
--- a/examples/whiteboard/publisherA/CMakeLists.txt
+++ b/examples/whiteboard/publisherA/CMakeLists.txt
@@ -15,10 +15,8 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME "apache_celix_examples_publisher_a")
-SET(BUNDLE_VERSION "0.0.1")
 
-bundle(publisherA SOURCES private/src/activator private/src/publisher)
+add_bundle(publisherA VERSION 1.0.0 SOURCES private/src/activator private/src/publisher)
 include_directories("../publisherService/public/include")
 include_directories("../publisherService/private/include")
 include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/whiteboard/publisherB/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/whiteboard/publisherB/CMakeLists.txt b/examples/whiteboard/publisherB/CMakeLists.txt
index 5cc712e..74f0bb5 100644
--- a/examples/whiteboard/publisherB/CMakeLists.txt
+++ b/examples/whiteboard/publisherB/CMakeLists.txt
@@ -15,10 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME "apache_celix_examples_publisher_b")
-SET(BUNDLE_VERSION "0.0.1")
-
-bundle(publisherB SOURCES private/src/activator private/src/publisher)
+add_bundle(publisherB VERSION 1.0.0 SOURCES private/src/activator private/src/publisher)
 include_directories("../publisherService/public/include")
 include_directories("../publisherService/private/include")
 target_link_libraries(publisherB celix_framework)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/whiteboard/tracker/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/whiteboard/tracker/CMakeLists.txt b/examples/whiteboard/tracker/CMakeLists.txt
index c18763c..c44b206 100644
--- a/examples/whiteboard/tracker/CMakeLists.txt
+++ b/examples/whiteboard/tracker/CMakeLists.txt
@@ -15,10 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME "apache_celix_examples_tracker")
-SET(BUNDLE_VERSION "0.0.1")
-
-bundle(tracker SOURCES private/src/activator)
+add_bundle(tracker VERSION 1.0.0 SOURCES private/src/activator)
 include_directories("../publisherService/public/include")
 include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
 target_link_libraries(tracker celix_framework)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/examples/whiteboard/tracker_depman/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/whiteboard/tracker_depman/CMakeLists.txt b/examples/whiteboard/tracker_depman/CMakeLists.txt
index 9cc1b07..895da6c 100644
--- a/examples/whiteboard/tracker_depman/CMakeLists.txt
+++ b/examples/whiteboard/tracker_depman/CMakeLists.txt
@@ -15,10 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(BUNDLE_SYMBOLICNAME "apache_celix_examples_tracker_dm")
-SET(BUNDLE_VERSION "0.0.1")
-
-bundle(tracker_depman SOURCES
+add_bundle(tracker_depman VERSION 1.0.0 SOURCES
     private/src/dependency_activator
     private/src/tracker
     

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/framework/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/framework/CMakeLists.txt b/framework/CMakeLists.txt
index 8d71524..2bc6980 100644
--- a/framework/CMakeLists.txt
+++ b/framework/CMakeLists.txt
@@ -30,12 +30,13 @@ if (FRAMEWORK)
     #    DESCRIPTION "The Apache Celix framework library"
     #    REQUIRED
     #)
-    
-    CELIX_ADD_COMPONENT(framework
-    	DISPLAY_NAME Framework
-        DESCRIPTION "The Apache Celix framework library"
-        GROUP all
-    )
+
+    #TODO setup intall framework
+    #CELIX_ADD_COMPONENT(framework
+    #	DISPLAY_NAME Framework
+    #    DESCRIPTION "The Apache Celix framework library"
+    #    GROUP all
+    #)
     
     add_definitions(-DUSE_FILE32API)
     include_directories(${ZLIB_INCLUDE_DIR})
@@ -69,6 +70,7 @@ if (FRAMEWORK)
 		${IO}
 	 
 	)
+    set_target_properties(celix_framework PROPERTIES "SOVERSION" 2)
 	if(NOT APPLE)
       set(UUID ${UUID_LIBRARY})
     endif()

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/framework/private/integration-test/test_bundle1/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/framework/private/integration-test/test_bundle1/CMakeLists.txt b/framework/private/integration-test/test_bundle1/CMakeLists.txt
index c37cf74..a8d9d53 100644
--- a/framework/private/integration-test/test_bundle1/CMakeLists.txt
+++ b/framework/private/integration-test/test_bundle1/CMakeLists.txt
@@ -15,9 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_test_bundle1")
-SET_HEADERS("Bundle-Name: Apache Celix TestBundle1") 
-	
-bundle(test_bundle1 SOURCES src/activator)
+add_bundle(test_bundle1 SOURCES src/activator VERSION 0.0.1)
 include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
-target_link_libraries(test_bundle1 celix_framework)
\ No newline at end of file
+target_link_libraries(test_bundle1 celix_framework)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/framework/private/src/framework.c
----------------------------------------------------------------------
diff --git a/framework/private/src/framework.c b/framework/private/src/framework.c
index 8da65d1..2748c90 100644
--- a/framework/private/src/framework.c
+++ b/framework/private/src/framework.c
@@ -2435,12 +2435,10 @@ static celix_status_t framework_loadBundleLibraries(framework_pt framework, bund
     status = CELIX_DO_IF(status, bundleArchive_getCurrentRevision(archive, &revision));
     status = CELIX_DO_IF(status, bundleRevision_getManifest(revision, &manifest));
     if (status == CELIX_SUCCESS) {
-        char *library = NULL;
         char *privateLibraries = NULL;
         char *exportLibraries = NULL;
         char *activator = NULL;
 
-        library = manifest_getValue(manifest, OSGI_FRAMEWORK_HEADER_LIBRARY);
         privateLibraries = manifest_getValue(manifest, OSGI_FRAMEWORK_PRIVATE_LIBRARY);
         exportLibraries = manifest_getValue(manifest, OSGI_FRAMEWORK_EXPORT_LIBRARY);
         activator = manifest_getValue(manifest, OSGI_FRAMEWORK_BUNDLE_ACTIVATOR);
@@ -2450,11 +2448,8 @@ static celix_status_t framework_loadBundleLibraries(framework_pt framework, bund
         }
 
         if (privateLibraries != NULL) {
-            status = CELIX_DO_IF(status, framework_loadLibraries(framework, privateLibraries, activator, archive, &handle));
-        }
-
-        if (library != NULL) {
-            status = CELIX_DO_IF(status, framework_loadLibrary(framework, library, archive, &handle));
+            status = CELIX_DO_IF(status,
+                                 framework_loadLibraries(framework, privateLibraries, activator, archive, &handle));
         }
 
         if (status == CELIX_SUCCESS) {
@@ -2483,6 +2478,8 @@ static celix_status_t framework_loadLibraries(framework_pt framework, char *libr
         pathToken = strtok_r(NULL, ";", &path);
 
         while (pathToken != NULL) {
+
+            /*Disable version should be part of the lib name
             if (strncmp(pathToken, "version", 7) == 0) {
                 char *ver = strdup(pathToken);
                 char version[strlen(ver) - 9];
@@ -2491,15 +2488,16 @@ static celix_status_t framework_loadLibraries(framework_pt framework, char *libr
 
                 strcat(lib, "-");
                 strcat(lib, version);
-            }
+            }*/
             pathToken = strtok_r(NULL, ";", &path);
         }
 
-        status = framework_loadLibrary(framework, lib, archive, &handle);
+        char *trimmedLib = utils_stringTrim(lib);
+        status = framework_loadLibrary(framework, trimmedLib, archive, &handle);
 
         if (status == CELIX_SUCCESS) {
             if (activator != NULL) {
-                if (strcmp(lib, activator) == 0) {
+                if (strcmp(trimmedLib, activator) == 0) {
                     *activatorHandle = handle;
                 }
             }
@@ -2537,8 +2535,13 @@ static celix_status_t framework_loadLibrary(framework_pt framework, char *librar
     status = CELIX_DO_IF(status, bundleArchive_getArchiveRoot(archive, &archiveRoot));
     status = CELIX_DO_IF(status, bundleArchive_getCurrentRevisionNumber(archive, &revisionNumber));
 
-    memset(libraryPath, 0, sizeof(libraryPath));
-    int written = snprintf(libraryPath, 256, "%s/version%ld.%ld/%s%s%s", archiveRoot, refreshCount, revisionNumber, library_prefix, library, library_extension);
+    memset(libraryPath, 0, 256);
+    int written = 0;
+    if (strncmp("lib", library, 3) == 0) {
+        written = snprintf(libraryPath, 256, "%s/version%ld.%ld/%s", archiveRoot, refreshCount, revisionNumber, library);
+    } else {
+        written = snprintf(libraryPath, 256, "%s/version%ld.%ld/%s%s%s", archiveRoot, refreshCount, revisionNumber, library_prefix, library, library_extension);
+    }
 
     if (written >= 256) {
     	error = "library path is too long";

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/framework/private/src/manifest.c
----------------------------------------------------------------------
diff --git a/framework/private/src/manifest.c b/framework/private/src/manifest.c
index b84cb26..3cbb0e7 100644
--- a/framework/private/src/manifest.c
+++ b/framework/private/src/manifest.c
@@ -186,7 +186,8 @@ void manifest_write(manifest_pt manifest, char * filename) {
 
 char * manifest_getValue(manifest_pt manifest, const char * name) {
 	char * val = properties_get(manifest->mainAttributes, (char *) name);
-	return val;
+	bool isEmpty = utils_isStringEmptyOrNull(val);
+	return isEmpty ? NULL : val;
 }
 
 int fpeek(FILE *stream) {

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/framework/private/src/utils.c
----------------------------------------------------------------------
diff --git a/framework/private/src/utils.c b/framework/private/src/utils.c
index 862fba9..f8e5d1f 100644
--- a/framework/private/src/utils.c
+++ b/framework/private/src/utils.c
@@ -77,9 +77,26 @@ char * utils_stringTrim(char * string) {
 		end--;
 	}
 
+
+
 	return copy;
 }
 
+bool utils_isStringEmptyOrNull(const char * const str) {
+	bool empty = true;
+	if (str != NULL) {
+		int i;
+		for (i = 0; i < strnlen(str, 1024 * 1024); i += 1) {
+			if (!isspace(str[i])) {
+				empty = false;
+				break;
+			}
+		}
+	}
+
+	return empty;
+}
+
 celix_status_t thread_equalsSelf(celix_thread_t thread, bool *equals) {
 	celix_status_t status = CELIX_SUCCESS;
 

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/framework/public/include/constants.h
----------------------------------------------------------------------
diff --git a/framework/public/include/constants.h b/framework/public/include/constants.h
index eb29233..1064752 100644
--- a/framework/public/include/constants.h
+++ b/framework/public/include/constants.h
@@ -40,8 +40,6 @@ static const char * const OSGI_FRAMEWORK_BUNDLE_ACTIVATOR_START = "bundleActivat
 static const char * const OSGI_FRAMEWORK_BUNDLE_ACTIVATOR_STOP = "bundleActivator_stop";
 static const char * const OSGI_FRAMEWORK_BUNDLE_ACTIVATOR_DESTROY = "bundleActivator_destroy";
 
-static const char * const OSGI_FRAMEWORK_HEADER_LIBRARY = "library";
-
 static const char * const OSGI_FRAMEWORK_BUNDLE_SYMBOLICNAME = "Bundle-SymbolicName";
 static const char * const OSGI_FRAMEWORK_BUNDLE_VERSION = "Bundle-Version";
 static const char * const OSGI_FRAMEWORK_PRIVATE_LIBRARY = "Private-Library";

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/framework/public/include/utils.h
----------------------------------------------------------------------
diff --git a/framework/public/include/utils.h b/framework/public/include/utils.h
index 19788d3..1ac2438 100644
--- a/framework/public/include/utils.h
+++ b/framework/public/include/utils.h
@@ -38,6 +38,7 @@ FRAMEWORK_EXPORT unsigned int utils_stringHash(void * string);
 FRAMEWORK_EXPORT int utils_stringEquals(void * string, void * toCompare);
 FRAMEWORK_EXPORT char * string_ndup(const char *s, size_t n);
 FRAMEWORK_EXPORT char * utils_stringTrim(char * string);
+FRAMEWORK_EXPORT bool utils_isStringEmptyOrNull(const char * const str);
 
 FRAMEWORK_EXPORT int utils_compareServiceIdsAndRanking(long servId, long servRank, long otherServId, long otherServRank);
 

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/log_service/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/log_service/CMakeLists.txt b/log_service/CMakeLists.txt
index b431db0..9d7357a 100644
--- a/log_service/CMakeLists.txt
+++ b/log_service/CMakeLists.txt
@@ -17,12 +17,11 @@
 
 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")
-	SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_log_service")
-	SET_HEADERS("Bundle-Name: Apache Celix Log Service")
-	
-    bundle(log_service 
+
+    add_bundle(log_service
+    	SYMBOLIC_NAME "apache_celix_log_service"
+    	NAME "Apache Celix Log Service"
+    	VERSION "1.0.0"
     	SOURCES
 			private/src/log
 			private/src/log_entry

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/log_writer/log_writer_stdout/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/log_writer/log_writer_stdout/CMakeLists.txt b/log_writer/log_writer_stdout/CMakeLists.txt
index 34c3f53..b7b1bab 100644
--- a/log_writer/log_writer_stdout/CMakeLists.txt
+++ b/log_writer/log_writer_stdout/CMakeLists.txt
@@ -15,16 +15,16 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_log_writer")
-SET_HEADERS("Bundle-Name: Apache Celix Log Writer")
-SET_HEADER(BUNDLE_VERSION "1.0.0")
+add_bundle(log_writer
+	SYMBOLIC_NAME "apache_celix_log_writer"
+	VERSION "1.0.0"
+	NAME "Apache Celix Log Writer"
+	SOURCES
+		${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/src/log_writer_activator
+		${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/src/log_writer
+		${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/include/log_writer.h
 
-bundle(log_writer SOURCES 
-	${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/src/log_writer_activator
-	${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/src/log_writer
-	${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/include/log_writer.h
-
-	private/src/log_writer_stdout
+		private/src/log_writer_stdout
 )
 
 install_bundle(log_writer)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/log_writer/log_writer_syslog/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/log_writer/log_writer_syslog/CMakeLists.txt b/log_writer/log_writer_syslog/CMakeLists.txt
index 6b066cc..142ddcd 100644
--- a/log_writer/log_writer_syslog/CMakeLists.txt
+++ b/log_writer/log_writer_syslog/CMakeLists.txt
@@ -18,11 +18,11 @@ celix_subproject(LOG_WRITER_SYSLOG "Option to enable building the Syslog Writer"
 if (LOG_WRITER_SYSLOG)
     find_package(Syslog REQUIRED)
 
-    SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_log_writer_syslog")
-    SET_HEADERS("Bundle-Name: Apache Celix Log Writer Syslog")
-    SET_HEADER(BUNDLE_VERSION "1.0.0")
-
-    bundle(log_writer_syslog SOURCES 
+    add_bundle(log_writer_syslog 
+        VERSION 1.0.0
+        SYMBOLIC_NAME "apache_celix_log_writer_syslog"
+        NAME "Apache Celix Log Writer Syslog"
+        SOURCES
         ${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/src/log_writer_activator
         ${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/src/log_writer
         ${PROJECT_SOURCE_DIR}/log_writer/log_writer/private/include/log_writer.h

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/discovery_configured/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/discovery_configured/CMakeLists.txt b/remote_services/discovery_configured/CMakeLists.txt
index e414572..32c51f5 100644
--- a/remote_services/discovery_configured/CMakeLists.txt
+++ b/remote_services/discovery_configured/CMakeLists.txt
@@ -31,11 +31,12 @@ if (RSA_DISCOVERY_CONFIGURED)
     include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
     include_directories(private/include)
 
-    SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_rsa_discovery_configured")
-    SET(BUNDLE_VERSION "0.0.1")
-    SET_HEADERS("Bundle-Name: Apache Celix RSA Configured Discovery")
+    add_bundle(discovery_configured 
+    VERSION 0.0.1
+    SYMBOLIC_NAME "apache_celix_rsa_discovery_configured"
+    NAME "Apache Celix RSA Configured Discovery"    
+    SOURCES
 
-    bundle(discovery_configured SOURCES
 	private/src/discovery_impl.c
 	${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/discovery_activator.c
 	${PROJECT_SOURCE_DIR}/remote_services/discovery/private/src/discovery.c

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/discovery_etcd/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/discovery_etcd/CMakeLists.txt b/remote_services/discovery_etcd/CMakeLists.txt
index aa1e08c..56bec30 100644
--- a/remote_services/discovery_etcd/CMakeLists.txt
+++ b/remote_services/discovery_etcd/CMakeLists.txt
@@ -33,13 +33,12 @@ if (RSA_DISCOVERY_ETCD)
 	include_directories("${PROJECT_SOURCE_DIR}/remote_services/remote_service_admin/public/include")
 	include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
 	include_directories("private/include")
-
-	SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_rsa_discovery_etcd")
-	SET(BUNDLE_VERSION "0.0.1")
-	SET_HEADERS("Bundle-Name: Apache Celix RSA Discovery ETCD")
-
     
-	bundle(discovery_etcd SOURCES
+	add_bundle(discovery_etcd 
+        VERSION 0.0.1
+        SYMBOLIC_NAME "apache_celix_rsa_discovery_etcd"
+        NAME "Apache Celix RSA Discovery ETCD"
+        SOURCES
 		private/src/discovery_impl.c
 		private/src/etcd.c
 	    private/src/etcd_watcher.c

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/discovery_shm/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/discovery_shm/CMakeLists.txt b/remote_services/discovery_shm/CMakeLists.txt
index 1e6ed00..862096c 100644
--- a/remote_services/discovery_shm/CMakeLists.txt
+++ b/remote_services/discovery_shm/CMakeLists.txt
@@ -32,11 +32,11 @@ find_package(CURL REQUIRED)
 	include_directories("${PROJECT_SOURCE_DIR}/log_service/public/include")
 	include_directories("private/include")
 
-	SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_rsa_discovery_shm")
-	SET(BUNDLE_VERSION "0.0.1")
-	SET_HEADERS("Bundle-Name: Apache Celix RSA Discovery SHM")
-
-	bundle(discovery_shm SOURCES 
+	add_bundle(discovery_shm 
+        VERSION 0.0.1
+        SYMBOLIC_NAME "apache_celix_rsa_discovery_shm"
+        NAME "Apache Celix RSA Discovery SHM"
+        SOURCES
 		private/src/discovery_shm
 		private/src/discovery_shmWatcher
 		private/src/discovery_impl

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/examples/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/examples/CMakeLists.txt b/remote_services/examples/CMakeLists.txt
index 9246a0f..1948c5b 100644
--- a/remote_services/examples/CMakeLists.txt
+++ b/remote_services/examples/CMakeLists.txt
@@ -26,6 +26,75 @@ if (RSA_EXAMPLES)
     add_subdirectory(calculator_proxy2)
 
     add_subdirectory(calculator_shell)
+
+    if(BUILD_RSA_REMOTE_SERVICE_ADMIN_HTTP AND BUILD_RSA_DISCOVERY_CONFIGURED)
+        add_deploy(remote-services-cfg-server 
+            NAME "server"
+            GROUP "remote-services/remote-services-cfg"
+            BUNDLES discovery_configured topology_manager remote_service_admin_http calculator shell shell_tui log_service log_writer
+            PROPERTIES
+                RSA_PORT=8001
+                DISCOVERY_CFG_POLL_ENDPOINTS=http://localhost:8082/org.apache.celix.discovery.configured
+                DISCOVERY_CFG_SERVER_PORT=8081
+        )
+        deploy_bundles_dir(remote-services-cfg-server DIR_NAME "endpoints" BUNDLES
+            org.apache.celix.calc.api.Calculator_endpoint
+            org.apache.celix.calc.api.Calculator2_endpoint
+        )
+
+        add_deploy(remote-services-cfg-client
+            NAME "client"
+            GROUP "remote-services/remote-services-cfg"
+            BUNDLES topology_manager remote_service_admin_http shell shell_tui log_service log_writer calculator_shell discovery_configured
+            PROPERTIES
+                RSA_PORT=8002
+                DISCOVERY_CFG_POLL_ENDPOINTS=http://localhost:8081/org.apache.celix.discovery.configured
+                DISCOVERY_CFG_SERVER_PORT=8082
+        )
+        deploy_bundles_dir(remote-services-cfg-client DIR_NAME "endpoints"
+            BUNDLES org.apache.celix.calc.api.Calculator_proxy org.apache.celix.calc.api.Calculator2_proxy
+        )
+    endif()
+
+    if (BUILD_RSA_REMOTE_SERVICE_ADMIN_SHM AND BUILD_RSA_DISCOVERY_SHM)
+        add_deploy(remote-services-shm 
+            NAME "server"
+            GROUP "remote-services/remote-services-shm"
+            BUNDLES discovery_shm topology_manager remote_service_admin_shm calculator shell shell_tui log_service log_writer
+        )
+        deploy_bundles_dir(remote-services-shm DIR_NAME "endpoints"
+            BUNDLES org.apache.celix.calc.api.Calculator_endpoint
+        )
+
+        add_deploy(remote-services-shm-client 
+            NAME "client"
+            GROUP "remote-services/remote-services-shm"
+            BUNDLES topology_manager remote_service_admin_shm shell shell_tui log_service log_writer calculator_shell discovery_shm
+        )
+        deploy_bundles_dir(remote-services-shm-client DIR_NAME "endpoints"
+            BUNDLES org.apache.celix.calc.api.Calculator_proxy
+        )
+    endif ()
+
+    if (BUILD_RSA_DISCOVERY_ETCD AND BUILD_RSA_REMOTE_SERVICE_ADMIN_HTTP)
+        add_deploy(remote-services-etcd 
+            NAME "server"
+            GROUP "remote-services/remote-services-etcd"
+            BUNDLES discovery_etcd topology_manager remote_service_admin_http calculator shell shell_tui log_service log_writer
+        )
+        deploy_bundles_dir(remote-services-etcd DIR_NAME "endpoints"
+            BUNDLES org.apache.celix.calc.api.Calculator_endpoint
+        )
+
+        add_deploy("remote-services-etcd-client" 
+            NAME "client"
+            GROUP "remote-services/remote-services-etcd"
+            BUNDLES topology_manager remote_service_admin_http shell shell_tui log_service log_writer calculator_shell discovery_etcd
+        )
+        deploy_bundles_dir(remote-services-etcd-client DIR_NAME "endpoints"
+            BUNDLES org.apache.celix.calc.api.Calculator_proxy
+        )
+    endif ()
 endif (RSA_EXAMPLES)
 
 

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/examples/calculator_endpoint/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/examples/calculator_endpoint/CMakeLists.txt b/remote_services/examples/calculator_endpoint/CMakeLists.txt
index 25e5ad3..6e9c928 100644
--- a/remote_services/examples/calculator_endpoint/CMakeLists.txt
+++ b/remote_services/examples/calculator_endpoint/CMakeLists.txt
@@ -23,14 +23,13 @@ include_directories("../../remote_service_admin/public/include")
 include_directories("../calculator_service/public/include")
 include_directories("private/include")
 
-SET(BUNDLE_SYMBOLICNAME "apache_celix_remoting_calculator_endpoint")
-SET(BUNDLE_VERSION "0.0.1")
-
-bundle(org.apache.celix.calc.api.Calculator_endpoint SOURCES 
+add_bundle(org.apache.celix.calc.api.Calculator_endpoint SOURCES
 	private/src/calculator_endpoint_activator
 	private/src/calculator_endpoint_impl.c
     
     private/include/calculator_endpoint_impl.h
+    VERSION 0.0.1
+    SYMBOLIC_NAME "apache_celix_remoting_calculator_endpoint"
 )
 
 target_link_libraries(org.apache.celix.calc.api.Calculator_endpoint celix_framework ${JANSSON_LIBRARIES})

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/examples/calculator_endpoint2/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/examples/calculator_endpoint2/CMakeLists.txt b/remote_services/examples/calculator_endpoint2/CMakeLists.txt
index 45bdf56..b75e6df 100644
--- a/remote_services/examples/calculator_endpoint2/CMakeLists.txt
+++ b/remote_services/examples/calculator_endpoint2/CMakeLists.txt
@@ -23,14 +23,13 @@ include_directories("../../remote_service_admin/public/include")
 include_directories("../calculator_service/public/include")
 include_directories("private/include")
 
-SET(BUNDLE_SYMBOLICNAME "apache_celix_remoting_calculator2_endpoint")
-SET(BUNDLE_VERSION "0.0.1")
-
-bundle(org.apache.celix.calc.api.Calculator2_endpoint SOURCES 
+add_bundle(org.apache.celix.calc.api.Calculator2_endpoint SOURCES
 	private/src/calculator_endpoint_activator
 	private/src/calculator_endpoint_impl.c
     
     private/include/calculator_endpoint_impl.h
+    SYMBOLIC_NAME "apache_celix_remoting_calculator2_endpoint"
+    VERSION "0.0.1"
 )
 
 target_link_libraries(org.apache.celix.calc.api.Calculator2_endpoint celix_framework ${JANSSON_LIBRARIES})

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/examples/calculator_proxy/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/examples/calculator_proxy/CMakeLists.txt b/remote_services/examples/calculator_proxy/CMakeLists.txt
index 855e74e..9bbf089 100644
--- a/remote_services/examples/calculator_proxy/CMakeLists.txt
+++ b/remote_services/examples/calculator_proxy/CMakeLists.txt
@@ -24,15 +24,14 @@ include_directories("private/include")
 include_directories("../calculator_service/public/include")
 include_directories("../../endpoint_listener/public/include")
 
-SET(BUNDLE_SYMBOLICNAME "apache_celix_remoting_calculator_proxy")
-SET(BUNDLE_VERSION "0.0.1")
-
-bundle(org.apache.celix.calc.api.Calculator_proxy SOURCES 
+add_bundle(org.apache.celix.calc.api.Calculator_proxy SOURCES
 	private/src/calculator_proxy_activator
 	private/src/calculator_proxy_impl.c
     ../../remote_service_admin/private/src/remote_proxy_factory_impl.c
     
     private/include/calculator_proxy_impl.h
+    VERSION 0.0.1
+    SYMBOLIC_NAME "apache_celix_remoting_calculator_proxy"
 )
 
 target_link_libraries(org.apache.celix.calc.api.Calculator_proxy celix_framework ${JANSSON_LIBRARIES})

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/examples/calculator_proxy2/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/examples/calculator_proxy2/CMakeLists.txt b/remote_services/examples/calculator_proxy2/CMakeLists.txt
index 3c6bf0f..01556e3 100644
--- a/remote_services/examples/calculator_proxy2/CMakeLists.txt
+++ b/remote_services/examples/calculator_proxy2/CMakeLists.txt
@@ -24,15 +24,14 @@ include_directories("private/include")
 include_directories("../calculator_service/public/include")
 include_directories("../../endpoint_listener/public/include")
 
-SET(BUNDLE_SYMBOLICNAME "apache_celix_remoting_calculator2_proxy")
-SET(BUNDLE_VERSION "0.0.1")
-
-bundle(org.apache.celix.calc.api.Calculator2_proxy SOURCES 
+add_bundle(org.apache.celix.calc.api.Calculator2_proxy SOURCES
 	private/src/calculator_proxy_activator
 	private/src/calculator_proxy_impl.c
     ../../remote_service_admin/private/src/remote_proxy_factory_impl.c
     
     private/include/calculator_proxy_impl.h
+    VERSION 0.0.1
+    SYMBOLIC_NAME "apache_celix_remoting_calculator2_proxy"
 )
 
 target_link_libraries(org.apache.celix.calc.api.Calculator2_proxy celix_framework ${JANSSON_LIBRARIES})

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/examples/calculator_service/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/examples/calculator_service/CMakeLists.txt b/remote_services/examples/calculator_service/CMakeLists.txt
index a3cad0d..a18f22b 100644
--- a/remote_services/examples/calculator_service/CMakeLists.txt
+++ b/remote_services/examples/calculator_service/CMakeLists.txt
@@ -21,17 +21,17 @@ include_directories("../../remote_service_admin/public/include")
 include_directories("private/include")
 include_directories("public/include")
 
-SET(BUNDLE_SYMBOLICNAME "apache_celix_remoting_calculator_impl")
-SET(BUNDLE_VERSION "0.0.1")
-
-    bundle(calculator SOURCES
+add_bundle(calculator SOURCES
 	private/src/calculator_impl
 	private/src/calculator_activator
     
     private/include/calculator_impl.h
 
-    FILES
-        public/include/org.apache.celix.calc.api.Calculator2.descriptor
+    SYMBOLIC_NAME "apache_celix_remoting_calculator_impl"
+    VERSION 0.0.1
 )
 
+bundle_files(calculator public/include/org.apache.celix.calc.api.Calculator2.descriptor
+    DESTINATION .)
+
 target_link_libraries(calculator celix_framework)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/examples/calculator_shell/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/examples/calculator_shell/CMakeLists.txt b/remote_services/examples/calculator_shell/CMakeLists.txt
index b93afca..e45f041 100644
--- a/remote_services/examples/calculator_shell/CMakeLists.txt
+++ b/remote_services/examples/calculator_shell/CMakeLists.txt
@@ -20,10 +20,7 @@ include_directories("../../../utils/public/include")
 include_directories("../calculator_service/public/include")
 include_directories("../../../shell/public/include")
 
-SET(BUNDLE_SYMBOLICNAME "apache_celix_remoting_calculator_shell")
-SET(BUNDLE_VERSION "0.0.1")
-
-bundle(calculator_shell SOURCES
+add_bundle(calculator_shell SOURCES
     private/src/add_command 
     private/src/sub_command
     private/src/sqrt_command
@@ -32,10 +29,14 @@ bundle(calculator_shell SOURCES
     private/include/add_command.h
     private/include/sqrt_command.h
     private/include/sub_command.h
+    
+    VERSION 0.0.1
+    SYMBOLIC_NAME "apache_celix_remoting_calculator_shell"
+)
 
-
-        FILES
-            ../calculator_service/public/include/org.apache.celix.calc.api.Calculator2.descriptor
+bundle_files(calculator_shell 
+    ../calculator_service/public/include/org.apache.celix.calc.api.Calculator2.descriptor
+    DESTINATION .
 )
 
 target_link_libraries(calculator_shell celix_framework)

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/examples/deploy.cmake
----------------------------------------------------------------------
diff --git a/remote_services/examples/deploy.cmake b/remote_services/examples/deploy.cmake
deleted file mode 100644
index 0515917..0000000
--- a/remote_services/examples/deploy.cmake
+++ /dev/null
@@ -1,59 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-is_enabled(RSA_EXAMPLES)
-if (RSA_EXAMPLES)
-    is_enabled(RSA_REMOTE_SERVICE_ADMIN_HTTP)
-    if (RSA_REMOTE_SERVICE_ADMIN_HTTP)
-        is_enabled(RSA_DISCOVERY_CONFIGURED)
-        if (RSA_DISCOVERY_CONFIGURED)
-            deploy("remote-services-cfg" BUNDLES discovery_configured topology_manager remote_service_admin_http calculator shell shell_tui log_service log_writer
-                                         ENDPOINTS
-                                            org.apache.celix.calc.api.Calculator_endpoint
-                                            org.apache.celix.calc.api.Calculator2_endpoint
-                                         PROPERTIES
-                                            RSA_PORT=8001
-                                            DISCOVERY_CFG_POLL_ENDPOINTS=http://localhost:8082/org.apache.celix.discovery.configured
-                                            DISCOVERY_CFG_SERVER_PORT=8081)
-            deploy("remote-services-cfg-client" BUNDLES topology_manager remote_service_admin_http shell shell_tui log_service log_writer calculator_shell discovery_configured
-                                                ENDPOINTS org.apache.celix.calc.api.Calculator_proxy org.apache.celix.calc.api.Calculator2_proxy
-                                            PROPERTIES
-                                                RSA_PORT=8002
-                                                DISCOVERY_CFG_POLL_ENDPOINTS=http://localhost:8081/org.apache.celix.discovery.configured
-                                                DISCOVERY_CFG_SERVER_PORT=8082)
-        endif ()
-    endif ()
-
-    is_enabled(RSA_REMOTE_SERVICE_ADMIN_SHM)
-    if (RSA_REMOTE_SERVICE_ADMIN_SHM)
-        is_enabled(RSA_DISCOVERY_SHM)
-        if (RSA_DISCOVERY_SHM)
-            deploy("remote-services-shm" BUNDLES discovery_shm topology_manager remote_service_admin_shm calculator shell shell_tui log_service log_writer
-                                         ENDPOINTS org.apache.celix.calc.api.Calculator_endpoint)
-            deploy("remote-services-shm-client" BUNDLES topology_manager remote_service_admin_shm shell shell_tui log_service log_writer calculator_shell discovery_shm
-                                                ENDPOINTS org.apache.celix.calc.api.Calculator_proxy)
-        endif ()
-    endif ()
-
-    is_enabled(RSA_DISCOVERY_ETCD)
-    if (RSA_DISCOVERY_ETCD)
-        deploy("remote-services-etcd" BUNDLES discovery_etcd topology_manager remote_service_admin_http calculator shell shell_tui log_service log_writer
-                                     ENDPOINTS org.apache.celix.calc.api.Calculator_endpoint)
-        deploy("remote-services-etcd-client" BUNDLES topology_manager remote_service_admin_http shell shell_tui log_service log_writer calculator_shell discovery_etcd
-                                            ENDPOINTS org.apache.celix.calc.api.Calculator_proxy)
-    endif ()
-
-endif (RSA_EXAMPLES)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/49ab9ab5/remote_services/remote_service_admin/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin/CMakeLists.txt b/remote_services/remote_service_admin/CMakeLists.txt
index 9d0f4f7..ac703e2 100644
--- a/remote_services/remote_service_admin/CMakeLists.txt
+++ b/remote_services/remote_service_admin/CMakeLists.txt
@@ -15,11 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 
-CELIX_ADD_COMPONENT(remote_service_admin
-    DISPLAY_NAME remote_service_admin
-    DESCRIPTION Public files needed for RSA implementations
-    GROUP bundles
-)
 install (FILES 
         public/include/remote_endpoint_impl.h
         public/include/remote_endpoint.h


[30/42] celix git commit: Merge branch 'develop' into feature/CELIX-335_deploy_refactoring

Posted by pn...@apache.org.
Merge branch 'develop' into feature/CELIX-335_deploy_refactoring


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/a43d78b3
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/a43d78b3
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/a43d78b3

Branch: refs/heads/develop
Commit: a43d78b30e012b03956db398bccd79e71a53739d
Parents: cd1f749 2eac60e
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Mon Jan 25 19:00:29 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Mon Jan 25 19:00:29 2016 +0100

----------------------------------------------------------------------
 .travis.yml                                     |  94 ++--
 BUILDING                                        |  17 +-
 CMakeLists.txt                                  |   6 +-
 Dockerfile.Android                              | 119 +++++
 README.md                                       |   2 +-
 cmake/cmake_celix/Config.cmake.in               |   4 +
 config_admin/CMakeLists.txt                     |  25 +-
 config_admin/config_admin_tst/CMakeLists.txt    |  47 ++
 .../config_admin_tst/config.properties.in       |  20 +
 .../config_admin_tst/config_admin_test.cpp      | 404 +++++++++++++++
 .../example_test/CMakeLists.txt                 |  31 ++
 .../example_test/META-INF/MANIFEST.MF           |   5 +
 .../include/example_managed_service_impl.h      |  68 +++
 .../example_test/private/src/activator.c        | 206 ++++++++
 .../private/src/example_managed_service_impl.c  | 103 ++++
 .../example_test2/CMakeLists.txt                |  30 ++
 .../example_test2/META-INF/MANIFEST.MF          |   5 +
 .../include/example2_managed_service_impl.h     |  66 +++
 .../example_test2/private/src/activator.c       | 227 ++++++++
 .../private/src/example_managed_service_impl.c  | 108 ++++
 config_admin/examples/CMakeLists.txt            |  21 -
 .../examples/example_test/CMakeLists.txt        |  31 --
 .../examples/example_test/META-INF/MANIFEST.MF  |   5 -
 .../include/example_managed_service_impl.h      |  53 --
 .../example_test/private/src/activator.c        | 188 -------
 .../private/src/example_managed_service_impl.c  |  94 ----
 .../examples/example_test2/CMakeLists.txt       |  21 -
 .../bundle_configuring/CMakeLists.txt           |  28 -
 .../bundle_configuring/META-INF/MANIFEST.MF     |   5 -
 .../bundle_configuring/private/src/activator.c  |  94 ----
 .../bundle_managed_service/CMakeLists.txt       |  30 --
 .../bundle_managed_service/META-INF/MANIFEST.MF |   5 -
 .../include/example_managed_service_impl.h      |  55 --
 .../private/src/activator.c                     | 120 -----
 .../private/src/example_managed_service_impl.c  |  95 ----
 config_admin/readme.md                          |  29 ++
 .../include/configuration_admin_factory.h       |   4 +-
 .../private/include/configuration_admin_impl.h  |   3 +-
 .../private/include/configuration_impl.h        |  38 +-
 .../private/include/configuration_store.h       |   3 +-
 .../service/private/include/framework_patch.h   |   2 +-
 .../private/include/managed_service_tracker.h   |  11 +-
 .../private/include/updated_thread_pool.h       |  10 +-
 config_admin/service/private/src/activator.c    |  23 +-
 .../private/src/configuration_admin_factory.c   |  42 +-
 .../private/src/configuration_admin_impl.c      |  19 +-
 .../service/private/src/configuration_impl.c    | 327 +++++++-----
 .../service/private/src/configuration_store.c   |  98 ++--
 .../service/private/src/managed_service_impl.c  |   7 +-
 .../private/src/managed_service_tracker.c       | 174 ++++---
 .../service/private/src/updated_thread_pool.c   |  47 +-
 .../service/public/include/configuration.h      |  29 +-
 .../public/include/configuration_admin.h        |   2 +-
 .../public/include/configuration_event.h        |   2 +-
 .../public/include/configuration_listener.h     |   2 +-
 .../public/include/configuration_plugin.h       |   2 +-
 .../service/public/include/managed_service.h    |   4 +-
 .../private/src/dm_service_dependency.c         |   4 +
 dfi/CMakeLists.txt                              |   2 +-
 framework/CMakeLists.txt                        |  10 +-
 framework/private/include/filter_private.h      |   1 -
 framework/private/mock/celix_log_mock.c         |  54 ++
 framework/private/src/filter.c                  | 212 +++++---
 framework/private/src/service_registration.c    |   4 +-
 framework/private/src/service_registry.c        |   8 +-
 framework/private/test/filter_test.cpp          | 514 ++++++++++++++++++-
 .../private/test/service_registration_test.cpp  |   8 +-
 .../private/test/service_registry_test.cpp      |   2 +-
 framework/public/include/service_factory.h      |   6 +-
 log_service/private/src/log_factory.c           |   4 +-
 remote_services/discovery_etcd/README.md        |  12 +
 .../discovery_etcd/private/src/etcd.c           |   3 +-
 .../discovery_etcd/private/src/etcd_watcher.c   |  45 +-
 ...apache.celix.calc.api.Calculator2.descriptor |   2 +-
 .../examples/calculator_shell/CMakeLists.txt    |   1 +
 ...apache.celix.calc.api.Calculator2.descriptor |  11 +
 .../calculator_shell/private/src/add_command.c  |   9 +-
 .../calculator_shell/private/src/sqrt_command.c |   9 +-
 .../calculator_shell/private/src/sub_command.c  |   9 +-
 remote_services/remote_service_admin/README.md  |  10 +
 .../private/include/import_registration_dfi.h   |   2 +-
 .../rsa/private/src/export_registration_dfi.c   |  11 +-
 .../rsa/private/src/import_registration_dfi.c   |  52 +-
 .../rsa/private/src/remote_service_admin_dfi.c  |  13 +-
 .../rsa_tst/rsa_tests.cpp                       |   1 +
 .../private/test/CMakeLists.txt                 |   4 +-
 remote_services/topology_manager/README.md      |   6 +
 .../private/src/topology_manager.c              |  67 +--
 .../topology_manager/tms_tst/tms_tests.cpp      |   7 +-
 shell/private/src/activator.c                   |  34 +-
 shell/private/src/log_command.c                 |   5 +-
 shell/private/src/shell.c                       | 126 ++---
 shell_tui/CMakeLists.txt                        |   2 +
 shell_tui/private/include/shell_tui.h           |  51 ++
 shell_tui/private/src/activator.c               | 102 ++++
 shell_tui/private/src/shell_tui.c               | 197 +++----
 utils/CMakeLists.txt                            |  14 +-
 utils/private/src/version.c                     |  17 +
 utils/private/test/version_test.cpp             |  34 +-
 utils/public/include/version.h                  |  18 +
 100 files changed, 3346 insertions(+), 1667 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/a43d78b3/CMakeLists.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/celix/blob/a43d78b3/config_admin/CMakeLists.txt
----------------------------------------------------------------------
diff --cc config_admin/CMakeLists.txt
index 81040db,3801e6e..6a8e08c
--- a/config_admin/CMakeLists.txt
+++ b/config_admin/CMakeLists.txt
@@@ -20,9 -20,29 +20,32 @@@ celix_subproject(CONFIG_ADMIN "Option t
  if (CONFIG_ADMIN)
  
  	add_subdirectory(service)
- 	add_subdirectory(examples)
+ #	add_subdirectory(examples)
+ 	
+ 	if (ENABLE_TESTING)
+ 		find_package(CppUTest REQUIRED)
+ 
+ 	    include_directories(${CPPUTEST_INCLUDE_DIR})
+ 	    add_subdirectory(config_admin_tst)
+ #		find_package(CppUTest REQUIRED)
+ #
+ #	    include_directories(${CUNIT_INCLUDE_DIRS})
+ #	    include_directories(${CPPUTEST_INCLUDE_DIR})
+ #	    include_directories("${PROJECT_SOURCE_DIR}/config_admin/service/public/include")
+ #	    include_directories("${PROJECT_SOURCE_DIR}/config_admin/service/private/include")
+ #	    include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
+ #	    
+ #	    add_executable(config_admin_test config_admin_tst/config_admin_test.cpp)
+ #	    target_link_libraries(config_admin_test celix_utils ${CPPUTEST_LIBRARY} pthread)
+ #	    
+ #	    
+ #		add_test(NAME run_config_admin_test COMMAND config_admin_test)
+ #      	SETUP_TARGET_FOR_COVERAGE(config_admin_test config_admin_test ${CMAKE_BINARY_DIR}/coverage/config_admin_test/config_admin_test)
+ 
+    endif(ENABLE_TESTING)
+ 	
  
 +	add_deploy("config_admin1" BUNDLES config_admin shell shell_tui log_service log_writer example_test)
 +	add_deploy("config_admin2" BUNDLES config_admin shell shell_tui log_service log_writer bundle_managed_service bundle_configuring)
 +
  endif (CONFIG_ADMIN)

http://git-wip-us.apache.org/repos/asf/celix/blob/a43d78b3/config_admin/config_admin_tst/example_test/CMakeLists.txt
----------------------------------------------------------------------
diff --cc config_admin/config_admin_tst/example_test/CMakeLists.txt
index 0000000,7782c0d..d4c4b3d
mode 000000,100644..100644
--- a/config_admin/config_admin_tst/example_test/CMakeLists.txt
+++ b/config_admin/config_admin_tst/example_test/CMakeLists.txt
@@@ -1,0 -1,32 +1,31 @@@
+ # Licensed to the Apache Software Foundation (ASF) under one
+ # or more contributor license agreements.  See the NOTICE file
+ # distributed with this work for additional information
+ # regarding copyright ownership.  The ASF licenses this file
+ # to you under the Apache License, Version 2.0 (the
+ # "License"); you may not use this file except in compliance
+ # with the License.  You may obtain a copy of the License at
+ # 
+ #   http://www.apache.org/licenses/LICENSE-2.0
+ # 
+ # Unless required by applicable law or agreed to in writing,
+ # software distributed under the License is distributed on an
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ # KIND, either express or implied.  See the License for the
+ # specific language governing permissions and limitations
+ # under the License.
+ 
+ 
+ include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
+ include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
+ include_directories("${PROJECT_SOURCE_DIR}/config_admin/service/public/include")
+ include_directories("private/include")
+ 
 -SET(BUNDLE_SYMBOLICNAME "example_test")
 -SET(BUNDLE_VERSION "0.1.0")
 -
 -bundle(example_test SOURCES 
++add_bundle(example_test
++    VERSION 0.1.0
++    SOURCES
+ 	private/src/activator
+ 	private/src/example_managed_service_impl
+ )
+ 
+ target_link_libraries(example_test celix_framework celix_utils config_admin)

http://git-wip-us.apache.org/repos/asf/celix/blob/a43d78b3/config_admin/config_admin_tst/example_test2/CMakeLists.txt
----------------------------------------------------------------------
diff --cc config_admin/config_admin_tst/example_test2/CMakeLists.txt
index 0000000,ddad504..2d38251
mode 000000,100644..100644
--- a/config_admin/config_admin_tst/example_test2/CMakeLists.txt
+++ b/config_admin/config_admin_tst/example_test2/CMakeLists.txt
@@@ -1,0 -1,32 +1,30 @@@
+ # Licensed to the Apache Software Foundation (ASF) under one
+ # or more contributor license agreements.  See the NOTICE file
+ # distributed with this work for additional information
+ # regarding copyright ownership.  The ASF licenses this file
+ # to you under the Apache License, Version 2.0 (the
+ # "License"); you may not use this file except in compliance
+ # with the License.  You may obtain a copy of the License at
+ # 
+ #   http://www.apache.org/licenses/LICENSE-2.0
+ # 
+ # Unless required by applicable law or agreed to in writing,
+ # software distributed under the License is distributed on an
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ # KIND, either express or implied.  See the License for the
+ # specific language governing permissions and limitations
+ # under the License.
+ 
+ 
+ include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
+ include_directories("${PROJECT_SOURCE_DIR}/framework/public/include")
+ include_directories("${PROJECT_SOURCE_DIR}/config_admin/service/public/include")
+ include_directories("private/include")
+ 
 -SET(BUNDLE_SYMBOLICNAME "example_test2")
 -SET(BUNDLE_VERSION "0.1.0")
 -
 -bundle(example_test2 SOURCES 
++add_bundle(bundle_managed_service SOURCES
+ 	private/src/activator
+ 	private/src/example_managed_service_impl
++    VERSION 0.1.0
+ )
+ 
+ target_link_libraries(example_test2 celix_framework celix_utils config_admin)

http://git-wip-us.apache.org/repos/asf/celix/blob/a43d78b3/dfi/CMakeLists.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/celix/blob/a43d78b3/framework/CMakeLists.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/celix/blob/a43d78b3/remote_services/examples/calculator_shell/CMakeLists.txt
----------------------------------------------------------------------
diff --cc remote_services/examples/calculator_shell/CMakeLists.txt
index e45f041,24a4d1e..361b688
--- a/remote_services/examples/calculator_shell/CMakeLists.txt
+++ b/remote_services/examples/calculator_shell/CMakeLists.txt
@@@ -29,14 -32,11 +29,15 @@@ add_bundle(calculator_shell SOURCE
      private/include/add_command.h
      private/include/sqrt_command.h
      private/include/sub_command.h
 +    
 +    VERSION 0.0.1
 +    SYMBOLIC_NAME "apache_celix_remoting_calculator_shell"
 +)
  
 -
 -        FILES
 -            ../calculator_service/public/include/org.apache.celix.calc.api.Calculator2.descriptor
 -            #private/include/org.apache.celix.calc.api.Calculator2.descriptor ##Use this descriptor in case you want to try out versioning!
 +bundle_files(calculator_shell 
 +    ../calculator_service/public/include/org.apache.celix.calc.api.Calculator2.descriptor
++    #private/include/org.apache.celix.calc.api.Calculator2.descriptor ##Use this descriptor in case you want to try out versioning!
 +    DESTINATION .
  )
  
  target_link_libraries(calculator_shell celix_framework)

http://git-wip-us.apache.org/repos/asf/celix/blob/a43d78b3/remote_services/remote_service_admin_shm/private/test/CMakeLists.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/celix/blob/a43d78b3/shell_tui/CMakeLists.txt
----------------------------------------------------------------------
diff --cc shell_tui/CMakeLists.txt
index a94b616,6690d46..9bcab15
--- a/shell_tui/CMakeLists.txt
+++ b/shell_tui/CMakeLists.txt
@@@ -17,11 -17,13 +17,12 @@@
  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")
 -	SET_HEADER(BUNDLE_SYMBOLICNAME "apache_celix_shell_tui")
 -	SET_HEADERS("Bundle-Name: Apache Celix Shell TUI") 
 -
 -    bundle(shell_tui 
 -    	SOURCES
 +    add_bundle(shell_tui
 +    	SYMBOLIC_NAME "apache_celix_shell_tui"
 +    	VERSION "1.0.0"
 +    	NAME "Apache Celix Shell TUI"
 +    	SOURCES 
+     		private/src/activator 
      		private/src/shell_tui
  	)
  	

http://git-wip-us.apache.org/repos/asf/celix/blob/a43d78b3/utils/CMakeLists.txt
----------------------------------------------------------------------
diff --cc utils/CMakeLists.txt
index 8f6385c,77b1aa2..6c273bd
--- a/utils/CMakeLists.txt
+++ b/utils/CMakeLists.txt
@@@ -54,11 -54,12 +54,14 @@@ if (UTILS
                  private/src/thpool.c
                  public/include/thpool.h
          )
++
 +    set_target_properties(celix_utils PROPERTIES "SOVERSION" 2)
-    
-     IF(UNIX)
+     
+     IF(UNIX AND NOT ANDROID)
          target_link_libraries(celix_utils m pthread)
-     ENDIF(UNIX)
+     ELSEIF(ANDROID)
+         target_link_libraries(celix_utils m)
+     ENDIF()
      
      install(TARGETS celix_utils DESTINATION lib COMPONENT framework)
      FILE(GLOB files "public/include/*.h")


[33/42] celix git commit: CELIX-335: Move deploy timestamp file to CMAKE_CURRENT_BINARY_DIR. Update run.sh to reuse existing (DY)LD_LIBRARY_PATH

Posted by pn...@apache.org.
CELIX-335: Move deploy timestamp file to CMAKE_CURRENT_BINARY_DIR. Update run.sh to reuse existing (DY)LD_LIBRARY_PATH


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/89eaab32
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/89eaab32
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/89eaab32

Branch: refs/heads/develop
Commit: 89eaab3239545f22c66ded58af8f176a686f0246
Parents: edf549c
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Wed Feb 3 09:40:00 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Wed Feb 3 09:40:00 2016 +0100

----------------------------------------------------------------------
 cmake/cmake_celix/Packaging.cmake | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/89eaab32/cmake/cmake_celix/Packaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Packaging.cmake b/cmake/cmake_celix/Packaging.cmake
index bde696b..3fcf070 100644
--- a/cmake/cmake_celix/Packaging.cmake
+++ b/cmake/cmake_celix/Packaging.cmake
@@ -464,13 +464,15 @@ function(add_deploy)
 
 
     ###### Setup deploy custom target and config.properties file
+    set(TIMESTAMP_FILE "${CMAKE_CURRENT_BINARY_DIR}/${DEPLOY_TARGET}-timestamp")
+
     add_custom_target(${DEPLOY_TARGET}
-        DEPENDS  "${DEPLOY_LOCATION}/timestamp"
+        DEPENDS ${TIMESTAMP_FILE}
     )
     add_dependencies(deploy ${DEPLOY_TARGET})
 
-    add_custom_command(OUTPUT ${DEPLOY_LOCATION}/timestamp
-        COMMAND ${CMAKE_COMMAND} -E touch ${DEPLOY_LOCATION}/timestamp
+    add_custom_command(OUTPUT "${TIMESTAMP_FILE}"
+        COMMAND ${CMAKE_COMMAND} -E touch ${TIMESTAMP_FILE}
         DEPENDS  "$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_TARGET_DEPS>" "${DEPLOY_LOCATION}/config.properties" "${DEPLOY_LOCATION}/run.sh" 
         WORKING_DIRECTORY "${DEPLOY_LOCATION}"
         COMMENT "Deploying ${DEPLOY_PRINT_NAME}" VERBATIM
@@ -501,14 +503,14 @@ $<JOIN:$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_PROPERTIES>,
     if(APPLE) 
         file(GENERATE
             OUTPUT ${DEPLOY_LOCATION}/run.sh
-            CONTENT "export DYLD_LIBRARY_PATH=$<TARGET_FILE_DIR:celix_framework>:$<TARGET_FILE_DIR:celix_utils>:$<TARGET_FILE_DIR:celix_dfi>
+            CONTENT "export DYLD_LIBRARY_PATH=$<TARGET_FILE_DIR:celix_framework>:$<TARGET_FILE_DIR:celix_utils>:$<TARGET_FILE_DIR:celix_dfi>:\${DYLD_LIBRARY_PATH}
 $<TARGET_FILE:celix> $@
 "
     )
     else() 
         file(GENERATE
             OUTPUT ${DEPLOY_LOCATION}/run.sh
-            CONTENT "export LD_LIBRARY_PATH=$<TARGET_FILE_DIR:celix_framework>:$<TARGET_FILE_DIR:celix_utils>:$<TARGET_FILE_DIR:celix_dfi>
+            CONTENT "export LD_LIBRARY_PATH=$<TARGET_FILE_DIR:celix_framework>:$<TARGET_FILE_DIR:celix_utils>:$<TARGET_FILE_DIR:celix_dfi>:\${LD_LIBRARY_PATH}
 $<TARGET_FILE:celix> $@
 "
     )


[42/42] celix git commit: CELIX-335: Fix run.sh generated. Generation now also works for celix based projects.

Posted by pn...@apache.org.
CELIX-335: Fix run.sh generated. Generation now also works for celix based projects.


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/b19a8f6b
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/b19a8f6b
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/b19a8f6b

Branch: refs/heads/develop
Commit: b19a8f6beda1054bf0fac831124b8ff6519762f2
Parents: da797a0
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Fri Feb 5 11:30:46 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Fri Feb 5 11:30:46 2016 +0100

----------------------------------------------------------------------
 cmake/FindCELIX.cmake             | 23 +++++++++++++++++------
 cmake/cmake_celix/Packaging.cmake | 33 +++++++++++++++++++--------------
 2 files changed, 36 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/b19a8f6b/cmake/FindCELIX.cmake
----------------------------------------------------------------------
diff --git a/cmake/FindCELIX.cmake b/cmake/FindCELIX.cmake
index 9f91e5a..b2789df 100644
--- a/cmake/FindCELIX.cmake
+++ b/cmake/FindCELIX.cmake
@@ -31,28 +31,39 @@ set(CELIX_DIR_FROM_FINDCELIX "${CMAKE_CURRENT_LIST_DIR}/../../../..")
 
 find_path(CELIX_INCLUDE_DIR celix_errno.h
 		PATHS ${CELIX_DIR_FROM_FINDCELIX} $ENV{CELIX_DIR} ${CELIX_DIR} /usr /usr/local
-          	PATH_SUFFIXES include include/celix)
+          	PATH_SUFFIXES include include/celix
+)
 
 find_library(CELIX_FRAMEWORK_LIBRARY NAMES celix_framework
              	PATHS ${CELIX_DIR_FROM_FINDCELIX} $ENV{CELIX_DIR} ${CELIX_DIR} /usr /usr/local
-             	PATH_SUFFIXES lib lib64)
+             	PATH_SUFFIXES lib lib64
+)
              
 find_library(CELIX_UTILS_LIBRARY NAMES celix_utils
 		PATHS ${CELIX_DIR_FROM_FINDCELIX} $ENV{CELIX_DIR} ${CELIX_DIR} /usr /usr/local
-		PATH_SUFFIXES lib lib64)
+		PATH_SUFFIXES lib lib64
+)
+
+find_library(CELIX_DFI_LIBRARY NAMES celix_dfi
+		PATHS ${CELIX_DIR_FROM_FINDCELIX} $ENV{CELIX_DIR} ${CELIX_DIR} /usr /usr/local
+		PATH_SUFFIXES lib lib64
+)
 
 find_program(CELIX_LAUNCHER NAMES celix
 		PATHS ${CELIX_DIR_FROM_FINDCELIX} $ENV{CELIX_DIR} ${CELIX_DIR} /usr /usr/local
-		PATH_SUFFIXES bin)
+		PATH_SUFFIXES bin
+)
 
 find_file(CELIX_CMAKECELIX_FILE CMakeCelix.cmake
              	PATHS ${CELIX_DIR_FROM_FINDCELIX} $ENV{CELIX_DIR} ${CELIX_DIR} /usr /usr/local
-             	PATH_SUFFIXES share/celix/cmake/modules)
+             	PATH_SUFFIXES share/celix/cmake/modules
+)
 
 #NOTE assuming shell.zip is always installed.
 find_path(CELIX_BUNDLES_DIR shell.zip
 		PATHS ${CELIX_DIR_FROM_FINDCELIX} $ENV{CELIX_DIR} ${CELIX_DIR} /usr /usr/local
-          	PATH_SUFFIXES share/celix/bundles)
+          	PATH_SUFFIXES share/celix/bundles
+)
 	
 
 

http://git-wip-us.apache.org/repos/asf/celix/blob/b19a8f6b/cmake/cmake_celix/Packaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Packaging.cmake b/cmake/cmake_celix/Packaging.cmake
index ccdc33c..0521261 100644
--- a/cmake/cmake_celix/Packaging.cmake
+++ b/cmake/cmake_celix/Packaging.cmake
@@ -496,23 +496,28 @@ $<JOIN:$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_PROPERTIES>,
     set(PATHS "${CMAKE_BIN_DIRECTORY}/framework:${CMAKE_BIN_DIRECTORY}/utils:${CMAKE_BIN_DIRECTORY}/dfi")
     configure_file("${CELIX_CMAKE_DIRECTORY}/cmake_celix/RunConfig.in"  "${DEPLOY_LOCATION}/${DEPLOY_NAME}")
 
+    if(APPLE)
+        set(LIB_PATH_NAME "DYLD_LIBRARY_PATH")
+    else()
+        set(LIB_PATH_NAME "LD_LIBRARY_PATH")
+    endif()
 
-    if(APPLE) 
-        file(GENERATE
-            OUTPUT ${DEPLOY_LOCATION}/run.sh
-            CONTENT "export DYLD_LIBRARY_PATH=$<TARGET_FILE_DIR:celix_framework>:$<TARGET_FILE_DIR:celix_utils>:$<TARGET_FILE_DIR:celix_dfi>:\${DYLD_LIBRARY_PATH}
-$<TARGET_FILE:celix> $@
-"
-    )
-    else() 
-        file(GENERATE
-            OUTPUT ${DEPLOY_LOCATION}/run.sh
-            CONTENT "export LD_LIBRARY_PATH=$<TARGET_FILE_DIR:celix_framework>:$<TARGET_FILE_DIR:celix_utils>:$<TARGET_FILE_DIR:celix_dfi>:\${LD_LIBRARY_PATH}
-$<TARGET_FILE:celix> $@
-"
-    )
+    if (EXISTS ${CELIX_FRAMEWORK_LIBRARY}) 
+        #Celix Based Project
+        get_filename_component(CELIX_LIB_DIR ${CELIX_FRAMEWORK_LIBRARY} DIRECTORY) #Note assuming all celix libs are in the same dir
+        set(RUN_CONTENT "export ${LIB_PATH_NAME}=${CELIX_LIB_DIR}:\${${LIB_PATH_NAME}}
+${CELIX_LAUNCHER} $@")
+    else()
+        #Celix Main Project
+        set(RUN_CONTENT "export ${LIB_PATH_NAME}=$<TARGET_FILE_DIR:celix_framework>:$<TARGET_FILE_DIR:celix_utils>:$<TARGET_FILE_DIR:celix_dfi>:\${${LIB_PATH_NAME}}
+$<TARGET_FILE:celix> $@")
     endif()
 
+    file(GENERATE
+        OUTPUT ${DEPLOY_LOCATION}/run.sh
+        CONTENT ${RUN_CONTENT}
+    )
+
     #TODO eclipse launcher file
     #####
 


[28/42] celix git commit: CELIX-335: Update of cmake command docs and added subproject doc.

Posted by pn...@apache.org.
CELIX-335: Update of cmake command docs and added subproject doc.


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/66ff6263
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/66ff6263
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/66ff6263

Branch: refs/heads/develop
Commit: 66ff62636da7f3fbb86cfed9f052e3dd00ba7b23
Parents: 5b4e5ff
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Mon Jan 25 13:44:26 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Mon Jan 25 13:44:26 2016 +0100

----------------------------------------------------------------------
 documents/cmake_commands/readme.md | 42 ++++++++++++++++-----------------
 documents/subprojects/readme.md    | 23 ++++++++++++++++++
 2 files changed, 44 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/66ff6263/documents/cmake_commands/readme.md
----------------------------------------------------------------------
diff --git a/documents/cmake_commands/readme.md b/documents/cmake_commands/readme.md
index d95d07e..e9f994e 100644
--- a/documents/cmake_commands/readme.md
+++ b/documents/cmake_commands/readme.md
@@ -1,6 +1,6 @@
 #Apache Celix - CMake Commands
 
-For Apache Celix several cmake command are added to be able to work with bundles and Apache Celix deployments.
+For Apache Celix several cmake command are added to be able to work with Apache Celix bundles and deployments.
 
 #Bundles
 
@@ -51,15 +51,15 @@ add_bundle(<bundle_target_name>
 )
 ```
 
-If NAME is provided that will be used as Bundle-Name. Default the bundle target name is used as symbolic name.
-If SYMBOLIC_NAME is provided that will be used as Bundle-SymbolicName. Default the bundle target name is used as symbolic name.
-If DESCRIPTION is provided that will be used as Bundle-Description. Default this is empty
-if VERSION is provided. That will be used for the Bundle-Version. In combination with SOURCES the version will alse be use to set the activator library target property VERSION and SOVERSION.
+- If NAME is provided that will be used as Bundle-Name. Default the bundle target name is used as symbolic name.
+- If SYMBOLIC_NAME is provided that will be used as Bundle-SymbolicName. Default the bundle target name is used as symbolic name.
+- If DESCRIPTION is provided that will be used as Bundle-Description. Default this is empty
+- If VERSION is provided. That will be used for the Bundle-Version. In combination with SOURCES the version will alse be use to set the activator library target property VERSION and SOVERSION.
 For SOVERSION only the major part is used. Expected scheme is "<major>.<minor>.<path>". Default version is "0.0.0"
 If PRIVATE_LIBRARIES is provided all provided lib are added to the "Private-Library" manifest statement and added in the root of the bundle. libraries can be cmake library targets or absolute paths to existing libraries.  
-If EXPORT_LIBRARIES is provided all provided lib are added to the "Export-Library" manifest statement and added in the root of the bundle. libraries can be cmake library targets or absolute paths to existing libraries. This is not yet supported by the celix framework.
-If EXPORT_LIBRARIES is provided all provided lib are added to the "Import-Library" manifest statement and added in the root of the bundle. libraries can be cmake library targets or absolute paths to existing libraries.  This is not yet supported by the celix framework
-If HEADERS is provided the headers values are appended to the bundle manifest.
+- If EXPORT_LIBRARIES is provided all provided lib are added to the "Export-Library" manifest statement and added in the root of the bundle. libraries can be cmake library targets or absolute paths to existing libraries. This is not yet supported by the celix framework.
+- If EXPORT_LIBRARIES is provided all provided lib are added to the "Import-Library" manifest statement and added in the root of the bundle. libraries can be cmake library targets or absolute paths to existing libraries.  This is not yet supported by the celix framework
+- If HEADERS is provided the headers values are appended to the bundle manifest.
 
 ##bundle_private_libs
 Add libraries to a bundle target. The libraries should be cmake library targets or an absolute path to a existing library.
@@ -129,9 +129,9 @@ bundle_description(<bundle_target> description)
 
 ##install_bundle
 Install bundle when 'make install' is executed. 
-Bundles are installed at <install-prefix>/share/<project_name>/bundles.
-Headers are installed at <install-prefix>/include/<project_name>/<bundle_name>
-Resources are installed at <install-prefix>/shared/<pronect_name>/<bundle_name>
+Bundles are installed at `<install-prefix>/share/<project_name>/bundles`.
+Headers are installed at `<install-prefix>/include/<project_name>/<bundle_name>`
+Resources are installed at `<install-prefix>/shared/<project_name>/<bundle_name>`
 
 ```CMake
 install_bundle(<bundle_target>
@@ -142,17 +142,17 @@ install_bundle(<bundle_target>
 )
 ```
 
-If PROJECT_NAME is provided that will be used as project name for installing. Default is the cmake project name.
-If BUNDLE_NAME is provided that will be used as bundle for installing the headers. Default is the bundle target name.
-if HEADERS is provided the list of provided headers will be installed.
-if RESOURCES is provided the list of provided resources will be installed.
+- If PROJECT_NAME is provided that will be used as project name for installing. Default is the cmake project name.
+- If BUNDLE_NAME is provided that will be used as bundle for installing the headers. Default is the bundle target name.
+- If HEADERS is provided the list of provided headers will be installed.
+- If RESOURCES is provided the list of provided resources will be installed.
 
 #Deployments
 
 #add_deploy
 Add a deployment, consisting out of a selection of bundles, for the project. 
 Deployments can be used to run/test a selection of bundles in the celix framework.
-A deployment can be found in <cmake_build_dir>/deploy[/<group_name>]/<deploy_name>. 
+A deployment can be found in `<cmake_build_dir>/deploy[/<group_name>]/<deploy_name>`. 
 Use the run.sh to run the deployments.
 
 ```CMake
@@ -165,11 +165,11 @@ add_deploy(<deploy_target_name>
 )
 ```
 
-If COPY is provided the selected bundles will be copied in a bundles dir and the generated config.properties will use relative paths to the bundle locations. Default bundles will not be copied and the generated config.properties will use absolute references to the bundle locations.
-If GROUP is provided the deployment will be grouped in the provided group name. 
-If NAME is provided that name will be used for the deployment dir. Default the deploy target name will be used.
-If BUNDLES is provided the list of bundles will be added the the generated config.properties for startup. Combined with COPY the bundles will also be copied to a bundles dir.
-If PROPERTIES is provided the list of properties will be appended to the generated config.properties
+- If COPY is provided the selected bundles will be copied in a bundles dir and the generated config.properties will use relative paths to the bundle locations. Default bundles will not be copied and the generated config.properties will use absolute references to the bundle locations.
+- If GROUP is provided the deployment will be grouped in the provided group name. 
+- If NAME is provided that name will be used for the deployment dir. Default the deploy target name will be used.
+- If BUNDLES is provided the list of bundles will be added the the generated config.properties for startup. Combined with COPY the bundles will also be copied to a bundles dir.
+- If PROPERTIES is provided the list of properties will be appended to the generated config.properties
 
 #deploy_bundles_dir
 Deploy a selection of bundles to the provided bundle dir. This can be used to create an endpoints / proxies bundles dir for the remote service admin or drivers bundles dir for the device access. 

http://git-wip-us.apache.org/repos/asf/celix/blob/66ff6263/documents/subprojects/readme.md
----------------------------------------------------------------------
diff --git a/documents/subprojects/readme.md b/documents/subprojects/readme.md
new file mode 100644
index 0000000..e5aad85
--- /dev/null
+++ b/documents/subprojects/readme.md
@@ -0,0 +1,23 @@
+#Apache Celix - Subprojects
+
+Apache Celix is organized into several subprojects. The following subproject are currently available:
+
+* [Framework](../framework) - The Apache Celix framework, an implementation of OSGi adapted to C.
+* [Dependency Manager](../dependency_manager) - A component/dependency model for use through an API provided as library.
+* [Device Access](../device_access) - An implementation of the OSGi Device Access specification adapted to C.
+* [Examples](../examples) - A Selection of examples showing how the framework can be used.
+* [Log Service](../log_service) - An implementation of the OSGi Log Service adapated to C.
+* [Log Writer](../log_writer) - A simple log writer for use in combination with the Log Service.
+* [Remote Service Admin](../remote_services) - An implementation of the OSGi Remote Service Admin Service - for several protocols - adapted to C.
+    * [Remote Service Admin HTTP](../remote_services/remote_service_admin_http) - A HTTP implementation of the RSA.
+    * [Remote Service Admin DFI](../remote_services/remote_service_admin_dfi) - A Dynamic Function Interface (DFI) implementation of the RSA.
+    * [Remote Service Admin SHM](../remote_services/remote_service_admin_shm) - A shared memory implementation of the RSA.
+    * [Topology Manager](../remote_services/topology_manager) - A (scoped) RSA Topology Manager implementation. 
+    * [Discovery Configured](../remote_services/discovery_configured) - A RSA Discovery implementation using static configuration (xml).
+    * [Discovery Etcd](../remote_services/dicovery_etcd) - A RSA Discovery implementation using etcd.
+    * [Discovery SHM](../remote_services/dicovery_shm) - A RSA Discovery implementation using shared memory.
+* [Shell](../shell) - A OSGi shell implementation.
+* [Shell TUI](../shell_tui) - A textual UI for the Celix Shell.
+* [Remote Shell](../remote_shell) - A remote (telnet) frontend for the Celix Shell.
+* [Deployment Admin](../deployment_admin) - A deployment admin implementation.
+


[12/42] celix git commit: CELIX-335: Update cmake command to use a timestamp (touch) file instead of a copy of a library

Posted by pn...@apache.org.
CELIX-335: Update cmake command to use a timestamp (touch) file instead of a copy of a library


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/2b4c8c22
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/2b4c8c22
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/2b4c8c22

Branch: refs/heads/develop
Commit: 2b4c8c226d00b35619c309ef89ed768b17c3fd38
Parents: 919a3eb
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Fri Jan 8 11:15:24 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Fri Jan 8 11:15:24 2016 +0100

----------------------------------------------------------------------
 .travis.yml                       | 5 ++++-
 cmake/cmake_celix/Packaging.cmake | 7 +++----
 2 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/2b4c8c22/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 40155d7..13f37aa 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,6 +13,9 @@ matrix:
         - os: osx
           compiler: clang
 
+allow_failures:
+    - os: osx
+
 before_install:
   - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq update && sudo apt-get install -y uuid-dev libxml2-dev lcov libffi-dev; fi
   - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update && brew install lcov libffi && brew link --force libffi; fi
@@ -39,7 +42,7 @@ script:
     - if [ "$CC" = "gcc" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then export BUILD_OPTS="${BUILD_OPTS} -DENABLE_CODE_COVERAGE=ON"; fi
     - if [ "$TRAVIS_OS_NAME" = "linux" ]; then cmake -DBUILD_CONFIG_ADMIN=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_DFI=ON -DBUILD_DEPLOYMENT_ADMIN=ON -DBUILD_DEPENDENCY_MANAGER=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 -DBUILD_FRAMEWORK_TESTS=ON -DBUILD_UTILS-TESTS=ON -DENABLE_TESTING=ON ${BUILD_OPTS} -DCMAKE_INSTALL_PREFIX=../install ..; fi
     - if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake -DBUILD_CONFIG_ADMIN=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_DFI=ON -DBUILD_DEPLOYMENT_ADMIN=ON -DBUILD_DEPENDENCY_MANAGER=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=OFF -DBUILD_RSA_EXAMPLES=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_SHM=OFF -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 -DBUILD_FRAMEWORK_TESTS=ON -DBUILD_UTILS-TESTS=ON -DENABLE_TESTING=ON -DFFI_LIBRARY=/usr/local/opt/libffi/lib/libffi.dylib ${BUILD_OPTS} -DCMAKE_INSTALL_PREFIX=../install ..; fi
-    - make && make install
+    - make all && make install
     - export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH:`pwd`/utils:`pwd`/framework:`pwd`/dfi && make test ARGS="-V" 
 
 after_success:

http://git-wip-us.apache.org/repos/asf/celix/blob/2b4c8c22/cmake/cmake_celix/Packaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Packaging.cmake b/cmake/cmake_celix/Packaging.cmake
index 534a2a8..0b50812 100644
--- a/cmake/cmake_celix/Packaging.cmake
+++ b/cmake/cmake_celix/Packaging.cmake
@@ -311,11 +311,10 @@ function(bundle_libs)
 
             #NOTE add_custom_command does not support generator expression in OUTPUT value (e.g. $<TARGET_FILE:${LIB}>)
             #Using a two step approach to be able to use add_custom_command instead of add_custom_target
-            get_target_property(EXTENSION ${LIB} SUFFIX)
-            set(OUT "${BUNDLE_GEN_DIR}/lib-${LIB}-copy")
+            set(OUT "${BUNDLE_GEN_DIR}/lib-${LIB}-copy-timestamp")
             add_custom_command(OUTPUT ${OUT}
-                COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:${LIB}>" ${OUT}
-                COMMAND ${CMAKE_COMMAND} -E copy_if_different ${OUT} "${BUNDLE_DIR}/$<TARGET_SONAME_FILE_NAME:${LIB}>"
+                COMMAND ${CMAKE_COMMAND} -E touch ${OUT}
+                COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:${LIB}>" "${BUNDLE_DIR}/$<TARGET_SONAME_FILE_NAME:${LIB}>"
                 DEPENDS ${LIB}
             )
             list(APPEND DEPS "${OUT}") #NOTE depending on ${OUT} not on $<TARGET_FILE:${LIB}>.


[16/42] celix git commit: CELIX-335: Fix for wrong dependency setup for deploy targets

Posted by pn...@apache.org.
CELIX-335: Fix for wrong dependency setup for deploy targets


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/40bf1930
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/40bf1930
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/40bf1930

Branch: refs/heads/develop
Commit: 40bf19301a62d032c047d7c2a70046a5e8fd2d50
Parents: 9c7892b
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Mon Jan 11 20:21:15 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Mon Jan 11 20:21:15 2016 +0100

----------------------------------------------------------------------
 cmake/cmake_celix/Packaging.cmake | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/40bf1930/cmake/cmake_celix/Packaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Packaging.cmake b/cmake/cmake_celix/Packaging.cmake
index 48b8eec..022f5a2 100644
--- a/cmake/cmake_celix/Packaging.cmake
+++ b/cmake/cmake_celix/Packaging.cmake
@@ -538,19 +538,25 @@ function(deploy_bundles_dir)
     get_target_property(DEPS ${DEPLOY_NAME} "DEPLOY_TARGET_DEPS")
 
     foreach(BUNDLE IN ITEMS ${BD_BUNDLES})
-        set(OUT "${DEPLOY_LOC}/${BD_DIR_NAME}/${BUNDLE}.zip")
-        list(APPEND DEPS "${OUT}")
-
         if (IS_ABSOLUTE ${BUNDLE} AND EXISTS ${BUNDLE})
+            get_filename_component(BUNDLE_FILENAME ${BUNDLE} NAME) 
+            set(OUT "${DEPLOY_LOC}/${BD_DIR_NAME}/${BUNDLE_FILENAME}.zip")
             add_custom_command(OUTPUT ${OUT}
                 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${BUNDLE} ${OUT}
+                COMMENT "Copying bundle '${BUNDLE}' to '${DEPLOY_LOC}/${BD_DIR_NAME}'"
+                DEPENDS ${BUNDLE}
             )
         else()
+            set(OUT "${DEPLOY_LOC}/${BD_DIR_NAME}/${BUNDLE}.zip")
             add_custom_command(OUTPUT ${OUT}
                 COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_PROPERTY:${BUNDLE},BUNDLE_FILE>" ${OUT}
-                DEPENDS ${BUNDLE}_bundle
+                COMMENT "Copying bundle '${BUNDLE}' to '${DEPLOY_LOC}/${BD_DIR_NAME}'"
+                DEPENDS ${BUNDLE} #Note cannot directly depends on ${BUNDLE}_bundle, depending in ${BUNDLE} triggering build instead. 
             )
+            add_dependencies(${DEPLOY_NAME} ${BUNDLE}_bundle) #ensure the the deploy depends on the _bundle target, custom_command depends on add_library
         endif()
+        list(APPEND DEPS "${OUT}")
+
     endforeach()
 
     set_target_properties(${DEPLOY_NAME} PROPERTIES "DEPLOY_TARGET_DEPS" "${DEPS}")


[27/42] celix git commit: CELIX-335: Add celix cmake command documentation. Add eclipse launcher generation for deployments

Posted by pn...@apache.org.
CELIX-335: Add celix cmake command documentation. Add eclipse launcher generation for deployments


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/5b4e5ffe
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/5b4e5ffe
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/5b4e5ffe

Branch: refs/heads/develop
Commit: 5b4e5ffe8a4d7a493a7498977149ee70e85127ee
Parents: e925d8f
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Mon Jan 25 13:22:19 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Mon Jan 25 13:22:19 2016 +0100

----------------------------------------------------------------------
 cmake/cmake_celix/Packaging.cmake  |  22 +++-
 cmake/cmake_celix/RunConfig.in     |  37 +++---
 documents/cmake_commands/readme.md | 201 ++++++++++++++++++++++++++++++++
 3 files changed, 236 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/5b4e5ffe/cmake/cmake_celix/Packaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Packaging.cmake b/cmake/cmake_celix/Packaging.cmake
index 16e63d0..bde696b 100644
--- a/cmake/cmake_celix/Packaging.cmake
+++ b/cmake/cmake_celix/Packaging.cmake
@@ -105,7 +105,7 @@ function(add_bundle)
     list(REMOVE_AT ARGN 0)
 
     set(OPTIONS NO_ACTIVATOR)
-    set(ONE_VAL_ARGS VERSION ACTIVATOR SYMBOLIC_NAME NAME) 
+    set(ONE_VAL_ARGS VERSION ACTIVATOR SYMBOLIC_NAME NAME DESCRIPTION) 
     set(MULTI_VAL_ARGS SOURCES PRIVATE_LIBRARIES EXPORT_LIBRARIES HEADERS)
     cmake_parse_arguments(BUNDLE "${OPTIONS}" "${ONE_VAL_ARGS}" "${MULTI_VAL_ARGS}" ${ARGN})
 
@@ -153,9 +153,7 @@ function(add_bundle)
         set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_TARGET_IS_LIB" TRUE)
         add_dependencies(bundles ${BUNDLE_TARGET_NAME})
     else()
-        add_custom_target(${BUNDLE_TARGET_NAME}
-          DEPENDS "$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_FILE>"
-        )
+        add_custom_target(${BUNDLE_TARGET_NAME})
     endif()
     add_custom_target(${BUNDLE_TARGET_NAME}_bundle
         DEPENDS "$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_FILE>"
@@ -240,6 +238,7 @@ SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY \"0\")
     set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_NAME" ${BUNDLE_NAME}) #The bundle name default target name
     set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_SYMBOLIC_NAME" ${BUNDLE_SYMBOLIC_NAME}) #The bundle symbolic name. Default target name
     set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_VERSION" ${BUNDLE_VERSION}) #The bundle version. Default 0.0.0
+    set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_DESCRIPTION" "${BUNDLE_DESCRIPTION}") #The bundle description.
 
     #headers
     set_target_properties(${BUNDLE_TARGET_NAME} PROPERTIES "BUNDLE_ACTIVATOR" 1) #Library containing the activator (if any)
@@ -407,6 +406,10 @@ function(bundle_version BUNDLE VERSION)
     set_target_properties(${BUNDLE} PROPERTIES "BUNDLE_VERSION" ${VERSION})
 endfunction()
 
+function(bundle_description BUNDLE DESC) 
+    set_target_properties(${BUNDLE} PROPERTIES "BUNDLE_DESCRIPTION" ${DESC})
+endfunction()
+
 function(install_bundle)
     #0 is bundle TARGET
     list(GET ARGN 0 BUNDLE)
@@ -468,13 +471,12 @@ function(add_deploy)
 
     add_custom_command(OUTPUT ${DEPLOY_LOCATION}/timestamp
         COMMAND ${CMAKE_COMMAND} -E touch ${DEPLOY_LOCATION}/timestamp
-        DEPENDS  "$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_TARGET_DEPS>" "${DEPLOY_LOCATION}/config.properties" "${DEPLOY_LOCATION}/run.sh"
+        DEPENDS  "$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_TARGET_DEPS>" "${DEPLOY_LOCATION}/config.properties" "${DEPLOY_LOCATION}/run.sh" 
         WORKING_DIRECTORY "${DEPLOY_LOCATION}"
         COMMENT "Deploying ${DEPLOY_PRINT_NAME}" VERBATIM
     )
 
 
-    #TODO generate in the CMakeFiles/deploy.dir/<GROUP_NAME>/DEPLOY_NAME> location
     file(GENERATE 
         OUTPUT "${DEPLOY_LOCATION}/config.properties.step1"
         CONTENT "cosgi.auto.start.1=$<JOIN:$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_BUNDLES>, >
@@ -488,6 +490,14 @@ $<JOIN:$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_PROPERTIES>,
         INPUT "${DEPLOY_LOCATION}/config.properties.step1"
     )
 
+    set(CONTAINER_NAME ${DEPLOY_NAME})
+    set(PROGRAM_NAME "${CMAKE_BIN_DIRECTORY}/launcher/celix")
+    set(PROJECT_ATTR "build")
+    set(WORKING_DIRECTORY ${DEPLOY_LOCATION})
+    set(PATHS "${CMAKE_BIN_DIRECTORY}/framework:${CMAKE_BIN_DIRECTORY}/utils:${CMAKE_BIN_DIRECTORY}/dfi")
+    configure_file("${CELIX_CMAKE_DIRECTORY}/cmake_celix/RunConfig.in"  "${DEPLOY_LOCATION}/${DEPLOY_NAME}")
+
+
     if(APPLE) 
         file(GENERATE
             OUTPUT ${DEPLOY_LOCATION}/run.sh

http://git-wip-us.apache.org/repos/asf/celix/blob/5b4e5ffe/cmake/cmake_celix/RunConfig.in
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/RunConfig.in b/cmake/cmake_celix/RunConfig.in
index a63be99..888b992 100644
--- a/cmake/cmake_celix/RunConfig.in
+++ b/cmake/cmake_celix/RunConfig.in
@@ -1,21 +1,22 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <launchConfiguration type="org.eclipse.cdt.launch.applicationLaunchType">
-<stringAttribute key="bad_container_name" value="@CONTAINER_NAME@"/>
-<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="0"/>
-<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
-<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="@PROGRAM_NAME@"/>
-<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="@PROJECT_ATTR@"/>
-<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
-<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="org.eclipse.cdt.core.default.config.1"/>
-<stringAttribute key="org.eclipse.cdt.launch.WORKING_DIRECTORY" value="@WORKING_DIRECTORY@"/>
-<booleanAttribute key="org.eclipse.cdt.launch.use_terminal" value="true"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/@PROJECT_ATTR@"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<mapAttribute key="org.eclipse.debug.core.environmentVariables">
-<mapEntry key="@LIBRARY_PATH@" value="@FW_PATH@:@UTILS_PATH@"/>
-</mapAttribute>
+    <stringAttribute key="bad_container_name" value="${CONTAINER_NAME}"/>
+    <intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="0"/>
+    <stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
+    <stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="${PROGRAM_NAME}"/>
+    <stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="${PROJECT_ATTR}"/>
+    <booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
+    <stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="org.eclipse.cdt.core.default.config.1"/>
+    <stringAttribute key="org.eclipse.cdt.launch.WORKING_DIRECTORY" value="${WORKING_DIRECTORY}"/>
+    <booleanAttribute key="org.eclipse.cdt.launch.use_terminal" value="true"/>
+    <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+        <listEntry value="/${PROJECT_ATTR}"/>
+    </listAttribute>
+    <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+        <listEntry value="4"/>
+    </listAttribute>
+    <mapAttribute key="org.eclipse.debug.core.environmentVariables">
+        <mapEntry key="LD_LIBRARY_PATH" value="${PATHS}"/>
+        <mapEntry key="DYLD_LIBRARY_PATH" value="${PATHS}"/>
+    </mapAttribute>
 </launchConfiguration>

http://git-wip-us.apache.org/repos/asf/celix/blob/5b4e5ffe/documents/cmake_commands/readme.md
----------------------------------------------------------------------
diff --git a/documents/cmake_commands/readme.md b/documents/cmake_commands/readme.md
new file mode 100644
index 0000000..d95d07e
--- /dev/null
+++ b/documents/cmake_commands/readme.md
@@ -0,0 +1,201 @@
+#Apache Celix - CMake Commands
+
+For Apache Celix several cmake command are added to be able to work with bundles and Apache Celix deployments.
+
+#Bundles
+
+##add_bundle
+Add a bundle to the project.  There are three variants:
+- With SOURCES the bundle will be created using a list of sources files as input for the bundle activator library.
+- With ACTIVATOR the bundle will be created using the library target or absolute path to existing library as activator library.
+- With no SOURCES or ACTIVATOR a bundle without a activator will be created.
+
+```CMake
+add_bundle(<bundle_target_name> 
+    SOURCES source1 source2 ...
+    [NAME bundle_name] 
+    [SYMBOLIC_NAME bundle_symbolic_name]
+    [DESCRIPTION bundle_description]
+    [VERSION bundle_version]
+    [PRIVATE_LIBRARIES private_lib1 private_lib2 ...]
+    [EXPORT_LIBRARIES export_lib1 export_lib2 ...]
+    [IMPORT_LIBRARIES import_lib1 import_lib2 ...]
+    [HEADERS "header1: header1_value" "header2: header2_value" ...]
+)
+```
+
+```CMake
+add_bundle(<bundle_target_name> 
+    ACTIVATOR <activator_lib>
+    [NAME bundle_name] 
+    [SYMBOLIC_NAME bundle_symbolic_name]
+    [DESCRIPTION bundle_description]
+    [VERSION bundle_version]
+    [PRIVATE_LIBRARIES private_lib1 private_lib2 ...]
+    [EXPORT_LIBRARIES export_lib1 export_lib2 ...]
+    [IMPORT_LIBRARIES import_lib1 import_lib2 ...]
+    [HEADERS "header1: header1_value" "header2: header2_value" ...]
+)
+```
+
+```CMake
+add_bundle(<bundle_target_name> 
+    [NAME bundle_name] 
+    [SYMBOLIC_NAME bundle_symbolic_name]
+    [DESCRIPTION bundle_description]
+    [VERSION bundle_version]
+    [PRIVATE_LIBRARIES private_lib1 private_lib2 ...]
+    [EXPORT_LIBRARIES export_lib1 export_lib2 ...]
+    [IMPORT_LIBRARIES import_lib1 import_lib2 ...]
+    [HEADERS "header1: header1_value" "header2: header2_value" ...]
+)
+```
+
+If NAME is provided that will be used as Bundle-Name. Default the bundle target name is used as symbolic name.
+If SYMBOLIC_NAME is provided that will be used as Bundle-SymbolicName. Default the bundle target name is used as symbolic name.
+If DESCRIPTION is provided that will be used as Bundle-Description. Default this is empty
+if VERSION is provided. That will be used for the Bundle-Version. In combination with SOURCES the version will alse be use to set the activator library target property VERSION and SOVERSION.
+For SOVERSION only the major part is used. Expected scheme is "<major>.<minor>.<path>". Default version is "0.0.0"
+If PRIVATE_LIBRARIES is provided all provided lib are added to the "Private-Library" manifest statement and added in the root of the bundle. libraries can be cmake library targets or absolute paths to existing libraries.  
+If EXPORT_LIBRARIES is provided all provided lib are added to the "Export-Library" manifest statement and added in the root of the bundle. libraries can be cmake library targets or absolute paths to existing libraries. This is not yet supported by the celix framework.
+If EXPORT_LIBRARIES is provided all provided lib are added to the "Import-Library" manifest statement and added in the root of the bundle. libraries can be cmake library targets or absolute paths to existing libraries.  This is not yet supported by the celix framework
+If HEADERS is provided the headers values are appended to the bundle manifest.
+
+##bundle_private_libs
+Add libraries to a bundle target. The libraries should be cmake library targets or an absolute path to a existing library.
+
+```CMake
+bundle_private_libs(<bundle_target>
+    lib1 lib2 ...
+)
+```
+
+##bundle_files
+Add files to the target bundle. DESTINATION is relative to the bundle archive root. 
+The rest of the command is conform file(COPY ...) cmake command.
+See cmake file(COPY ...) command for more info.
+
+```CMake
+bundle_files(<bundle_target>
+    files... DESTINATION <dir>
+    [FILE_PERMISSIONS permissions...]
+    [DIRECTORY_PERMISSIONS permissions...]
+    [NO_SOURCE_PERMISSIONS] [USE_SOURCE_PERMISSIONS]
+    [FILES_MATCHING]
+    [[PATTERN <pattern> | REGEX <regex>]
+    [EXCLUDE] [PERMISSIONS permissions...]] [...])
+)
+```
+
+
+##bundle_headers
+Append the provided headers to the target bundle manifest.
+
+```CMake
+bundle_headers(<bundle_target>
+    "header1: header1_value"
+    "header2: header2_value"
+    ...
+)
+```
+
+##bundle_symbolic_name
+Set bundle symbolic name
+
+```CMake
+bundle_symbolic_name(<bundle_target> symbolic_name)
+```
+
+##bundle_name
+Set bundle name
+
+```CMake
+bundle_name(<bundle_target> name)
+```
+
+##bundle_version
+Set bundle version
+
+```CMake
+bundle_version(<bundle_target> version)
+```
+
+##bundle_description
+Set bundle description
+
+```CMake
+bundle_description(<bundle_target> description)
+```
+
+##install_bundle
+Install bundle when 'make install' is executed. 
+Bundles are installed at <install-prefix>/share/<project_name>/bundles.
+Headers are installed at <install-prefix>/include/<project_name>/<bundle_name>
+Resources are installed at <install-prefix>/shared/<pronect_name>/<bundle_name>
+
+```CMake
+install_bundle(<bundle_target>
+    [PROJECT_NAME] project_name
+    [BUNDLE_NAME] bundle_name
+    [HEADERS header_file1 header_file2 ...]
+    [RESOURCES resource1 resource2 ...]
+)
+```
+
+If PROJECT_NAME is provided that will be used as project name for installing. Default is the cmake project name.
+If BUNDLE_NAME is provided that will be used as bundle for installing the headers. Default is the bundle target name.
+if HEADERS is provided the list of provided headers will be installed.
+if RESOURCES is provided the list of provided resources will be installed.
+
+#Deployments
+
+#add_deploy
+Add a deployment, consisting out of a selection of bundles, for the project. 
+Deployments can be used to run/test a selection of bundles in the celix framework.
+A deployment can be found in <cmake_build_dir>/deploy[/<group_name>]/<deploy_name>. 
+Use the run.sh to run the deployments.
+
+```CMake
+add_deploy(<deploy_target_name>
+    [COPY] 
+    [GROUP group_name]
+    [NAME deploy_name]
+    [BUNDLES <bundle1> <bundle2> ...]
+    [PROPERTIES "prop1=val1" "prop2=val2" ...]
+)
+```
+
+If COPY is provided the selected bundles will be copied in a bundles dir and the generated config.properties will use relative paths to the bundle locations. Default bundles will not be copied and the generated config.properties will use absolute references to the bundle locations.
+If GROUP is provided the deployment will be grouped in the provided group name. 
+If NAME is provided that name will be used for the deployment dir. Default the deploy target name will be used.
+If BUNDLES is provided the list of bundles will be added the the generated config.properties for startup. Combined with COPY the bundles will also be copied to a bundles dir.
+If PROPERTIES is provided the list of properties will be appended to the generated config.properties
+
+#deploy_bundles_dir
+Deploy a selection of bundles to the provided bundle dir. This can be used to create an endpoints / proxies bundles dir for the remote service admin or drivers bundles dir for the device access. 
+
+```CMake
+deploy_bundles_dir(<deploy_target_name>
+    DIR_NAME dir_name
+    BUNDLES bundle1 bundle2 ...
+)
+```
+
+#deploy_bundles
+Deploy the selected bundles. The bundles are configured for auto starting. 
+
+```CMake
+deploy_bundles(<deploy_target_name>
+    bundle1 bundle2 ...
+)
+```
+
+#deploy_properties
+
+```CMake
+Add the provided properties to the target deploy config.properties.
+
+deploy_properties(<deploy_target_name>
+    "prop1=val1" "prop2=val2" ...
+)
+


[20/42] celix git commit: CELIX-335: Update travis to also use ninja as build system

Posted by pn...@apache.org.
CELIX-335: Update travis to also use ninja as build system


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/d7ae9b5b
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/d7ae9b5b
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/d7ae9b5b

Branch: refs/heads/develop
Commit: d7ae9b5b8030e5a17477df2783f0be784aee2023
Parents: 0fe3c6a
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Thu Jan 14 17:28:16 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Thu Jan 14 17:28:16 2016 +0100

----------------------------------------------------------------------
 .travis.yml | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/d7ae9b5b/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 1a71d86..3d50f61 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,24 +5,29 @@ matrix:
         - os: linux
           dist: trusty
           compiler: gcc
+          env: BUILD_SYSTEM=ninja
         - os: linux
           dist: trusty
           compiler: clang
+          env: BUILD_SYSTEM=ninja
         - os: osx
           compiler: gcc
+          env: BUILD_SYSTEM=make
         - os: osx
           compiler: clang
+          env: BUILD_SYSTEM=make
 
 allow_failures:
     - os: osx
 
 before_install:
-  - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq update && sudo apt-get install -y uuid-dev libxml2-dev lcov libffi-dev; fi
+  - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq update && sudo apt-get install -y uuid-dev libxml2-dev lcov libffi-dev ninja-build; fi
   - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew uninstall cmake; fi
-  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update && brew install lcov libffi cmake && brew link --force libffi; fi
+  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update && brew install lcov libffi cmake ninja && brew link --force libffi; fi
 
 before_script:
     - cmake -version
+    - ninja --version
     - wget https://github.com/cpputest/cpputest.github.io/blob/master/releases/cpputest-3.7.1.tar.gz?raw=true -O /tmp/cpputest.tar.gz
     - tar -xzvf /tmp/cpputest.tar.gz -C /tmp
     - if [ "$CC" = "clang" ]; then export CXX="clang++"; fi && cd /tmp/cpputest-3.7.1 && ./configure --prefix=/usr && make && sudo make install && cd -
@@ -33,6 +38,7 @@ before_script:
     - sudo make install
     - cd -
     - mkdir build install
+    - if [ "${BUILD_SYSTEM}" = "make" ] then export BUILD_CMD=make; export BUILD_GEN=""; else export BUILD_CMD=ninja; export BUILD_GEN="-G Ninja"; fi
 
 
 script:
@@ -41,15 +47,15 @@ script:
      # RSA_SHM is only working on linux, but both compilers (see CELIX-277)
     - cd build
     - if [ "$CC" = "gcc" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then export BUILD_OPTS="${BUILD_OPTS} -DENABLE_CODE_COVERAGE=ON"; fi
-    - if [ "$TRAVIS_OS_NAME" = "linux" ]; then cmake -DBUILD_CONFIG_ADMIN=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_DFI=ON -DBUILD_DEPLOYMENT_ADMIN=ON -DBUILD_DEPENDENCY_MANAGER=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 -DBUILD_FRAMEWORK_TESTS=ON -DBUILD_UTILS-TESTS=ON -DENABLE_TESTING=ON ${BUILD_OPTS} -DCMAKE_INSTALL_PREFIX=../install ..; fi
-    - if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake -DBUILD_CONFIG_ADMIN=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_DFI=ON -DBUILD_DEPLOYMENT_ADMIN=ON -DBUILD_DEPENDENCY_MANAGER=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=OFF -DBUILD_RSA_EXAMPLES=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_SHM=OFF -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 -DBUILD_FRAMEWORK_TESTS=ON -DBUILD_UTILS-TESTS=ON -DENABLE_TESTING=ON -DFFI_LIBRARY=/usr/local/opt/libffi/lib/libffi.dylib ${BUILD_OPTS} -DCMAKE_INSTALL_PREFIX=../install ..; fi
-    - make all && make install
-    - export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH:`pwd`/utils:`pwd`/framework:`pwd`/dfi && make test ARGS="-V" 
+    - if [ "$TRAVIS_OS_NAME" = "linux" ]; then cmake ${BUILD_GEN} -DBUILD_CONFIG_ADMIN=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_DFI=ON -DBUILD_DEPLOYMENT_ADMIN=ON -DBUILD_DEPENDENCY_MANAGER=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 -DBUILD_FRAMEWORK_TESTS=ON -DBUILD_UTILS-TESTS=ON -DENABLE_TESTING=ON ${BUILD_OPTS} -DCMAKE_INSTALL_PREFIX=../install ..; fi
+    - if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake ${BUILD_GEN} -DBUILD_CONFIG_ADMIN=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_DFI=ON -DBUILD_DEPLOYMENT_ADMIN=ON -DBUILD_DEPENDENCY_MANAGER=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=OFF -DBUILD_RSA_EXAMPLES=ON -DBUILD_RSA_REMOTE_SERVICE_ADMIN_SHM=OFF -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 -DBUILD_FRAMEWORK_TESTS=ON -DBUILD_UTILS-TESTS=ON -DENABLE_TESTING=ON -DFFI_LIBRARY=/usr/local/opt/libffi/lib/libffi.dylib ${BUILD_OPTS} -DCMAKE_INSTALL_PREFIX=../install ..; fi
+    - ${BUILD_CMD} all && ${BUILD_CMD} install
+    - export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH:`pwd`/utils:`pwd`/framework:`pwd`/dfi && ${BUILD_CMD} test ARGS="-V" 
 
 after_success:
     - if [ "$CC" = "gcc" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then 
         cd ${TRAVIS_BUILD_DIR}/build;
         gem install coveralls-lcov &&
-        make coverage &&
+        ${BUILD_CMD} coverage &&
         lcx="lcov --output-file=coverage.info " && for i in `find . -name "*.info.cleaned"`; do lcx+=" --add-tracefile=$i"; done && $lcx && coveralls-lcov --repo-token=9dpeTAjiGoQU5hgXFe0ezk65iu40oc3WY coverage.info;
       fi;


[25/42] celix git commit: CELIX-335: Fix memory issue in framework when loading bundle libraries. Only occurs on ubuntu systems

Posted by pn...@apache.org.
CELIX-335: Fix memory issue in framework when loading bundle libraries. Only occurs on ubuntu systems


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/fc588a5a
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/fc588a5a
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/fc588a5a

Branch: refs/heads/develop
Commit: fc588a5acc3bee3e8b8317276383a7e0484a26c7
Parents: 632252c
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Tue Jan 19 17:31:30 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Tue Jan 19 17:31:30 2016 +0100

----------------------------------------------------------------------
 cmake/cmake_celix/Packaging.cmake | 8 +++++---
 framework/private/src/framework.c | 5 +++--
 2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/fc588a5a/cmake/cmake_celix/Packaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Packaging.cmake b/cmake/cmake_celix/Packaging.cmake
index 022f5a2..16e63d0 100644
--- a/cmake/cmake_celix/Packaging.cmake
+++ b/cmake/cmake_celix/Packaging.cmake
@@ -15,12 +15,12 @@
 # specific language governing permissions and limitations
 # under the License.
 
-find_program(JAR_COMMAND jar) #TODO enable
+find_program(JAR_COMMAND jar)
 
 if(JAR_COMMAND)
     message(STATUS "Using jar to create bundles")
 else()
-    find_program(ZIP_COMMAND zip) #TODO enable
+    find_program(ZIP_COMMAND zip)
     if(ZIP_COMMAND)
         message(STATUS "Using zip to create bundles")
     else()
@@ -452,8 +452,10 @@ function(add_deploy)
     ##### Setting defaults #####
     if(DEPLOY_GROUP) 
         set(DEPLOY_LOCATION "${CMAKE_BINARY_DIR}/deploy/${DEPLOY_GROUP}/${DEPLOY_NAME}")
+        set(DEPLOY_PRINT_NAME "${DEPLOY_GROUP}/${DEPLOY_NAME}")
     else()
         set(DEPLOY_LOCATION "${CMAKE_BINARY_DIR}/deploy/${DEPLOY_NAME}")
+        set(DEPLOY_PRINT_NAME "${DEPLOY_NAME}")
     endif()
     ######
 
@@ -468,7 +470,7 @@ function(add_deploy)
         COMMAND ${CMAKE_COMMAND} -E touch ${DEPLOY_LOCATION}/timestamp
         DEPENDS  "$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_TARGET_DEPS>" "${DEPLOY_LOCATION}/config.properties" "${DEPLOY_LOCATION}/run.sh"
         WORKING_DIRECTORY "${DEPLOY_LOCATION}"
-        COMMENT "Deploying ${DEPLOY_NAME}" VERBATIM
+        COMMENT "Deploying ${DEPLOY_PRINT_NAME}" VERBATIM
     )
 
 

http://git-wip-us.apache.org/repos/asf/celix/blob/fc588a5a/framework/private/src/framework.c
----------------------------------------------------------------------
diff --git a/framework/private/src/framework.c b/framework/private/src/framework.c
index 2748c90..691bb40 100644
--- a/framework/private/src/framework.c
+++ b/framework/private/src/framework.c
@@ -2470,11 +2470,12 @@ static celix_status_t framework_loadLibraries(framework_pt framework, char *libr
     char *token = strtok_r(libraries, ",", &last);
     while (token != NULL) {
         void *handle = NULL;
-        char lib[strlen(token)];
+        char lib[128];
+        lib[127] = '\0';
 
         char *path;
         char *pathToken = strtok_r(token, ";", &path);
-        strcpy(lib, pathToken);
+        strncpy(lib, pathToken, 127);
         pathToken = strtok_r(NULL, ";", &path);
 
         while (pathToken != NULL) {


[26/42] celix git commit: Merge branch 'feature/CELIX-335_deploy_refactoring' of https://git-wip-us.apache.org/repos/asf/celix into packaging

Posted by pn...@apache.org.
Merge branch 'feature/CELIX-335_deploy_refactoring' of https://git-wip-us.apache.org/repos/asf/celix into packaging


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/e925d8f2
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/e925d8f2
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/e925d8f2

Branch: refs/heads/develop
Commit: e925d8f21663f8fbde14c22c7b86ff7dcc19f63a
Parents: fc588a5 e0a4c46
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Tue Jan 19 17:32:41 2016 +0100
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Tue Jan 19 17:32:41 2016 +0100

----------------------------------------------------------------------
 cmake/cmake_celix/Manifest.template.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------