celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject [05/50] celix git commit: CELIX-236: add dependency manager code to celix bootstrap, add project deployment
Date Mon, 11 Apr 2016 12:00:14 GMT
CELIX-236: add dependency manager code to celix bootstrap, add project deployment


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

Branch: refs/heads/master
Commit: 37010fbe6249692a9d38175a618ca61204478a11
Parents: 4228b99
Author: Bjoern Petri <bpetri@apache.org>
Authored: Thu Jan 28 12:35:29 2016 +0100
Committer: Bjoern Petri <bpetri@apache.org>
Committed: Thu Jan 28 12:35:29 2016 +0100

----------------------------------------------------------------------
 celix-bootstrap/celix/bootstrap/generators.py   |  19 +-
 .../bootstrap/templates/bundle/CMakeLists.txt   |  15 +-
 .../bootstrap/templates/bundle/bundle.yaml      |  62 ++-
 .../templates/bundle/bundle_activator.c         | 527 ++++---------------
 .../bootstrap/templates/bundle/component.c      | 276 +++++-----
 .../bootstrap/templates/bundle/component.h      |  84 +--
 .../bootstrap/templates/bundle/deploy.cmake     |   3 +-
 .../celix/bootstrap/templates/bundle/service.h  |  10 +-
 .../bootstrap/templates/project/CMakeLists.txt  |   3 +-
 .../bootstrap/templates/project/deploy.cmake    |   5 +-
 10 files changed, 348 insertions(+), 656 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/37010fbe/celix-bootstrap/celix/bootstrap/generators.py
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/bootstrap/generators.py b/celix-bootstrap/celix/bootstrap/generators.py
index 7854f3f..e9d469b 100644
--- a/celix-bootstrap/celix/bootstrap/generators.py
+++ b/celix-bootstrap/celix/bootstrap/generators.py
@@ -146,15 +146,20 @@ class Project(BaseGenerator):
 		#python3 super(Project, self).__init__(gendir, "project")
 
 	def update_cmakelists(self) :
-		options = ["-D", "projectFile=%s" % self.descriptor]
-		self.update_file("CMakeLists.txt", "CMakeLists.txt", options, "#")	
+                options = ["-D", "projectFile=%s" % self.descriptor]
+                self.update_file("CMakeLists.txt", "CMakeLists.txt", options, "#")      
 
-	def create(self) :
-		self.update_file(os.path.join(self.template_dir, self.profile, "%s.yaml" % self.profile),  "%s.yaml" % self.profile, [], None)	
+        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)  
 
 	def update(self) :
 		descriptor = self.read_descriptor()
 		if descriptor is None :
-			print("%s does not exist or does not contain a project.yaml file" % self.gendir)
-		else :
-			self.update_cmakelists()	
+                        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/37010fbe/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 a6295b2..5e1cdd8 100644
--- a/celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt
+++ b/celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt
@@ -36,12 +36,13 @@ SET(
 SET(BUNDLE_VERSION "0.0.1")
 
 include_directories(
-	"private/include"
-	"public/include"
+        ${CELIX_INCLUDE_DIR}/dependency_manager
+        "private/include"
+        "public/include"
 #{{ 
 #for comp in bundle['components'] : 
-#	for service in comp['serviceDependencies']:
-#			cog.outl("\t\"%s\"" % os.path.dirname(service['include'])) 
+#       for service in comp['serviceDependencies']:
+#                       cog.outl("\t\"%s\"" % os.path.abspath(os.path.dirname(service['include']))) 
 #}}
 "org.example.mybundle" #do not edit, generated code
 #{{end}}
@@ -68,4 +69,8 @@ mybundle SOURCES #do not edit, generated code
 SET(BUNDLE_LIB "mybundle") #do not edit, generated code
 #{{end}}
 
-target_link_libraries(${BUNDLE_LIB} ${CELIX_FRAMEWORK_LIBRARY} ${CELIX_UTILS_LIBRARY})
+IF(APPLE)
+target_link_libraries(${BUNDLE_LIB} ${CELIX_FRAMEWORK_LIBRARY} -Wl,-all_load dependency_manager  ${CELIX_UTILS_LIBRARY})
+else()
+target_link_libraries(${BUNDLE_LIB} -Wl,--whole-archive dependency_manager -Wl,--no-whole-archive ${CELIX_FRAMEWORK_LIBRARY} ${CELIX_UTILS_LIBRARY})
+ENDIF()

http://git-wip-us.apache.org/repos/asf/celix/blob/37010fbe/celix-bootstrap/celix/bootstrap/templates/bundle/bundle.yaml
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/bootstrap/templates/bundle/bundle.yaml b/celix-bootstrap/celix/bootstrap/templates/bundle/bundle.yaml
index d85030d..1bf752e 100644
--- a/celix-bootstrap/celix/bootstrap/templates/bundle/bundle.yaml
+++ b/celix-bootstrap/celix/bootstrap/templates/bundle/bundle.yaml
@@ -25,40 +25,44 @@ components:
     #		componentName = checkInput('\nPlease enter componentName', '([a-zA-Z_][a-zA-Z0-9_]*)', 'example') 
     #		cog.outl('- name: \'%s\'' % componentName )
     #		cog.outl('  providedServices:')
-    #		while yn('Should component \'%s\' provide %s service?' % (componentName, 'a' if 'psInclude' not in vars() else 'another')):
-    #			psServiceName1 = checkInput('(1) Please enter a name, which can be used for the filename and the include guards', '([a-zA-Z_][a-zA-Z0-9_]*)'); 
-    #			psServiceName2 = checkInput('(2) Please enter a name, which is used to register and lookup the service', '([a-zA-Z_][a-zA-Z0-9_]*)', (psServiceName1.lower() + ('_service' if not psServiceName1.endswith('_service') else ''))); 
-    #			psServiceType = checkInput('(3) Please enter a type', '([a-zA-Z_][a-zA-Z0-9_]*)',  (psServiceName1.lower() + ('_service_pt' if not psServiceName1.endswith('_service_pt') else ''))  );
-    #			psInclude = checkInput('(4) Please enter the name of the include file', '(.+?)(\.[^.]*$|$)', psServiceName1.lower() + '.h'); 
+    #           while yn('Should component \'%s\' provide %s service?' % (componentName, 'a' if 'psInclude' not in vars() else 'another')):
+    #                   psServiceName1 = checkInput('(1) Please enter a name, which can be used for the filename and the include guards', '([a-zA-Z_][a-zA-Z0-9_]*)'); 
+    #                   psServiceName2 = checkInput('(2) Please enter a name, which is used to register and lookup the service', '([a-zA-Z_][a-zA-Z0-9_]*)', (psServiceName1.lower() + ('_service' if not psServiceName1.endswith('_service') else ''))); 
+    #                   psServiceVersion = checkInput('(3) Please enter a version number', '(\d+\.)?(\d+\.)?(\d+\.)?(\*|\d+)', '1.0.0.0'); 
+    #                   psServiceType = checkInput('(4) Please enter a type', '([a-zA-Z_][a-zA-Z0-9_]*)',  (psServiceName1.lower() + ('_service_t' if not psServiceName1.endswith('_service_t') else ''))  );
+    #                   psInclude = checkInput('(5) Please enter the name of the include file', '(.+?)(\.[^.]*$|$)', psServiceName1.lower() + '.h'); 
     #
-    #			print("\n Summary:")	
-    #			print("\tname :\t%s" % (psServiceName1))	
-    #			print("\tservice_name:\t%s" % (psServiceName2))	
-    #			print("\tservice_type:\t%s" % (psServiceType))	
-    #			print("\tinclude file:\t%s" % (psInclude)) 
-    #			if yn('Are those information correct?'):
-    #				cog.outl('      - {include: \'%s\', name: \'%s\', service_name: \'%s\', type: \'%s\'}' % (psInclude, psServiceName1, psServiceName2, psServiceType))
-    #			else:
-    #				print("Service was not added.")
+    #                   print("\n Summary:")    
+    #                   print("\tname :\t%s" % (psServiceName1))        
+    #                   print("\tservice_name:\t%s" % (psServiceName2)) 
+    #                   print("\tservice_version:\t%s" % (psServiceVersion))    
+    #                   print("\tservice_type:\t%s" % (psServiceType))  
+    #                   print("\tinclude file:\t%s" % (psInclude)) 
+    #                   if yn('Are those information correct?'):
+    #                           cog.outl('      - {include: \'%s\', name: \'%s\', service_name: \'%s\', service_version: \'%s\', type: \'%s\'}' % (psInclude, psServiceName1, psServiceName2, psServiceVersion, psServiceType))
+    #                   else:
+    #                           print("Service was not added.")
     #
     #		cog.outl('  serviceDependencies:')
     #		while yn('Should component \'%s\' depend on %s service?' % (componentName, 'a' if 'sdInclude' not in vars() else 'another')):
-    #			sdInclude = checkInclude('(1) Please enter the include filename, which describes the service', '(.+?)(\.[^.]*$|$)'); 
-    #			sdServiceName1 = checkInput('(2) Please enter a name, which is used to generate the code', '([a-zA-Z_][a-zA-Z0-9_]*)'); 
-    #			sdServiceName2 = checkIncludeContent('(3) Please enter the variable/constants, which is used to register the service within the framework', sdInclude); 
-    #			sdServiceType = checkIncludeContent('(4) Please enter the type of the service', sdInclude);
-    #			sdCardinality = checkInput('(5) Please enter the cardinality (one|many|optional)', '(one)|(many)|(optional)');
+    #                   sdInclude = checkInclude('(1) Please enter the include filename, which describes the service', '(.+?)(\.[^.]*$|$)'); 
+    #                   sdServiceName1 = checkInput('(2) Please enter a name, which is used to generate the code', '([a-zA-Z_][a-zA-Z0-9_]*)'); 
+    #                   sdServiceName2 = checkIncludeContent('(3) Please enter the variable/constants, which is used to register the service within the framework', sdInclude); 
+    #                   sdServiceRange = checkIncludeContent('(4) Please enter the variable/constants, which contains the version range', sdInclude); 
+    #                   sdServiceType = checkIncludeContent('(5) Please enter the type of the service', sdInclude);
+    #                   sdCardinality = checkInput('(6) Please enter the cardinality (one|many|optional)', '(one)|(many)|(optional)');
     #
-    #			print("\n Summary:")	
-    #			print("\tname :\t%s" % (sdServiceName1))	
-    #			print("\tservice_name:\t%s" % (sdServiceName2))	
-    #			print("\tservice_type:\t%s" % (sdServiceType))	
-    #			print("\tcardinality:\t%s" % (sdCardinality)) 
-    #			print("\tinclude file:\t%s" % (sdInclude)) 
-    #			if yn('Are those information correct?'):
-    #				cog.outl('      - {include: \'%s\', name: \'%s\', service_name: \'%s\', type: \'%s\', cardinality: \'%s\'}' % (sdInclude, sdServiceName1, sdServiceName2, sdServiceType, sdCardinality))
-    #			else:
-    #				print("Service dependency was not added.")
+    #                   print("\n Summary:")    
+    #                   print("\tname :\t%s" % (sdServiceName1))        
+    #                   print("\tservice_name:\t%s" % (sdServiceName2)) 
+    #                   print("\tservice_range:\t%s" % (sdServiceRange))        
+    #                   print("\tservice_type:\t%s" % (sdServiceType))  
+    #                   print("\tcardinality:\t%s" % (sdCardinality)) 
+    #                   print("\tinclude file:\t%s" % (sdInclude)) 
+    #                   if yn('Are those information correct?'):
+    #                           cog.outl('      - {include: \'%s\', name: \'%s\', service_name: \'%s\', service_versionrange: \'%s\', type: \'%s\', cardinality: \'%s\'}' % (sdInclude, sdServiceName1, sdServiceName2, sdServiceRange, sdServiceType, sdCardinality))
+    #                   else:
+    #                           print("Service dependency was not added.")
     #}}
     #{{end}}
 

http://git-wip-us.apache.org/repos/asf/celix/blob/37010fbe/celix-bootstrap/celix/bootstrap/templates/bundle/bundle_activator.c
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/bootstrap/templates/bundle/bundle_activator.c b/celix-bootstrap/celix/bootstrap/templates/bundle/bundle_activator.c
index d28b73c..025eed4 100644
--- a/celix-bootstrap/celix/bootstrap/templates/bundle/bundle_activator.c
+++ b/celix-bootstrap/celix/bootstrap/templates/bundle/bundle_activator.c
@@ -1,5 +1,21 @@
-//TODO update fields from <service>Type to <service>For<component>Type
-
+/**
+ *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.
+ */
 //{{
 //import os, yaml
 //bundle = None 
@@ -17,7 +33,6 @@
 //}}
 //{{end}}
 #include <stdlib.h>
-
 #include <pthread.h>
 
 #include <constants.h>
@@ -25,6 +40,9 @@
 #include <service_tracker.h>
 #include <hash_map.h>
 
+#include "bundle_activator.h"
+#include "dm_activator_base.h"
+
 //Includes for the services / components
 //{{
 //for comp in bundle['components'] : 
@@ -36,448 +54,107 @@
 //}}
 //{{end}}
 
-
-
-//Private (static) function declarations
-//{{
-//for comp in bundle['components'] :
-//	cog.outl("static bundleActivator_resolveStateFor%s(struct activator *activator);" % comp['name'].title())
-//	for service in comp['serviceDependencies'] :
-//		cog.outl("static celix_status_t bundleActivator_add%sFor%s(void *handle, service_reference_pt ref, void *service);" % (service['name'].title(), comp['name'].title()))
-//		cog.outl("static celix_status_t bundleActivator_remove%sFor%s(void *handle, service_reference_pt ref, void *service);" % (service['name'].title(), comp['name'].title()))
-//}}
-static bundleActivator_resolveStateForExample(struct activator *activator); //do not edit, generated code
-static celix_status_t bundleActivator_addLoggerForExample(void *handle, service_reference_pt ref, void *service); //do not edit, generated code
-static celix_status_t bundleActivator_removeLoggerForExample(void *handle, service_reference_pt ref, void *service); //do not edit, generated code
-static celix_status_t bundleActivator_addLoggerOptionalForExample(void *handle, service_reference_pt ref, void *service); //do not edit, generated code
-static celix_status_t bundleActivator_removeLoggerOptionalForExample(void *handle, service_reference_pt ref, void *service); //do not edit, generated code
-static celix_status_t bundleActivator_addLoggerManyForExample(void *handle, service_reference_pt ref, void *service); //do not edit, generated code
-static celix_status_t bundleActivator_removeLoggerManyForExample(void *handle, service_reference_pt ref, void *service); //do not edit, generated code
-//{{end}}
-static celix_status_t bundleActivator_getFirst(hash_map_pt services, void **result);
-
-typedef enum component_state {
-	COMPONENT_STATE_UNKNOWN = 0,
-	COMPONENT_STATE_CREATED = 1,
-	COMPONENT_STATE_STARTED = 2,
-	COMPONENT_STATE_STOPPED = 3,
-	COMPONENT_STATE_DESTROYED = 4
-} component_state_type;
-
-struct activator {
-	bundle_context_pt context;
-//Fields for components, service structs, service registries and trackers
 //{{
-//cog.outl("//no indent marker")
-//for comp in bundle['components'] :
-//	cog.outl("\t%s_pt %s;" % (comp['name'], comp['name']))
-//	cog.outl("\tpthread_mutex_t %sLock;" % comp['name'])
-//	cog.outl("\tcomponent_state_type %sState;" % comp['name'])
-//	for service in comp['serviceDependencies'] :
-//		cog.outl("\tservice_tracker_customizer_pt %sCustomizer;" % service['name'])
-//		cog.outl("\tservice_tracker_pt %sServiceTracker;" % service['name'])
-//		if service['cardinality'] == "one" or service['cardinality'] == "optional" :
-//			cog.outl("\thash_map_pt %sServicesFor%s;" % (service['name'], comp['name'].title()))
-//			cog.outl("\t%s current%sServiceFor%s;" % (service['type'], service['name'].title(), comp['name'].title())) 
-//	for service in comp['providedServices'] :
-//		cog.outl("\t%s %s;" % (service['type'], service['name']))
-//		cog.outl("\tservice_registration_pt %sServiceRegistry;" % service['name'])
-//	cog.outl("")
+//cog.outl("struct %s_activator_struct {" %(bundle['name']) )
+//for comp in bundle['components'] : 
+//      cog.outl("    %s_cmp_t *%sCmp;" %(comp['name'], comp['name']) )
+//      for service in comp['providedServices'] :
+//              cog.outl("      %s %sServ;" %(service['type'],service['name']) )
+//cog.outl("};");
 //}}
-//no indent marker //do not edit, generated code
-	example_pt example; //do not edit, generated code
-	pthread_mutex_t exampleLock; //do not edit, generated code
-	component_state_type exampleState; //do not edit, generated code
-	service_tracker_customizer_pt loggerCustomizer; //do not edit, generated code
-	service_tracker_pt loggerServiceTracker; //do not edit, generated code
-	hash_map_pt loggerServicesForExample; //do not edit, generated code
-	log_service_pt currentLoggerServiceForExample; //do not edit, generated code
-	service_tracker_customizer_pt loggerOptionalCustomizer; //do not edit, generated code
-	service_tracker_pt loggerOptionalServiceTracker; //do not edit, generated code
-	hash_map_pt loggerOptionalServicesForExample; //do not edit, generated code
-	log_service_pt currentLoggerOptionalServiceForExample; //do not edit, generated code
-	service_tracker_customizer_pt loggerManyCustomizer; //do not edit, generated code
-	service_tracker_pt loggerManyServiceTracker; //do not edit, generated code
-	command_service_pt command; //do not edit, generated code
-	service_registration_pt commandServiceRegistry; //do not edit, generated code
-	command_service_pt command2; //do not edit, generated code
-	service_registration_pt command2ServiceRegistry; //do not edit, generated code
-
-//{{end}}
+struct example_activator_struct {
+        example_cmp_t* exampleCmp;
+        example_t exampleServ;  
 };
-
-celix_status_t bundleActivator_create(bundle_context_pt context, void **userData) {
-	celix_status_t status = CELIX_SUCCESS;
-	struct activator *activator = calloc(1, sizeof(struct activator));
-	if (activator != NULL) {
-		(*userData) = activator;
-//{{
-//for comp in bundle['components'] :
-//	cog.outl("//no indent marker")
-//	cog.outl("\t\tactivator->%s = NULL;" % comp['name'])
-//	cog.outl("\t\t%s_create(&activator->%s);" % (comp['name'], comp['name']))
-//	cog.outl("\t\tactivator->%sState = COMPONENT_STATE_CREATED;" % (comp['name']))
-//	cog.outl("\t\tpthread_mutex_init(&activator->%sLock, NULL);" % comp['name'])
-//
-//	for service in comp['serviceDependencies'] :
-//		cog.outl("\t\tactivator->%sServiceTracker = NULL;" % service['name'])
-//		cog.outl("\t\tserviceTrackerCustomizer_create(activator, NULL, bundleActivator_add%sFor%s, NULL, bundleActivator_remove%sFor%s, &activator->%sCustomizer);" % (service['name'].title(), comp['name'].title(), service['name'].title(), comp['name'].title(), service['name']))
-//		if 'service_name' in service :
-//			cog.outl("\t\tserviceTracker_create(context, (char *) %s, activator->%sCustomizer, &activator->%sServiceTracker);" % (service['service_name'], service['name'], service['name']))
-//		else :
-//			cog.outl("\t\tserviceTracker_createWithService(context, \"%s\", activator->%sCustomizer, &activator->%sServiceTracker);" % (service['filter'], service['name'], service['name']))
-//		if service['cardinality'] == "one" or service['cardinality'] == "optional" :
-//			cog.outl("\t\tactivator->%sServicesFor%s = hashMap_create(NULL, NULL, NULL, NULL);" % (service['name'], comp['name'].title()))
-//			cog.outl("\t\tactivator->current%sServiceFor%s = NULL;" % (service['name'].title(), comp['name'].title()))
-//
-//	for service in comp['providedServices'] :
-//		cog.outl("\t\tactivator->%s = NULL;" % service['name'])
-//		cog.outl("\t\tactivator->%sServiceRegistry = NULL;" % service['name'])
-//	cog.outl("")
-//}}
-//no indent marker //do not edit, generated code
-		activator->example = NULL; //do not edit, generated code
-		example_create(&activator->example); //do not edit, generated code
-		activator->exampleState = COMPONENT_STATE_CREATED; //do not edit, generated code
-		pthread_mutex_init(&activator->exampleLock, NULL); //do not edit, generated code
-		activator->loggerServiceTracker = NULL; //do not edit, generated code
-		serviceTrackerCustomizer_create(activator, NULL, bundleActivator_addLoggerForExample, NULL, bundleActivator_removeLoggerForExample, &activator->loggerCustomizer); //do not edit, generated code
-		serviceTracker_create(context, (char *) OSGI_LOGSERVICE_NAME, activator->loggerCustomizer, &activator->loggerServiceTracker); //do not edit, generated code
-		activator->loggerServicesForExample = hashMap_create(NULL, NULL, NULL, NULL); //do not edit, generated code
-		activator->currentLoggerServiceForExample = NULL; //do not edit, generated code
-		activator->loggerOptionalServiceTracker = NULL; //do not edit, generated code
-		serviceTrackerCustomizer_create(activator, NULL, bundleActivator_addLoggerOptionalForExample, NULL, bundleActivator_removeLoggerOptionalForExample, &activator->loggerOptionalCustomizer); //do not edit, generated code
-		serviceTracker_create(context, (char *) OSGI_LOGSERVICE_NAME, activator->loggerOptionalCustomizer, &activator->loggerOptionalServiceTracker); //do not edit, generated code
-		activator->loggerOptionalServicesForExample = hashMap_create(NULL, NULL, NULL, NULL); //do not edit, generated code
-		activator->currentLoggerOptionalServiceForExample = NULL; //do not edit, generated code
-		activator->loggerManyServiceTracker = NULL; //do not edit, generated code
-		serviceTrackerCustomizer_create(activator, NULL, bundleActivator_addLoggerManyForExample, NULL, bundleActivator_removeLoggerManyForExample, &activator->loggerManyCustomizer); //do not edit, generated code
-		serviceTracker_create(context, (char *) OSGI_LOGSERVICE_NAME, activator->loggerManyCustomizer, &activator->loggerManyServiceTracker); //do not edit, generated code
-		activator->command = NULL; //do not edit, generated code
-		activator->commandServiceRegistry = NULL; //do not edit, generated code
-		activator->command2 = NULL; //do not edit, generated code
-		activator->command2ServiceRegistry = NULL; //do not edit, generated code
-
 //{{end}}
-	} else {
-		status = CELIX_ENOMEM;
-	}
-	return status;
-}
-
-celix_status_t bundleActivator_start(void *userData, bundle_context_pt context) {
-	celix_status_t status = CELIX_SUCCESS;
-	struct activator *activator = userData;
 
-	//TODO allocate and assign all declared provided services  
-	//e.g:
-	//activator->command = calloc(1, sizeof(*activator->command));
-	//activator->command->command = activator->example;
-	//activator->command->getName = example_getStateCommandName;
-	//activator->command->getUsage = example_getUsage;
-	//activator->command->getShortDescription = example_getStateCommandShortDescription;
-	//activator->command->executeCommand = example_executeStateCommand;
 
-//Start compnent, register service if the service struct is allocated
+celix_status_t dm_create(bundle_context_pt context, void **userData) {
 //{{
-//cog.outl("//indent marker")
-//for comp in bundle['components'] :
-//	cog.outl("\t%s_start(activator->%s);" % (comp['name'], comp['name']))
-//	for service in comp['serviceDependencies'] :
-//		cog.outl("\tserviceTracker_open(activator->%sServiceTracker);" % service['name'])
-//	for service in comp['providedServices'] :
-//		cog.outl("\tif (activator->%s != NULL) {" % service['name'])
-//		cog.outl("\t\tbundleContext_registerService(context, (char *)  %s_SERVICE_NAME, activator->%s, NULL, &activator->%sServiceRegistry);" % (service['name'].upper(), service['name'], service['name']))
-//		cog.outl("\t}")
+//cog.outl("    printf(\"%s: dm_create\\n\");" %(bundle['name']) )
+//cog.outl("    *userData = calloc(1, sizeof(struct %s_activator_struct));" %(bundle['name']) )
 //}}
-//indent marker //do not edit, generated code
-	example_start(activator->example); //do not edit, generated code
-	serviceTracker_open(activator->loggerServiceTracker); //do not edit, generated code
-	serviceTracker_open(activator->loggerOptionalServiceTracker); //do not edit, generated code
-	serviceTracker_open(activator->loggerManyServiceTracker); //do not edit, generated code
-	if (activator->command != NULL) { //do not edit, generated code
-		bundleContext_registerService(context, (char *)"commandService", activator->command, NULL, &activator->commandServiceRegistry); //do not edit, generated code
-	} //do not edit, generated code
-	if (activator->command2 != NULL) { //do not edit, generated code
-		bundleContext_registerService(context, (char *)"commandService", activator->command2, NULL, &activator->command2ServiceRegistry); //do not edit, generated code
-	} //do not edit, generated code
+        *userData = calloc(1, sizeof(struct example_activator_struct));
+        printf("example: dm_create\n");
 //{{end}}
-
-	return status;
+        return *userData != NULL ? CELIX_SUCCESS : CELIX_ENOMEM;
 }
 
-celix_status_t bundleActivator_stop(void *userData, bundle_context_pt context) {
-	celix_status_t status = CELIX_SUCCESS;
-	struct activator *activator = userData;
-
-//Stop compnent, unregister service if the service struct is allocated
+celix_status_t dm_init(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
+        celix_status_t status = CELIX_SUCCESS;
 //{{
-//cog.outl("//indent marker")
-//for comp in bundle['components'] :
-//	for service in comp['providedServices'] :
-//		cog.outl("\tif (activator->%s != NULL) {" % service['name'])
-//		cog.outl("\t\tserviceRegistration_unregister(activator->%sServiceRegistry);" % (service['name']))
-//		cog.outl("\t}")
+//cog.outl("    printf(\"%s: dm_init\\n\");" %(bundle['name']) )
+//cog.outl("    struct %s_activator_struct *act = (struct %s_activator_struct *) userData;" %(bundle['name'],bundle['name']) )
+//for comp in bundle['components'] : 
+//      cog.outl("      act->%sCmp = %s_create();" %(comp['name'],comp['name']) )
+//      cog.outl("      if (act->%sCmp != NULL) {" %(comp['name']) )
+//      cog.outl("              dm_component_pt cmp%s;" %(comp['name'].title()))
+//      cog.outl("              component_create(context, \"%s_PROCESSING_COMPONENT\", &cmp%s);" %(comp['name'].upper(), comp['name'].title()))
+//      cog.outl("              component_setImplementation(cmp%s, act->%sCmp);" %(comp['name'].title(), comp['name']) )
+//      cog.outl("              component_setCallbacksSafe(cmp%s, %s_cmp_t *, %s_init, %s_start, %s_stop, %s_deinit);" %(comp['name'].title(), comp['name'],comp['name'],comp['name'],comp['name'],comp['name']) )
 //
-//	for service in comp['serviceDependencies'] :
-//		cog.outl("\tserviceTracker_close(activator->%sServiceTracker);" % service['name'])
-//		cog.outl("\t%s_stop(activator->%s);" % (comp['name'], comp['name']))
+//      for service in comp['providedServices'] :
+//              cog.outl("              properties_pt props%s = properties_create();" %(service['name'].title()))
+//              cog.outl("              act->%sServ.handle = act->%sCmp;" %(service['name'], comp['name']) )
+//              cog.outl("              act->%sServ.callService = (void *)%s%s_callService;" %(service['name'], comp['name'],service['name'].title()) )
+//              cog.outl("              properties_set(props%s, \"id\", \"%s\");" %(service['name'].title(), comp['name']) )
+//              cog.outl("              component_addInterface(cmp%s, %s_NAME, %s_VERSION, &act->%sServ, props%s);" %(comp['name'].title(), service['name'].upper(), service['name'].upper(), service['name'], service['name'].title()) )
+//
+//      for service in comp['serviceDependencies'] :
+//              cog.outl("              dm_service_dependency_pt dep%s;" %(service['name'].title()))
+//              cog.outl("              serviceDependency_create(&dep%s);" %(service['name'].title()))
+//              cog.outl("              serviceDependency_setService(dep%s, (char*) %s, (char*) %s, NULL);" %(service['name'].title(), service['service_name'], service['service_versionrange']))
+//              cog.outl("              serviceDependency_setCallbacksSafe(dep%s, %s_cmp_t *, %s, %s_set%s, NULL, NULL, NULL, NULL);" %(service['name'].title(), comp['name'], service['type'], comp['name'], service['name']) )
+//              cog.outl("              serviceDependency_setRequired(dep%s, true);" %(service['name'].title()))
+//              cog.outl("              component_addServiceDependency(cmp%s, dep%s);" %(comp['name'].title(), service['name'].title()))
+//
+//      cog.outl("              dependencyManager_add(manager, cmp%s);"  %(comp['name'].title()))
+//      cog.outl("      } else {")
+//      cog.outl("              status = CELIX_ENOMEM;")
+//      cog.outl("      }")
 //}}
-//indent marker //do not edit, generated code
-	if (activator->command != NULL) { //do not edit, generated code
-		serviceRegistration_unregister(activator->commandServiceRegistry); //do not edit, generated code
-	} //do not edit, generated code
-	if (activator->command2 != NULL) { //do not edit, generated code
-		serviceRegistration_unregister(activator->command2ServiceRegistry); //do not edit, generated code
-	} //do not edit, generated code
-	serviceTracker_close(activator->loggerServiceTracker); //do not edit, generated code
-	serviceTracker_close(activator->loggerOptionalServiceTracker); //do not edit, generated code
-	serviceTracker_close(activator->loggerManyServiceTracker); //do not edit, generated code
-	example_stop(activator->example); //do not edit, generated code
-//{{end}}
+        struct example_activator_struct *act = (struct example_activator_struct *) userData;
+
+        printf("example: dm_init\n");
+
+        act->exampleCmp = example_create();
+        if (act->exampleCmp != NULL) {
+                dm_component_pt cmpExample;
+                component_create(context, "EXAMPLE_PROCESSING_COMPONENT", &cmpExample);
+                component_setImplementation(cmpExample, act->exampleCmp);
+                component_setCallbacksSafe(cmpExample, example_cmp_t *, example_init, example_start, example_stop, example_deinit);
+                
+                // provided services
+                properties_pt propsExample = properties_create();
+                act->exampleServ.handle = act->exampleCmp;
+                act->exampleServ.getDate = act->exampleServ_getData;
+                properties_set(propsExample, "id", "example");
+
+                component_addInterface(cmpExample, EXAMPLE_NAME, EXAMPLE_VERSION, &act->exampleServ, propsExample);
+                dependencyManager_add(manager, cmpExample);
+        }
 
-	return status;
-}
-
-celix_status_t bundleActivator_destroy(void *userData, bundle_context_pt context) {
-	celix_status_t status = CELIX_SUCCESS;
-	struct activator *activator = userData;
-
-//Stop compnent, unregister service if the service struct is allocated
-//{{
-//cog.outl("//indent marker")
-//for comp in bundle['components'] :
-//	cog.outl("\t%s_destroy(activator->%s);" % (comp['name'], comp['name']))
-//	for service in comp['serviceDependencies'] :
-//		cog.outl("\tserviceTracker_destroy(activator->%sServiceTracker);" % service['name'])
-//	for service in comp['providedServices'] :
-//		cog.outl("\tif (activator->%s != NULL) {" % service['name'])
-//		cog.outl("\t\tfree(activator->%s);" % (service['name']))
-//		cog.outl("\t\tactivator->%sState = COMPONENT_STATE_DESTROYED;" % comp['name'])
-//		cog.outl("\t}")
-//}}
-//indent marker //do not edit, generated code
-	example_destroy(activator->example); //do not edit, generated code
-	serviceTracker_destroy(activator->loggerServiceTracker); //do not edit, generated code
-	serviceTracker_destroy(activator->loggerOptionalServiceTracker); //do not edit, generated code
-	serviceTracker_destroy(activator->loggerManyServiceTracker); //do not edit, generated code
-	if (activator->command != NULL) { //do not edit, generated code
-		free(activator->command); //do not edit, generated code
-		activator->exampleState = COMPONENT_STATE_DESTROYED; //do not edit, generated code
-	} //do not edit, generated code
-	if (activator->command2 != NULL) { //do not edit, generated code
-		free(activator->command2); //do not edit, generated code
-		activator->exampleState = COMPONENT_STATE_DESTROYED; //do not edit, generated code
-	} //do not edit, generated code
 //{{end}}
-
-	return status;
-}
-
-
-static celix_status_t bundleActivator_getFirst(hash_map_pt services, void **result) {
-	celix_status_t status = CELIX_SUCCESS;
-	void *highestPrio = NULL;
-	int highestPrioRanking = -1;
-	int highestPrioServiceId = -1;
-	char *rankingStr;
-	int ranking;
-	char *serviceIdStr;
-	int serviceId;
-	
-	hash_map_iterator_pt iter = hashMapIterator_create(services); 
-	while (hashMapIterator_hasNext(iter)) {
-		service_reference_pt ref = hashMapIterator_nextKey(iter);
-		rankingStr = NULL;
-		serviceIdStr = NULL;
-		serviceReference_getProperty(ref, (char *)OSGI_FRAMEWORK_SERVICE_RANKING, &rankingStr);
-		if (rankingStr != NULL) {
-			ranking = atoi(rankingStr);	
-		} else {
-			ranking = 0;
-		}
-		serviceReference_getProperty(ref, (char *)OSGI_FRAMEWORK_SERVICE_RANKING, &serviceIdStr);
-		serviceId  = atoi(serviceIdStr);
-
-		if (ranking > highestPrioRanking) {
-			highestPrio = hashMap_get(services, ref);
-		} else if (ranking == highestPrioRanking && serviceId < highestPrioServiceId) {
-			highestPrio = hashMap_get(services, ref);
-		}
-	}
-
-	if (highestPrio != NULL) {
-		(*result) = highestPrio;
-	}
-	return status;
+    return status;
 }
 
 
-//ResolveNewState
+celix_status_t dm_destroy(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
 //{{
-//for comp in bundle['components'] :
-//	cog.outl("static bundleActivator_resolveStateFor%s(struct activator *activator) {" % comp['name'].title())
-//	cog.outl("\tcelix_status_t status = CELIX_SUCCESS;")
-//
-//	cog.out("\tif (activator->%sState == COMPONENT_STATE_CREATED " % comp['name'])
-//	conditions = [("activator->current%sServiceFor%s != NULL" % (serv['name'].title(), comp['name'].title())) for serv in comp['serviceDependencies'] if serv['cardinality'] == "one"] 
-//	if len(conditions) > 0: 
-//		cog.out(" && ")
-//		cog.out(" && ".join(conditions))
-//	cog.outl(") {")
-//	cog.outl("\t\t%s_start(activator->%s);" % (comp['name'], comp['name']))
-//	cog.outl("\t}")
-//
-//	cog.out("\tif (activator->%sState == COMPONENT_STATE_STARTED " % comp['name'])
-//	conditions = [("activator->current%sServiceFor%s == NULL" % (serv['name'].title(), comp['name'].title())) for serv in comp['serviceDependencies'] if serv['cardinality'] == "one"]
-//	if len(conditions) > 0:
-//		cog.out(" && (");
-//		cog.out(" || ".join(conditions))
-//		cog.out(")"); 
-//	cog.outl(") {")
-//	cog.outl("\t\t%s_stop(activator->%s);" % (comp['name'], comp['name']))
-//	cog.outl("\t}")
-//
-//	cog.outl("\treturn status;")
-//	cog.outl("}")
+//cog.outl("    printf(\"%s: dm-destroy\\n\");" %(bundle['name']) )
+//cog.outl("    struct %s_activator_struct *act = (struct %s_activator_struct *)userData;" %(bundle['name'],bundle['name']) )
+//cog.outl("    if (act->%sCmp != NULL) {" %(comp['name']) )
+//cog.outl("            %s_destroy(act->%sCmp);" %(comp['name'],comp['name']) )
+//cog.outl("    }");
+//cog.outl("    free(act);")
 //}}
-static bundleActivator_resolveStateForExample(struct activator *activator) { //do not edit, generated code
-	celix_status_t status = CELIX_SUCCESS; //do not edit, generated code
-	if (activator->exampleState == COMPONENT_STATE_CREATED && activator->currentLoggerServiceForExample != NULL) { //do not edit, generated code
-		example_start(activator->example); //do not edit, generated code
-	} //do not edit, generated code
-	if (activator->exampleState == COMPONENT_STATE_STARTED && (activator->currentLoggerServiceForExample == NULL)) { //do not edit, generated code
-		example_stop(activator->example); //do not edit, generated code
-	} //do not edit, generated code
-	return status; //do not edit, generated code
-} //do not edit, generated code
+        struct example_activator_struct *act = (struct example_activator_struct *) userData;
+        printf("example: dm_destroy\n");
+        
+        if (act->exampleCmp != NULL) {  
+                example_destroy(act->exampleCmp);
+        }
 //{{end}}
+        return CELIX_SUCCESS;
+}
 
-//Add/Remove functions for the trackers
-//{{
-//for comp in bundle['components'] :
-//	for service in comp['serviceDependencies'] :
-//		cog.outl("static celix_status_t bundleActivator_add%sFor%s(void *handle, service_reference_pt ref, void *service) {" % (service['name'].title(), comp['name'].title()))
-//		cog.outl("\tcelix_status_t status = CELIX_SUCCESS;")
-//		cog.outl("\tstruct activator *activator = handle;")
-//		cog.outl("\t%s %s = service;" % (service['type'], service['name']))
-//		if service['cardinality'] == "many" :
-//			cog.outl("\t%s_add%s(activator->%s, %s);" % (comp['name'], service['name'].title(), comp['name'], service['name']))
-//		else :
-//			cog.outl("\tpthread_mutex_lock(&activator->%sLock);" % comp['name']);
-//			cog.outl("\t%s highest = NULL;" % service['type']);
-//			cog.outl("\tbundleActivator_getFirst(activator->%sServicesFor%s, (void **)&highest);" % (service['name'], comp['name'].title()))
-//			cog.outl("\tif (highest != activator->current%sServiceFor%s) {" % (service['name'].title(), comp['name'].title()))
-//			cog.outl("\t\tactivator->current%sServiceFor%s = highest;" % (service['name'].title(), comp['name'].title()))
-//			cog.outl("\t\t%s_set%s(activator->%s, highest);" % (comp['name'], service['name'].title(), comp['name'])) 
-//			cog.outl("\t\tbundleActivator_resolveStateFor%s(activator);" % comp['name'].title());
-//			cog.outl("\t}")
-//			cog.outl("\tpthread_mutex_unlock(&activator->%sLock);" % comp['name']);
-//		cog.outl("\treturn status;")
-//		cog.outl("}")
-//		cog.outl("")
-//		cog.outl("static celix_status_t bundleActivator_remove%sFor%s(void *handle, service_reference_pt ref, void *service) {" % (service['name'].title(), comp['name'].title()))
-//		cog.outl("\tcelix_status_t status = CELIX_SUCCESS;")
-//		cog.outl("\tstruct activator *activator = handle;")
-//		cog.outl("\t%s %s = service;" % (service['type'], service['name']))
-//
-//		if service['cardinality'] == "many" :
-//			cog.outl("\t%s_remove_%s(activator->%s, %s);" % (comp['name'], service['name'], comp['name'], service['name']))
-//		else :
-//			cog.outl("\tpthread_mutex_lock(&activator->%sLock);" % comp['name']);
-//			cog.outl("\thashMap_remove(activator->%sServicesFor%s, ref);" % (service['name'], comp['name'].title()))
-//			cog.outl("\tif (activator->current%sServiceFor%s == service) { " % (service['name'].title(), comp['name'].title()))
-//			cog.outl("\t\t%s highest = NULL;" % service['type']);
-//		cog.outl("\t\tbundleActivator_getFirst(activator->%sServicesFor%s, (void **)&highest);" % (service['name'], comp['name'].title()))
-//		cog.outl("\t\tactivator->current%sServiceFor%s = highest;" % (service['name'].title(), comp['name'].title()))
-//		cog.outl("\t\tbundleActivator_resolveStateFor%s(activator);" % comp['name'].title());
-//		cog.outl("\t\t%s_set%s(activator->%s, highest);" % (comp['name'], service['name'].title(), comp['name'])) 
-//		cog.outl("\t}")
-//		cog.outl("\tpthread_mutex_unlock(&activator->%sLock);" % comp['name']);
-//		cog.outl("\treturn status;")
-//		cog.outl("}")
-//		cog.outl("")
-//}}
-static celix_status_t bundleActivator_addLoggerForExample(void *handle, service_reference_pt ref, void *service) { //do not edit, generated code
-	celix_status_t status = CELIX_SUCCESS; //do not edit, generated code
-	struct activator *activator = handle; //do not edit, generated code
-	log_service_pt logger = service; //do not edit, generated code
-	pthread_mutex_lock(&activator->exampleLock); //do not edit, generated code
-	log_service_pt highest = NULL; //do not edit, generated code
-	bundleActivator_getFirst(activator->loggerServicesForExample, (void **)&highest); //do not edit, generated code
-	if (highest != activator->currentLoggerServiceForExample) { //do not edit, generated code
-		activator->currentLoggerServiceForExample = highest; //do not edit, generated code
-		example_setLogger(activator->example, highest); //do not edit, generated code
-		bundleActivator_resolveStateForExample(activator); //do not edit, generated code
-	} //do not edit, generated code
-	pthread_mutex_unlock(&activator->exampleLock); //do not edit, generated code
-	return status; //do not edit, generated code
-} //do not edit, generated code
-
-static celix_status_t bundleActivator_removeLoggerForExample(void *handle, service_reference_pt ref, void *service) { //do not edit, generated code
-	celix_status_t status = CELIX_SUCCESS; //do not edit, generated code
-	struct activator *activator = handle; //do not edit, generated code
-	log_service_pt logger = service; //do not edit, generated code
-	pthread_mutex_lock(&activator->exampleLock); //do not edit, generated code
-	hashMap_remove(activator->loggerServicesForExample, ref); //do not edit, generated code
-	if (activator->currentLoggerServiceForExample == service) {  //do not edit, generated code
-		log_service_pt highest = NULL; //do not edit, generated code
-		bundleActivator_getFirst(activator->loggerServicesForExample, (void **)&highest); //do not edit, generated code
-		activator->currentLoggerServiceForExample = highest; //do not edit, generated code
-		bundleActivator_resolveStateForExample(activator); //do not edit, generated code
-		example_setLogger(activator->example, highest); //do not edit, generated code
-	} //do not edit, generated code
-	pthread_mutex_unlock(&activator->exampleLock); //do not edit, generated code
-	return status; //do not edit, generated code
-} //do not edit, generated code
-
-static celix_status_t bundleActivator_addLoggerOptionalForExample(void *handle, service_reference_pt ref, void *service) { //do not edit, generated code
-	celix_status_t status = CELIX_SUCCESS; //do not edit, generated code
-	struct activator *activator = handle; //do not edit, generated code
-	log_service_pt loggerOptional = service; //do not edit, generated code
-	pthread_mutex_lock(&activator->exampleLock); //do not edit, generated code
-	log_service_pt highest = NULL; //do not edit, generated code
-	bundleActivator_getFirst(activator->loggerOptionalServicesForExample, (void **)&highest); //do not edit, generated code
-	if (highest != activator->currentLoggerOptionalServiceForExample) { //do not edit, generated code
-		activator->currentLoggerOptionalServiceForExample = highest; //do not edit, generated code
-		example_setLoggerOptional(activator->example, highest); //do not edit, generated code
-		bundleActivator_resolveStateForExample(activator); //do not edit, generated code
-	} //do not edit, generated code
-	pthread_mutex_unlock(&activator->exampleLock); //do not edit, generated code
-	return status; //do not edit, generated code
-} //do not edit, generated code
-
-static celix_status_t bundleActivator_removeLoggerOptionalForExample(void *handle, service_reference_pt ref, void *service) { //do not edit, generated code
-	celix_status_t status = CELIX_SUCCESS; //do not edit, generated code
-	struct activator *activator = handle; //do not edit, generated code
-	log_service_pt loggerOptional = service; //do not edit, generated code
-	pthread_mutex_lock(&activator->exampleLock); //do not edit, generated code
-	hashMap_remove(activator->loggerOptionalServicesForExample, ref); //do not edit, generated code
-	if (activator->currentLoggerOptionalServiceForExample == service) {  //do not edit, generated code
-		log_service_pt highest = NULL; //do not edit, generated code
-		bundleActivator_getFirst(activator->loggerOptionalServicesForExample, (void **) &highest); //do not edit, generated code
-		activator->currentLoggerOptionalServiceForExample = highest; //do not edit, generated code
-		bundleActivator_resolveStateForExample(activator); //do not edit, generated code
-		example_setLoggerOptional(activator->example, highest); //do not edit, generated code
-	} //do not edit, generated code
-	pthread_mutex_unlock(&activator->exampleLock); //do not edit, generated code
-	return status; //do not edit, generated code
-} //do not edit, generated code
-
-static celix_status_t bundleActivator_addLoggerManyForExample(void *handle, service_reference_pt ref, void *service) { //do not edit, generated code
-	celix_status_t status = CELIX_SUCCESS; //do not edit, generated code
-	struct activator *activator = handle; //do not edit, generated code
-	log_service_pt loggerMany = service; //do not edit, generated code
-	example_addLoggerMany(activator->example, loggerMany); //do not edit, generated code
-	return status; //do not edit, generated code
-} //do not edit, generated code
-
-static celix_status_t bundleActivator_removeLoggerManyForExample(void *handle, service_reference_pt ref, void *service) { //do not edit, generated code
-	celix_status_t status = CELIX_SUCCESS; //do not edit, generated code
-	struct activator *activator = handle; //do not edit, generated code
-	log_service_pt loggerMany = service; //do not edit, generated code
-	example_remove_loggerMany(activator->example, loggerMany); //do not edit, generated code
-	return status; //do not edit, generated code
-} //do not edit, generated code
-
-//{{end}}

http://git-wip-us.apache.org/repos/asf/celix/blob/37010fbe/celix-bootstrap/celix/bootstrap/templates/bundle/component.c
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/bootstrap/templates/bundle/component.c b/celix-bootstrap/celix/bootstrap/templates/bundle/component.c
index 78ccdd2..b73cba7 100644
--- a/celix-bootstrap/celix/bootstrap/templates/bundle/component.c
+++ b/celix-bootstrap/celix/bootstrap/templates/bundle/component.c
@@ -1,9 +1,33 @@
+/**
+ *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.
+ */
+/*
+ * component.c
+ *
+ *  \date       Oct 29, 2015
+ *  \author     <a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ *  \copyright  Apache License, Version 2.0
+ */
 //{{
-//import yaml
+//import os, yaml
 //bundle = None 
-//component = None
 //with open(bundleFile) as input :
-//	bundle = yaml.load(input)
+//      bundle = yaml.load(input)
 //
 //if not 'components' in bundle or bundle['components'] is None:
 // 	bundle['components'] = []
@@ -11,180 +35,150 @@
 //	for comp in bundle['components'] : 
 //		if not 'serviceDependencies' in comp or comp['serviceDependencies'] is None:
 //			comp['serviceDependencies'] = []
-//		if not 'providedServices' in comp or comp['providedServices'] is None:
-//			comp['providedServices'] = []
+//              if not 'providedServices' in comp or comp['providedServices'] is None:
+//                      comp['providedServices'] = []
+//
 //
 //for comp in bundle['components'] :
-//	if comp['name'] == componentName :
-//		component = comp
-//		break
+//      if comp['name'] == componentName :
+//              component = comp
+//              break
 //}}
 //{{end}}
-
-
+#include <stdio.h>
 #include <stdlib.h>
+#include <unistd.h>
+#include <signal.h>
+
+#include "celix_threads.h"
 
-#include <pthread.h>
 
-//Component Struct
+//Includes for the services / components
 //{{
-//cog.outl("#include \"%s.h\"" % componentName);
-//cog.outl("")
-//cog.outl("struct %s {" % componentName)
-//for service in component['serviceDependencies'] : 
-//	if service['cardinality'] == "many" :
-//		cog.outl("\tarray_list_pt %sServices;" % (service['name']))	
-//		cog.outl("\tpthread_mutex_t mutexFor%sServices;" % service['name'].title());
-//	else :
-//		cog.outl("\t%s %s;" % (service['type'], service['name']))	
-//		cog.outl("\tpthread_mutex_t mutexFor%s;" % service['name'].title());
+//cog.outl("#include \"%s.h\"" % component['name'])
+//for service in component['providedServices'] :
+//      cog.outl("#include <%s>" % service['include'])
+//for service in component['serviceDependencies'] :
+//      cog.outl("#include <%s>" % os.path.split(service['include'])[1])
 //}}
-#include "example.h" //do not edit, generated code
-
-struct example { //do not edit, generated code
-	log_service_pt logger; //do not edit, generated code
-	pthread_mutex_t mutexForLogger; //do not edit, generated code
-	log_service_pt loggerOptional; //do not edit, generated code
-	pthread_mutex_t mutexForLoggerOptional; //do not edit, generated code
-	array_list_pt loggerManyServices; //do not edit, generated code
-	pthread_mutex_t mutexForLoggerManyServices; //do not edit, generated code
 //{{end}}
+
+
+//{{
+//cog.outl("struct %s_cmp_struct {" %(component['name']) )
+//for service in component['serviceDependencies'] :
+//      cog.outl("      %s %sServ;" %(service['type'], service['name']))
+//      cog.outl("      celix_thread_mutex_t %sMutex;" %(service['name']))
+//cog.outl("};");
+//}}
+struct example_cmp_struct {
+    phase1_t* phase1Serv;
+    celix_thread_mutex_t mutex;
 };
+//{{end}}
+
+
 
-//Create function
 //{{
-//cog.outl("celix_status_t %s_create(%s_pt *result) {" % (componentName, componentName))
-//cog.outl("\tcelix_status_t status = CELIX_SUCCESS;")
-//cog.outl("printf(\" %s_create called.\\n\");" % (componentName))
-//cog.outl("\t%s_pt component = calloc(1, sizeof(*component));" % componentName)
-//cog.outl("\tif (component != NULL) {")
+//cog.outl("%s_cmp_t *%s_create(void) {" %(component['name'], component['name']))
+//cog.outl("    %s_cmp_t *cmp = calloc(1, sizeof(*cmp));" %(component['name']))
+//cog.outl("    if (cmp != NULL) {")
 //for service in component['serviceDependencies'] :
-//	if service['cardinality'] == "many" :
-//		cog.outl("\t\tcomponent->%sServices = NULL;" % service['name'])
-//		cog.outl("\t\tstatus = arrayList_create(&component->%sServices);" % service['name'])
-//		cog.outl("\t\tpthread_mutex_init(&component->mutexFor%sServices, NULL);" % service['name'].title())
-//	else :
-//		cog.outl("\t\tcomponent->%s = NULL;" % service['name'])
-//		cog.outl("\t\tpthread_mutex_init(&component->mutexFor%s, NULL);" % service['name'].title())
+//      cog.outl("              celixThreadMutex_create(&cmp->%sMutex, NULL);" %(service['name']));
+//cog.outl("    }");
 //}}
-celix_status_t example_create(example_pt *result) { //do not edit, generated code
-	celix_status_t status = CELIX_SUCCESS; //do not edit, generated code
-	example_pt component = calloc(1, sizeof(*component)); //do not edit, generated code
-	if (component != NULL) { //do not edit, generated code
-		component->logger = NULL; //do not edit, generated code
-		pthread_mutex_init(&component->mutexForLogger, NULL); //do not edit, generated code
-		component->loggerOptional = NULL; //do not edit, generated code
-		pthread_mutex_init(&component->mutexForLoggerOptional, NULL); //do not edit, generated code
-		component->loggerManyServices = NULL; //do not edit, generated code
-		status = arrayList_create(&component->loggerManyServices); //do not edit, generated code
-		pthread_mutex_init(&component->mutexForLoggerManyServices, NULL); //do not edit, generated code
+example_cmp_t* example_create(void) {
+        example_cmp_t* cmp = calloc(1, sizeof(*cmp));
+        if (cmp != NULL) {
+                celixThreadMutex_create(&cmp->mutex, NULL);
+        }
 //{{end}}
-		(*result) = component;
-	} else {
-		status = CELIX_ENOMEM;
-	}	
-	return status;
+
+        return cmp;
 }
 
+//{{
+//cog.outl("int %s_init(%s_cmp_t* cmp) {" %(component['name'], component['name']) )
+//cog.outl("    printf(\"init %s\\n\");" %(component['name']) )
+//}}
+int example_init(example_cmp_t* cmp) {
+        printf("init example\n");
+//{{end}}
+        return 0;
+}
+
+//{{
+//cog.outl("int %s_start(%s_cmp_t* cmp) {" %(component['name'], component['name']) )
+//cog.outl("    printf(\"start %s\\n\");" %(component['name']) )
+//}}
+int example_init(example_cmp_t* cmp) {
+        printf("start example\n");
+//{{end}}
+        return 0;
+}
 
-//Destroy function
 //{{
-//cog.outl("celix_status_t %s_destroy(%s_pt component) {" % (componentName,componentName))
-//cog.outl("printf(\" %s_destroy called.\\n\");" % (componentName))
+//cog.outl("int %s_stop(%s_cmp_t* cmp) {" %(component['name'], component['name']) )
+//cog.outl("    printf(\"stop %s\\n\");" %(component['name']) )
 //}}
-celix_status_t example_destroy(example_pt component) { //do not edit, generated code
+int example_stop(example_cmp_t* cmp) {
+        printf("stop example\n");
 //{{end}}
-	celix_status_t status = CELIX_SUCCESS;
-	if (component != NULL) {
-		free(component);
-	} else {
-		status = CELIX_ILLEGAL_ARGUMENT;
-	}
-	return status;
+        return 0;
 }
 
-//Start function
 //{{
-//cog.outl("celix_status_t %s_start(%s_pt component) {" % (componentName,componentName))
-//cog.outl("printf(\" %s_start called.\\n\");" % (componentName))
+//cog.outl("int %s_deinit(%s_cmp_t* cmp) {" %(component['name'], component['name']) )
+//cog.outl("    printf(\"deinit %s\\n\");" %(component['name']) )
 //}}
-celix_status_t example_start(example_pt component) { //do not edit, generated code
+int example_deinit(example_cmp_t* cmp) {
+        printf("deinit example\n");
 //{{end}}
-	celix_status_t status = CELIX_SUCCESS;
-	return status;
+        return 0;
 }
 
-//Stop function
 //{{
-//cog.outl("celix_status_t %s_stop(%s_pt component) {" % (componentName,componentName))
-//cog.outl("printf(\" %s_stop called.\\n\");" % (componentName))
+//cog.outl("int %s_destroy(%s_cmp_t* cmp) {" %(component['name'], component['name']) )
+//cog.outl("    printf(\"destroy %s\\n\");" %(component['name']) )
 //}}
-celix_status_t example_stop(example_pt component) { //do not edit, generated code
+int example_destroy(example_cmp_t* cmp) {
+        printf("destroy example\n");
 //{{end}}
-	celix_status_t status = CELIX_SUCCESS;
-	return status;
+        free(cmp);
+        return 0;
 }
 
+
 //{{
 //for service in component['serviceDependencies'] :
-//	if service['cardinality'] == "many" :
-//		cog.outl("celix_status_t %s_add%s(%s_pt component, %s %s) {" % (componentName, service['name'].title(), componentName, service['type'], service['name'])) 
-//		cog.outl("\tcelix_status_t status = CELIX_SUCCESS;")
-//		cog.outl("printf(\" %s_add%s called.\\n\");" % (componentName, service['name'].title()))
-//		cog.outl("\tpthread_mutex_lock(&component->mutexFor%sServices);" % service['name'].title())
-//		cog.outl("\tarrayList_add(component->%sServices, %s);" % (service['name'], service['name']))
-//		cog.outl("\tpthread_mutex_unlock(&component->mutexFor%sServices);" % service['name'].title())
-//		cog.outl("\treturn status;")
-//		cog.outl("}")
-//		cog.outl("")
-//		cog.outl("celix_status_t %s_remove%s(%s_pt component, %s %s) {" % (componentName, service['name'].title(), componentName, service['type'], service['name'])) 
-//		cog.outl("\tcelix_status_t status = CELIX_SUCCESS;")
-//		cog.outl("\tpthread_mutex_lock(&component->mutexFor%sServices);" % service['name'].title())
-//		cog.outl("\tarrayList_removeElement(component->%sServices, %s);" % (service['name'], service['name']))
-//		cog.outl("\tpthread_mutex_unlock(&component->mutexFor%sServices);" % service['name'].title())
-//		cog.outl("\treturn status;")
-//		cog.outl("}")
-//	else :
-//		cog.outl("celix_status_t %s_set%s(%s_pt component, %s %s) {" % (componentName, service['name'].title(), componentName, service['type'], service['name'])) 
-//		cog.outl("\tcelix_status_t status = CELIX_SUCCESS;")
-//		cog.outl("printf(\" %s_set%s called.\\n\");" % (componentName, service['name'].title()))
-//		cog.outl("\tpthread_mutex_lock(&component->mutexFor%s);" % service['name'].title())
-//		cog.outl("\tcomponent->%s == %s;" % (service['name'], service['name']))
-//		cog.outl("\tpthread_mutex_unlock(&component->mutexFor%s);" % service['name'].title())
-//		cog.outl("\treturn status;")
-//		cog.outl("}")
-//		cog.outl("")	
+//      cog.outl("int %s_set%s(%s_cmp_t* cmp, %s srvc) {" %(component['name'], service['name'], component['name'], service['type']) )
+//      cog.outl("      printf(\"%s_set%s called!\\n\");" %(component['name'], service['name']) )
+//      cog.outl("      celixThreadMutex_lock(&cmp->%sMutex);" %(service['name']))
+//      cog.outl("      cmp->%sServ = srvc;" %(service['name']))
+//      cog.outl("      celixThreadMutex_unlock(&cmp->%sMutex);" %(service['name']))
+//      cog.outl("      return 0;")
+//      cog.outl("}")
 //}}
-celix_status_t example_setLogger(example_pt component, log_service_pt logger) { //do not edit, generated code
-	celix_status_t status = CELIX_SUCCESS; //do not edit, generated code
-	pthread_mutex_lock(&component->mutexFor:ogger); //do not edit, generated code
-	component->logger == logger; //do not edit, generated code
-	pthread_mutex_unlock(&component->mutexForLogger); //do not edit, generated code
-	return status; //do not edit, generated code
-} //do not edit, generated code
-
-celix_status_t example_setLoggerOptional(example_pt component, log_service_pt loggerOptional) { //do not edit, generated code
-	celix_status_t status = CELIX_SUCCESS; //do not edit, generated code
-	pthread_mutex_lock(&component->mutexForLoggerOptional); //do not edit, generated code
-	component->loggerOptional == loggerOptional; //do not edit, generated code
-	pthread_mutex_unlock(&component->mutexForLoggerOptional); //do not edit, generated code
-	return status; //do not edit, generated code
-} //do not edit, generated code
-
-celix_status_t example_addLoggerMany(example_pt component, log_service_pt loggerMany) { //do not edit, generated code
-	celix_status_t status = CELIX_SUCCESS; //do not edit, generated code
-	pthread_mutex_lock(&component->mutexFor:oggerManyServices); //do not edit, generated code
-	arrayList_add(component->loggerManyServices, loggerMany); //do not edit, generated code
-	pthread_mutex_unlock(&component->mutexForLoggerManyServices); //do not edit, generated code
-	return status; //do not edit, generated code
-} //do not edit, generated code
-
-celix_status_t example_removeLoggerMany(example_pt component, log_service_pt loggerMany) { //do not edit, generated code
-	celix_status_t status = CELIX_SUCCESS; //do not edit, generated code
-	pthread_mutex_lock(&component->mutexForLoggerManyServices); //do not edit, generated code
-	arrayList_removeElement(component->loggerManyServices, loggerMany); //do not edit, generated code
-	pthread_mutex_unlock(&component->mutexForLoggerManyServices); //do not edit, generated code
-	return status; //do not edit, generated code
-} //do not edit, generated code
+int example_setDependendService(example_cmp_t* cmp, void* service) {
+        celixThreadMutex_lock(&cmp->mutex);
+        cmp->phase1Serv = service;
+        celixThreadMutex_unlock(&cmp->mutex);
+        return 0;
+}
+//{{end}}
 
+
+//{{
+//for service in component['providedServices'] :
+//      cog.outl("int %s%s_callService(%s_cmp_t* cmp, void* data) {" %(component['name'], service['name'].title(), component['name']) )
+//      cog.outl("      printf(\"%s%s callService\\n\");" %(component['name'], service['name'].title() ))
+//      cog.outl("      return 0;")
+//      cog.outl("}")
+//}}
+   
+int example_callService(example_cmp_t* cmp, void* data) {
+        printf("callService called!!\n");
+        return 0;
+}
 //{{end}}
+

http://git-wip-us.apache.org/repos/asf/celix/blob/37010fbe/celix-bootstrap/celix/bootstrap/templates/bundle/component.h
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/bootstrap/templates/bundle/component.h b/celix-bootstrap/celix/bootstrap/templates/bundle/component.h
index 64972fd..ec43f81 100644
--- a/celix-bootstrap/celix/bootstrap/templates/bundle/component.h
+++ b/celix-bootstrap/celix/bootstrap/templates/bundle/component.h
@@ -1,9 +1,33 @@
+/**
+ *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.
+ */
+/*
+ * component.c
+ *
+ *  \date       Oct 29, 2015
+ *  \author     <a href="mailto:dev@celix.apache.org">Apache Celix Project Team</a>
+ *  \copyright  Apache License, Version 2.0
+ */
 //{{
-//import yaml
+//import os, yaml
 //bundle = None 
-//component = None
 //with open(bundleFile) as input :
-//	bundle = yaml.load(input)
+//      bundle = yaml.load(input)
 //
 //if not 'components' in bundle or bundle['components'] is None:
 // 	bundle['components'] = []
@@ -23,56 +47,36 @@
 //cog.outl("#define __%s_H_" % componentName.upper())
 //cog.outl("")
 //
-//if 'serviceDependencies' in comp and comp['serviceDependencies'] is not None:
-//	for service in component['serviceDependencies'] :
-//		cog.outl("#include <%s>" % service['include'])
-//	cog.outl("")
+//if 'serviceDependencies' in comp and component['serviceDependencies'] is not None:
+//      for service in component['serviceDependencies'] :
+//              cog.outl("#include <%s>" % os.path.split(service['include'])[1])
+//      cog.outl("")
 //
 //}}
 #ifndef __EXAMPLE_H_ //do not edit, generated code
 #define __EXAMPLE_H_ //do not edit, generated code
-
-#include <log_service/log_service.h> //do not edit, generated code
-#include <log_service/log_service.h> //do not edit, generated code
-#include <log_service/log_service.h> //do not edit, generated code
-
 //{{end}}
-
 #include <celix_errno.h>
-#include <array_list.h>
-
 //{{
-//cog.outl("typedef struct %s *%s_pt;" % (componentName, componentName))
-//cog.outl("")
-//cog.outl("celix_status_t %s_create(%s_pt *component);" % (componentName, componentName))
-//cog.outl("celix_status_t %s_start(%s_pt component);" % (componentName, componentName))
-//cog.outl("celix_status_t %s_stop(%s_pt component);" % (componentName, componentName))
-//cog.outl("celix_status_t %s_destroy(%s_pt component);" % (componentName, componentName))
-//
-//#TODO add remote of service dependencies
+//cog.outl("typedef struct %s_cmp_struct %s_cmp_t;" %(component['name'], component['name']))
+//cog.outl("%s_cmp_t *%s_create(void);" %(component['name'], component['name']))
+//cog.outl("int %s_init(%s_cmp_t *cmp);" %(component['name'], component['name']))
+//cog.outl("int %s_start(%s_cmp_t *cmp);" %(component['name'], component['name'])) 
+//cog.outl("int %s_stop(%s_cmp_t *cmp);" %(component['name'],component['name'])) 
+//cog.outl("int %s_deinit(%s_cmp_t *cmp);" %(component['name'],component['name'])) 
+//cog.outl("int %s_destroy(%s_cmp_t *cmp);" %(component['name'],component['name'])) 
 //}}
-typedef struct example *example_pt; //do not edit, generated code
-
-celix_status_t example_create(example_pt *component); //do not edit, generated code
-celix_status_t example_start(example_pt component); //do not edit, generated code
-celix_status_t example_stop(example_pt component); //do not edit, generated code
-celix_status_t example_destroy(example_pt component); //do not edit, generated code
 //{{end}}
-
 //{{
 //for service in component['serviceDependencies'] :
-//	if service['cardinality'] == "many" :
-//		cog.outl("celix_status_t %s_add%s(%s_pt component, %s %s);" % (componentName, service['name'].title(), componentName, service['type'], service['name']))
-//		cog.outl("celix_status_t %s_remove%s(%s_pt component, %s %s);" % (componentName, service['name'].title(), componentName, service['type'], service['name']))
-//	else :
-//		cog.outl("celix_status_t %s_set%s(%s_pt component, %s %s);" % (componentName, service['name'].title(), componentName, service['type'], service['name']))
+//      cog.outl("int %s_set%s(%s_cmp_t* cmp, %s srvc);" %(component['name'], service['name'], component['name'], service['type'] ) )
+//}}
+//{{end}}
+//{{
+//for service in component['providedServices'] :
+//      cog.outl("int %s%s_callService(%s_cmp_t* cmp, void* data);" %(component['name'], service['name'].title(), component['name']))
 //}}
-celix_status_t example_setLogger(example_pt component, log_service_pt logger); //do not edit, generated code
-celix_status_t example_setLoggerOptional(example_pt component, log_service_pt loggerOptional); //do not edit, generated code
-celix_status_t example_add:oggerMany(example_pt component, log_service_pt loggerMany); //do not edit, generated code
-celix_status_t example_removeLoggerMany(example_pt component, log_service_pt loggerMany); //do not edit, generated code
 //{{end}}
-
 //{{
 //cog.outl("#endif //__%s_H_" % componentName.upper())
 //}}

http://git-wip-us.apache.org/repos/asf/celix/blob/37010fbe/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
index f654771..2f80596 100644
--- a/celix-bootstrap/celix/bootstrap/templates/bundle/deploy.cmake
+++ b/celix-bootstrap/celix/bootstrap/templates/bundle/deploy.cmake
@@ -2,9 +2,10 @@
 #import yaml
 #bundle = None 
 #with open(bundleFile) as input :
-#	bundle = yaml.load(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'])

http://git-wip-us.apache.org/repos/asf/celix/blob/37010fbe/celix-bootstrap/celix/bootstrap/templates/bundle/service.h
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/bootstrap/templates/bundle/service.h b/celix-bootstrap/celix/bootstrap/templates/bundle/service.h
index a6b1fd8..7797fe8 100644
--- a/celix-bootstrap/celix/bootstrap/templates/bundle/service.h
+++ b/celix-bootstrap/celix/bootstrap/templates/bundle/service.h
@@ -31,9 +31,10 @@
 //TODO add needed includes
 
 //{{
-//cog.outl("#define %s_SERVICE_NAME \"%s_service\"" % (service['name'].upper(), service['service_name']))
+//cog.outl("#define %s_NAME \"%s_service\"" % (service['name'].upper(), service['service_name']))
+//cog.outl("#define %s_VERSION \"1.0.0.0\"" % (service['name'].upper()))
 //cog.outl("")
-//cog.outl("typedef struct %s_service* %s;" % (service['name'], service['type']))
+//cog.outl("typedef struct %s_service %s;" % (service['name'], service['type']))
 //cog.outl("")
 //cog.outl("struct %s_service {" % service['name'])
 //cog.outl("\tvoid *handle;")
@@ -42,10 +43,9 @@
 typedef struct benchmark_service *benchmark_service_pt;
 
 struct benchmark_service {
-	benchmark_handler_pt handler;
+        benchmark_handler_pt handler;
 //{{end}}}
-
-	//TODO add service methods
+        void (*callService)(void *handle, void* data);
 
 //{{
 //cog.outl("};")

http://git-wip-us.apache.org/repos/asf/celix/blob/37010fbe/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 b6f7958..6991e4a 100644
--- a/celix-bootstrap/celix/bootstrap/templates/project/CMakeLists.txt
+++ b/celix-bootstrap/celix/bootstrap/templates/project/CMakeLists.txt
@@ -17,7 +17,8 @@ project(myproject C) #do not edit, generated code
 #{{end}}
 
 #{{ 
-#	cog.outl("set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} \"%s/share/celix/cmake/modules\")" % project['celix_install_dir'])
+#       cog.outl("set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} \"%s/share/celix/cmake/modules\")" % project['celix_install_dir'])
+#       cog.outl("link_directories(\"%s/lib\")" % project['celix_install_dir'])
 #}}
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/usr/local/share/celix/cmake/modules") #do not edit, generated code
 #{{end}}

http://git-wip-us.apache.org/repos/asf/celix/blob/37010fbe/celix-bootstrap/celix/bootstrap/templates/project/deploy.cmake
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/bootstrap/templates/project/deploy.cmake b/celix-bootstrap/celix/bootstrap/templates/project/deploy.cmake
index 84c3ffb..6001f27 100644
--- a/celix-bootstrap/celix/bootstrap/templates/project/deploy.cmake
+++ b/celix-bootstrap/celix/bootstrap/templates/project/deploy.cmake
@@ -11,6 +11,7 @@
 #
 #cog.outl("deploy( \"%s\" BUNDLES" % project['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")
 #
@@ -19,8 +20,8 @@
 #	for foundFile in fnmatch.filter(filenames, 'bundle.yaml'):
 #		bundleFile = root + '/' + foundFile
 #		with open(bundleFile) as input :
-#			bundle = yaml.load(input)
-#			cog.outl("\t%s" % bundle['name'])
+#                       bundle = yaml.load(input)
+#                       cog.outl("\t%s" % bundle['name'])
 #
 #cog.outl(")");
 #}}


Mime
View raw message