celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject [24/50] [abbrv] celix git commit: CELIX-346: Removes bootstrap from develop. Bootstrap is not yet stable
Date Tue, 18 Oct 2016 19:26:26 GMT
CELIX-346: Removes bootstrap from develop. Bootstrap is not yet stable


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

Branch: refs/heads/release/celix-2.0.0
Commit: ae54519a852834d27aaa50eb79d746e8c6624824
Parents: ab63081
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Mon Oct 10 12:16:04 2016 +0200
Committer: Pepijn Noltes <pepijnnoltes@gmail.com>
Committed: Mon Oct 10 12:16:04 2016 +0200

----------------------------------------------------------------------
 celix-bootstrap/README.md                       |  64 -------
 celix-bootstrap/celix/__init__.py               |  17 --
 celix-bootstrap/celix/bootstrap/__init__.py     |  16 --
 celix-bootstrap/celix/bootstrap/__main__.py     |  22 ---
 .../celix/bootstrap/argument_parser.py          |  94 ----------
 celix-bootstrap/celix/bootstrap/celix_utils.py  | 155 ----------------
 celix-bootstrap/celix/bootstrap/generators.py   | 172 -----------------
 .../bootstrap/templates/bundle/CMakeLists.txt   |  96 ----------
 .../bootstrap/templates/bundle/bundle.yaml      |  91 ---------
 .../templates/bundle/bundle_activator.c         | 160 ----------------
 .../bootstrap/templates/bundle/component.c      | 184 -------------------
 .../bootstrap/templates/bundle/component.h      |  84 ---------
 .../celix/bootstrap/templates/bundle/service.h  |  76 --------
 .../bootstrap/templates/project/CMakeLists.txt  |  53 ------
 .../bootstrap/templates/project/deploy.cmake    |  44 -----
 .../bootstrap/templates/project/project.yaml    |  35 ----
 celix-bootstrap/scripts/celix-bootstrap         |  22 ---
 celix-bootstrap/setup.py                        |  48 -----
 .../getting_started/using_services_with_cxx.md  |   4 +-
 .../services_example_cxx/api/IAnotherExample.h  |   1 +
 20 files changed, 3 insertions(+), 1435 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/ae54519a/celix-bootstrap/README.md
----------------------------------------------------------------------
diff --git a/celix-bootstrap/README.md b/celix-bootstrap/README.md
deleted file mode 100644
index 0bc5553..0000000
--- a/celix-bootstrap/README.md
+++ /dev/null
@@ -1,64 +0,0 @@
-# celix-bootstrap
-A (python based) code generation tool for [Apache Celix](https://celix.apache.org/) projects and bundles.
-
-##Installation
-
-###Option 1 (install with distutils)
-
-* Install PyYAML: `pip install pyyaml`
-* Download Cog from https://pypi.python.org/pypi/cogapp
-* Unpack and run `python setup.py install' in the cogapp directory
-* Clone this repository
-* Run `python setup.py install` in the celix-bootstrap directory
-
-###Option 2 (configure with alias)
-
-* Install PyYAML: `pip install pyyaml`
-* Download Cog from https://pypi.python.org/pypi/cogapp
-* Unpack it in a convenient directory 
-* Clone this repository
-* Create a celix-bootstrap alias:
-```
-alias celix-bootstrap='PYTHONPATH=${cog_dir}:${celix-boostrap_dir} python -m celix.bootstrap'
-```
-
-#Concept
-The idea behind celix-boostrap is to enable users of Apache Celix to very fast setup of Apache Celix bundle projects. And after that to be able to generate and update the initial bundle code based on some declaritive attributes.
-
-celix-boostrap is build on top of [Cog](https://celix.apache.org/). "Cog is a file generation tool. It lets you use pieces of Python code as generators in your source files to generate whatever text you need." 
-
-The code generation code is added in the comments of the source code (in this case C or CMake syntax). This enables a
-source files which contains manual code and generated code to coexists and to able to rerun code generation after manual editing source files.
-
-Is good to known that you should not edit anything between the following comments.
-```
-{{
-{{end}}
-```
-
-#Usage
-
-You can setup a new Apache Celix project by executing following steps:
-* Choose a project directory and cd to it
-* Run `celix-bootstrap create_project .`
-* Edit the project.yaml file and ensure that the celix_install_dir points to the directory where Apache Celix is installed
-* Run `celix-bootstrap update .` to generate the needed files
-* (Optional) Update the project.yaml file and run `celix-bootstrap update .` again to update the generated files
-* (Optional) Run `celix-bootstrap update . -e` to update the project source files one more time and remove the code generation parts
-
-You can create a new bundle by executing the following steps:
-* cd to the project directory
-* Run `celix-bootstrap create_bundle mybundle`
-* Edit the `mybundle/bundle.yaml` file to declare which components you like to create and what services those components depends on and/or provide
-* Run `celix-bootstrap update mybundle` to generate the neccesary files
-* Run `celix-bootstrap update .` to include the new bundle into the CMakeLists.txt 
-* Add code to the component and when providing service also add the necesarry code to the bundle activator
-* (Optional) Run `celix-bootstrap update . -e` to update the bundle source files one more time and remove the code generation parts
-
-You can build your whole project with the following step:
-* cd to the project directory
-* Run `celix-bootstrap build buildDirectory` to build and the deploy the code within the buildDirectory
-* In case the build was successful, you'll find several deployed configuration at buildDirectory/deploy
-
-Additional Info
-* You can use the -t argument to use a different set of template (project & bundle) files. The original template files can be found at ${celix-bootstrap_dir}/templates

http://git-wip-us.apache.org/repos/asf/celix/blob/ae54519a/celix-bootstrap/celix/__init__.py
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/__init__.py b/celix-bootstrap/celix/__init__.py
deleted file mode 100644
index 00ae6c0..0000000
--- a/celix-bootstrap/celix/__init__.py
+++ /dev/null
@@ -1,17 +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.
-

http://git-wip-us.apache.org/repos/asf/celix/blob/ae54519a/celix-bootstrap/celix/bootstrap/__init__.py
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/bootstrap/__init__.py b/celix-bootstrap/celix/bootstrap/__init__.py
deleted file mode 100644
index 978b68a..0000000
--- a/celix-bootstrap/celix/bootstrap/__init__.py
+++ /dev/null
@@ -1,16 +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.

http://git-wip-us.apache.org/repos/asf/celix/blob/ae54519a/celix-bootstrap/celix/bootstrap/__main__.py
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/bootstrap/__main__.py b/celix-bootstrap/celix/bootstrap/__main__.py
deleted file mode 100644
index d43e983..0000000
--- a/celix-bootstrap/celix/bootstrap/__main__.py
+++ /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.
-#
-#!/usr/bin/env python
-
-from . import argument_parser
-
-argument_parser.main()

http://git-wip-us.apache.org/repos/asf/celix/blob/ae54519a/celix-bootstrap/celix/bootstrap/argument_parser.py
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/bootstrap/argument_parser.py b/celix-bootstrap/celix/bootstrap/argument_parser.py
deleted file mode 100644
index be7f5dc..0000000
--- a/celix-bootstrap/celix/bootstrap/argument_parser.py
+++ /dev/null
@@ -1,94 +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.
-
-#!/usr/bin/env python
-import os
-import argparse
-from . import generators
-import subprocess
-
-def main() :
-	parser = argparse.ArgumentParser("celix-bootstrap")
-
-	CREATE_PROJECT_COMMAND = "create_project"	
-	CREATE_BUNDLE_COMMAND = "create_bundle"
-
-	UPDATE_COMMAND = "update"
-	BUILD_COMMAND = "build"
-
-	#positional
-	parser.add_argument("command", help="The command to execute", choices=(CREATE_PROJECT_COMMAND, CREATE_BUNDLE_COMMAND, UPDATE_COMMAND, BUILD_COMMAND))
-	parser.add_argument("directory", help="The directory to work on")
-
-	#optional
-	parser.add_argument("-e", "--erase", help="erase cog code when updating", action="store_true")
-	parser.add_argument("-t", "--template_dir", help="define which template directory to use. Default is '%s/templates'" % os.path.dirname(__file__), action="store")
-
-	args = parser.parse_args()
-	
-	gm = GeneratorMediator(args.directory, args.erase, args.template_dir)
-
-	if args.command == CREATE_BUNDLE_COMMAND :
-		gm.createBundle()
-	elif args.command == CREATE_PROJECT_COMMAND :
-		gm.createProject()
-	elif args.command == UPDATE_COMMAND :
-		gm.update()
-	elif args.command == BUILD_COMMAND :
-		gm.build()
-	else :
-		sys.exit()
-
-
-class GeneratorMediator :
-	
-	gendir = None
-	bundleGenerator = None
-	projectGenerator = None
-	
-	def __init__(self, gendir, erase, template_dir) :		
-		self.gendir = gendir
-		self.bundleGenerator = generators.Bundle(gendir, erase, template_dir)
-		self.projectGenerator = generators.Project(gendir, erase, template_dir)
-
-	def createBundle(self) :
-		self.bundleGenerator.create()
-	
-	def createProject(self) :
-		self.projectGenerator.create()	
-	
-
-	def update(self) :
-		if os.path.isfile(os.path.join(self.gendir, "bundle.yaml")) :
-			print("Generating/updating bundle code")
-			self.bundleGenerator.update()
-		if os.path.isfile(os.path.join(self.gendir, "project.yaml")) :
-			print("Generating/updating project code")
-			self.projectGenerator.update()
-
-	def build(self) :
-		if not os.path.exists(self.gendir):
-			print("Creating Directory " + self.gendir)
-			os.makedirs(self.gendir)
-
-		cmake = subprocess.Popen(["cmake", os.getcwd()], cwd=self.gendir, stderr=subprocess.STDOUT)
-		if cmake.wait() != 0:
-			print("Cmake run failed. Do you perform to need an update run first?")
-		else:
-			make = subprocess.Popen(["make", "all", "deploy"], cwd=self.gendir, stderr=subprocess.STDOUT)
-			if make.wait() != 0:
-				print("Compilation failed. Please check your code")

http://git-wip-us.apache.org/repos/asf/celix/blob/ae54519a/celix-bootstrap/celix/bootstrap/celix_utils.py
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/bootstrap/celix_utils.py b/celix-bootstrap/celix/bootstrap/celix_utils.py
deleted file mode 100644
index 167b955..0000000
--- a/celix-bootstrap/celix/bootstrap/celix_utils.py
+++ /dev/null
@@ -1,155 +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.
-
-import cmd
-import glob
-import os.path
-import re
-import readline
-import sys
-
-class PathCompleter(object):
-
-    def __init__(self, suffix=None):
-        self.suffix=suffix
-
-    def _listdir(self, root=''):
-        res = []
-        for name in glob.glob(root + '*'): 
-            path = os.path.join(root, name)
-            if os.path.isdir(path):
-                name += os.sep
-            	res.append(name)
-	    else:
-		if self.suffix is None:
-            		res.append(name)
-		elif name.endswith(self.suffix):
-            		res.append(name)
-
-        return res
-
-    def complete(self, text, state):
-        buffer = readline.get_line_buffer()
-        return self._listdir(buffer.strip())[state]
-
-
-class FileContentCompleter(object):
-    def __init__(self, filename, keywords=[]):
-        self._indexFile(filename, keywords)
-
-    def _indexFile(self, filename, keywords=[], delimiter_chars=":;#,.!?{}*)(=\\\"/"):
-        try:
-	    txt_fil = open(filename, "r")
-	    self.found_words = []
-
-            for line in txt_fil:
-		# ignore commented lines
-		if not (line.strip()).startswith(("/*", "*", "//")):
-                    words = line.split()
-                    words2 = [ word.strip(delimiter_chars) for word in words ]
-
-                    for word in words2:
-                        if not word in self.found_words and not word in keywords and not word.isdigit() and not any(i in word for i in delimiter_chars):
-                            self.found_words.append(word)
-
-            txt_fil.close()
-        except IOError as ioe:
-             sys.stderr.write("Caught IOError: " + repr(ioe) + "\n")
-        except Exception as e:
-             sys.stderr.write("Caught Exception: " + repr(e) + "\n")
-
-    def checkWord(self, word):
-        if word in self.found_words:
-		return True
-	else:
-		return False
-
-    def complete(self, text, state):
-        buffr = readline.get_line_buffer()
-	wordlist = [w for w in self.found_words if w.startswith(buffr)]
-
-        return wordlist[state]
-
-def checkInput(msg, regex='', default=''):
-	while True:
-		msgDefault = msg + ' [' + default + ']: ' if default is not '' else msg + ': '
- 		inpt = raw_input(msgDefault).strip() or default
-		
-		if regex is not '':
-			res = re.match(regex, inpt);
-			if res is not None and inpt == res.group():
-				return inpt
-			else:
-				print('Invalid Input.')
-		else:
-			return inpt
-
-def yn(msg, default = 'y'):
-	while True:
-		addComponent = raw_input("%s [%s]:" % (msg, default)) or default
-      		if addComponent.lower() in ('y', 'yes', 'n', 'no'):
-			return addComponent.lower() in ('y', 'yes')
-		else:
-			print("Invalid Input.")
-
-
-def checkCelixInstallation():
-	while True:
-		comp = PathCompleter()
-		# we want to treat '/' as part of a word, so override the delimiters
-		readline.set_completer_delims(' \t\n;')
-		readline.parse_and_bind("tab: complete")
-		readline.set_completer(comp.complete)
-
- 		installDir = checkInput('Please enter celix installation location', '(?:/[^/]+)*$', '/usr/local')
-
-		if os.path.exists(installDir + '/bin/celix'):
-			return installDir
-		else:
-			print('celix launcher could not be found at ' + installDir + '/bin/celix')
-
-
-
-def checkInclude(msg, regex):
-	comp = PathCompleter(".h")
-	# we want to treat '/' as part of a word, so override the delimiters
-	readline.set_completer_delims(' \t\n;')
-	readline.parse_and_bind("tab: complete")
-	readline.set_completer(comp.complete)
-
-	headerFile = checkInput(msg, regex)
-
-	return headerFile
-
-def checkIncludeContent(msg, filename):
-	keywords = ["auto","break","case","char","const","continue","define", "default","do","double","else","endif", "enum","extern","float","for","goto","if","ifndef", "include", "inline","int","long","register","restrict","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while", "celix_status_t"];
-
-	comp = None	
-
-	if os.path.exists(filename):
-		comp = FileContentCompleter(filename, keywords)
-		readline.set_completer_delims(' \t\n;')
-		readline.parse_and_bind("tab: complete")
-		readline.set_completer(comp.complete)
-
-	inpt = checkInput(msg, '[^\s]+');
-
-	if comp is not None:
-		while(comp.checkWord(inpt) == False and yn('\''+ inpt + '\'  was not found in the given include file. Do you really want to use it?', 'n') == False):
-			inpt = checkInput(msg, '[^\s]+');
-
-	return inpt

http://git-wip-us.apache.org/repos/asf/celix/blob/ae54519a/celix-bootstrap/celix/bootstrap/generators.py
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/bootstrap/generators.py b/celix-bootstrap/celix/bootstrap/generators.py
deleted file mode 100644
index 1bf3058..0000000
--- a/celix-bootstrap/celix/bootstrap/generators.py
+++ /dev/null
@@ -1,172 +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.
-
-import shutil
-import os
-import sys
-import yaml
-import cogapp
-
-class BaseGenerator(object):
-	gendir = None
-	descriptor = None
-	erase_cog = False
-	template_dir = None
-	profile= None
-	gen_code_suffix = "do not edit, generated code"
-	markers="{{ }} {{end}}"
-
-	def __init__(self, gendir, profile, erase, template_dir) :
-		self.gendir = gendir
-		self.descriptor = "%s/%s.yaml" % (gendir, profile)
-		self.template_dir = os.path.join(os.getcwd(), os.path.dirname(__file__), "templates")
-		self.profile = profile
-		self.erase_cog = erase
-		if template_dir is not None :
-			self.template_dir = template_dir
-
-	def set_erase_cog(self, erase) :
-		self.erase_cog = erase
-
-	def set_template_dir(self, tdir) :
-		self.template_dir = tdir
-
-	def set_gen_cod_suffic(self, suffix) :
-		self.gen_code_suffic = suffix
-
-	def set_cog_markers(markers) :
-		self.markers = markers
-		
-	def create(self) :
-		if os.path.exists(self.descriptor) :
-			print("%s Already exists. Will not override existing %s.yaml" % (self.descriptor, self.profile))
-		else :
-			if not os.path.exists(self.gendir) :
-				os.makedirs(self.gendir)
-			shutil.copyfile(os.path.join(self.template_dir, self.profile, "%s.yaml" % self.profile), self.descriptor)
-			
-			print("Edit the %s file and run 'celix-bootstrap update %s' to generate the source files" % (self.descriptor, self.gendir))
-
-	def read_descriptor(self) :
-		if os.path.isdir(self.gendir) and os.path.exists(self.descriptor) :
-			with open(self.descriptor) as inputFile :
-				try :
-					return yaml.load(inputFile)
-				except ValueError as e:
-					print("ERROR: %s is not a valid yaml file: %s" % (self.descriptor, e))
-					sys.exit(1)
-
-	def update_file(self, template, targetFile, options=[], commentsPrefix="//") :
-		print("Creating file %s %s" % (self.gendir, targetFile))
-		cog_file = os.path.join(self.gendir, targetFile)
-#		cog_file = os.path.join('.', targetFile)
-		if not os.path.exists(cog_file) :
-			print("Creating file %s" % cog_file)
-			if not os.path.exists(os.path.dirname(cog_file)) :
-				os.makedirs(os.path.dirname(cog_file))
-			template_abs = os.path.join(self.template_dir, self.profile,  template)
-			shutil.copyfile(template_abs, cog_file)
-	
-		backup_cog_file = "%s/.cog/%s" % (self.gendir, targetFile)
-		if self.erase_cog :
-			if os.path.exists(backup_cog_file) :
-				print("Will not erase cog code, backup file (%s) for source already exists." % backup_cog_file)
-				sys.exit(1)
-			else :
-				if not os.path.exists(os.path.dirname(backup_cog_file)) :
-					os.makedirs(os.path.dirname(backup_cog_file))
-				shutil.copy(cog_file, backup_cog_file)
-		
-		cog = cogapp.Cog()
-		cog_options = ["cog", "--markers=%s" % self.markers] + options 
-		if self.erase_cog :
-			cog_options += ["-d", "-o", cog_file, backup_cog_file]
-		else :
-			cog_options += ["-r", "-e" ]
-			if commentsPrefix is not None: 
-				cog_options += [ "-s", " %s%s" %(commentsPrefix, self.gen_code_suffix)]
-			cog_options += [cog_file]
-
-		cog.main(cog_options)
-	
-
-class Bundle(BaseGenerator):
-
-	def __init__(self, gendir, erase, template_dir) :
-		BaseGenerator.__init__(self, gendir, "bundle", erase, template_dir)
-		#python3 super(Bundle, self).__init__(gendir, "bundle")
-
-	def update_cmakelists(self) :
-		options = ["-D", "bundleFile=%s" % self.descriptor]
-		self.update_file("CMakeLists.txt", "CMakeLists.txt", options, "#")	
-		
-	def update_activator(self) :
-		options = ["-D", "bundleFile=%s" % self.descriptor]
-		self.update_file("bundle_activator.c", "private/src/bundle_activator.c", options)
-
-	def update_component_header(self, componentName) :
-		genfile = "private/include/%s.h" % componentName
-		options = ["-D", "bundleFile=%s" % self.descriptor, "-D", "componentName=%s" % componentName]
-		self.update_file("component.h", genfile, options)
-
-	def update_component_source(self, componentName) :
-		genfile = "private/src/%s.c" % componentName
-		options = ["-D", "bundleFile=%s" % self.descriptor, "-D", "componentName=%s" % componentName]
-		self.update_file("component.c", genfile, options)
-
-	def update_service_header(self, componentName, service) :
-		genfile = "public/include/%s" % service['include']
-		options = ["-D", "bundleFile=%s" % self.descriptor,  "-D", "componentName=%s" % componentName, "-D", "serviceName=%s" % service['name']]
-		self.update_file("service.h", genfile, 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) :
-		bd = self.read_descriptor()
-		if bd is None :
-			print("%s does not exist or does not contain a bundle.yaml file" % self.gendir)
-		else :
-			self.update_cmakelists()	
-			self.update_activator()
-			if 'components' in bd and bd['components'] is not None:
-				for comp in bd['components'] :
-					self.update_component_header(comp['name'])
-					self.update_component_source(comp['name'])
-					if 'providedServices' in comp and comp['providedServices'] is not None:
-						for service in comp['providedServices']:
-							self.update_service_header(comp['name'], service)
-
-class Project(BaseGenerator):
-
-	def __init__(self, gendir, erase, template_dir) :
-		BaseGenerator.__init__(self, gendir, "project", erase, template_dir)
-		#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, "#")      
-
-        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()        

http://git-wip-us.apache.org/repos/asf/celix/blob/ae54519a/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
deleted file mode 100644
index 8e8e607..0000000
--- a/celix-bootstrap/celix/bootstrap/templates/bundle/CMakeLists.txt
+++ /dev/null
@@ -1,96 +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.
-
-#{{
-#import os, yaml
-#bundle = None 
-#with open(bundleFile) as input :
-#	bundle = yaml.load(input)
-#
-#if not 'components' in bundle or bundle['components'] is None:
-# 	bundle['components'] = []
-#else:
-#	for comp in bundle['components'] : 
-#		if not 'serviceDependencies' in comp or comp['serviceDependencies'] is None:
-#			comp['serviceDependencies'] = []
-#
-#}}
-#{{end}}
-
-include_directories(
-        ${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.abspath(os.path.dirname(service['include']))) 
-#}}
-"org.example.mybundle" #do not edit, generated code
-#{{end}}
-
-)
-
-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\"")
-#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'])
-#}}
-mybundle SOURCES #do not edit, generated code
-	private/src/bundle_activator #do not edit, generated code
-	private/src/example #do not edit, generated code
-#{{end}}
-)
-
-
-#{{ 
-#cog.outl("SET(BUNDLE_LIB \"%s\")" % bundle['name']) 
-#}}
-SET(BUNDLE_LIB "mybundle") #do not edit, generated code
-#{{end}}
-
-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()
-
-#{{
-#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/ae54519a/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
deleted file mode 100644
index 797795f..0000000
--- a/celix-bootstrap/celix/bootstrap/templates/bundle/bundle.yaml
+++ /dev/null
@@ -1,91 +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.
-
-
-
-
-
-#{{
-#from celix.bootstrap.celix_utils import *
-#}}
-#{{end}}
-
-
-#{{ 
-# name = checkInput('\nPlease enter bundleName', '([a-zA-Z_][a-zA-Z0-9_]*)', 'mybundle')
-# cog.out('name : \'%s\'' % name )
-#}}
-name: 'mybundle'
-#{{end}}
-
-#{{
-# symName = checkInput('\nPlease enter symbolicName', '([a-zA-Z_][a-zA-Z0-9_.]*)', 'org.example.mybundle') 
-# cog.out('symbolicName: \'%s\'' % symName )
-#}}
-symbolicName: 'org.example.mybundle'
-#{{end}}
-
-components: 
-    #{{
-    #
-    #while yn('Do you want to add ' + ('a' if 'componentName' not in vars() else 'another') + ' component?'):
-    #		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 ''))); 
-    #			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_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); 
-    #			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_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/ae54519a/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
deleted file mode 100644
index 025eed4..0000000
--- a/celix-bootstrap/celix/bootstrap/templates/bundle/bundle_activator.c
+++ /dev/null
@@ -1,160 +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.
- */
-//{{
-//import os, yaml
-//bundle = None 
-//with open(bundleFile) as input :
-//	bundle = yaml.load(input)
-//
-//if not 'components' in bundle or bundle['components'] is None:
-// 	bundle['components'] = []
-//else:
-//	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'] = []
-//}}
-//{{end}}
-#include <stdlib.h>
-#include <pthread.h>
-
-#include <constants.h>
-#include <bundle_context.h>
-#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'] : 
-//	cog.outl("#include \"%s.h\"" % comp['name'])
-//	for service in comp['providedServices'] :
-//		cog.outl("#include <%s>" % service['include'])
-//	for service in comp['serviceDependencies'] :
-//		cog.outl("#include <%s>" % os.path.split(service['include'])[1])
-//}}
-//{{end}}
-
-//{{
-//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("};");
-//}}
-struct example_activator_struct {
-        example_cmp_t* exampleCmp;
-        example_t exampleServ;  
-};
-//{{end}}
-
-
-celix_status_t dm_create(bundle_context_pt context, void **userData) {
-//{{
-//cog.outl("    printf(\"%s: dm_create\\n\");" %(bundle['name']) )
-//cog.outl("    *userData = calloc(1, sizeof(struct %s_activator_struct));" %(bundle['name']) )
-//}}
-        *userData = calloc(1, sizeof(struct example_activator_struct));
-        printf("example: dm_create\n");
-//{{end}}
-        return *userData != NULL ? CELIX_SUCCESS : CELIX_ENOMEM;
-}
-
-celix_status_t dm_init(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
-        celix_status_t status = CELIX_SUCCESS;
-//{{
-//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['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("      }")
-//}}
-        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);
-        }
-
-//{{end}}
-    return status;
-}
-
-
-celix_status_t dm_destroy(void * userData, bundle_context_pt context, dm_dependency_manager_pt manager) {
-//{{
-//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);")
-//}}
-        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;
-}
-

http://git-wip-us.apache.org/repos/asf/celix/blob/ae54519a/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
deleted file mode 100644
index b73cba7..0000000
--- a/celix-bootstrap/celix/bootstrap/templates/bundle/component.c
+++ /dev/null
@@ -1,184 +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.
- */
-/*
- * 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 os, yaml
-//bundle = None 
-//with open(bundleFile) as input :
-//      bundle = yaml.load(input)
-//
-//if not 'components' in bundle or bundle['components'] is None:
-// 	bundle['components'] = []
-//else:
-//	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'] = []
-//
-//
-//for comp in bundle['components'] :
-//      if comp['name'] == componentName :
-//              component = comp
-//              break
-//}}
-//{{end}}
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <signal.h>
-
-#include "celix_threads.h"
-
-
-//Includes for the services / components
-//{{
-//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])
-//}}
-//{{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}}
-
-
-
-//{{
-//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'] :
-//      cog.outl("              celixThreadMutex_create(&cmp->%sMutex, NULL);" %(service['name']));
-//cog.outl("    }");
-//}}
-example_cmp_t* example_create(void) {
-        example_cmp_t* cmp = calloc(1, sizeof(*cmp));
-        if (cmp != NULL) {
-                celixThreadMutex_create(&cmp->mutex, NULL);
-        }
-//{{end}}
-
-        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;
-}
-
-//{{
-//cog.outl("int %s_stop(%s_cmp_t* cmp) {" %(component['name'], component['name']) )
-//cog.outl("    printf(\"stop %s\\n\");" %(component['name']) )
-//}}
-int example_stop(example_cmp_t* cmp) {
-        printf("stop example\n");
-//{{end}}
-        return 0;
-}
-
-//{{
-//cog.outl("int %s_deinit(%s_cmp_t* cmp) {" %(component['name'], component['name']) )
-//cog.outl("    printf(\"deinit %s\\n\");" %(component['name']) )
-//}}
-int example_deinit(example_cmp_t* cmp) {
-        printf("deinit example\n");
-//{{end}}
-        return 0;
-}
-
-//{{
-//cog.outl("int %s_destroy(%s_cmp_t* cmp) {" %(component['name'], component['name']) )
-//cog.outl("    printf(\"destroy %s\\n\");" %(component['name']) )
-//}}
-int example_destroy(example_cmp_t* cmp) {
-        printf("destroy example\n");
-//{{end}}
-        free(cmp);
-        return 0;
-}
-
-
-//{{
-//for service in component['serviceDependencies'] :
-//      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("}")
-//}}
-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/ae54519a/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
deleted file mode 100644
index ec43f81..0000000
--- a/celix-bootstrap/celix/bootstrap/templates/bundle/component.h
+++ /dev/null
@@ -1,84 +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.
- */
-/*
- * 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 os, yaml
-//bundle = None 
-//with open(bundleFile) as input :
-//      bundle = yaml.load(input)
-//
-//if not 'components' in bundle or bundle['components'] is None:
-// 	bundle['components'] = []
-//else:
-//	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'] = []
-//
-//for comp in bundle['components'] :
-//	if comp['name'] == componentName :
-//		component = comp
-//		break
-//
-//cog.outl("#ifndef __%s_H_" % componentName.upper())
-//cog.outl("#define __%s_H_" % componentName.upper())
-//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
-//{{end}}
-#include <celix_errno.h>
-//{{
-//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'])) 
-//}}
-//{{end}}
-//{{
-//for service in component['serviceDependencies'] :
-//      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']))
-//}}
-//{{end}}
-//{{
-//cog.outl("#endif //__%s_H_" % componentName.upper())
-//}}
-#endif //__EXAMPLE_H_ //do not edit, generated code
-//{{end}}

http://git-wip-us.apache.org/repos/asf/celix/blob/ae54519a/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
deleted file mode 100644
index 2491350..0000000
--- a/celix-bootstrap/celix/bootstrap/templates/bundle/service.h
+++ /dev/null
@@ -1,76 +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.
- */
-//{{
-//import yaml
-//bundle = None
-//with open(bundleFile) as input :
-//	bundle = yaml.load(input)
-//if not 'components' in bundle or bundle['components'] is None:
-// 	bundle['components'] = []
-//else:
-//	for comp in bundle['components'] : 
-//		if not 'providedServices' in comp or comp['providedServices'] is None:
-//			comp['providedServices'] = []
-//
-//for comp in bundle['components'] :
-//	if comp['name'] == componentName :
-//		component = comp
-//
-//		for serv in comp['providedServices'] :
-//			if serv['name'] == serviceName :
-//				service = serv
-//				break
-//
-//cog.outl("#ifndef __%s_H_" % service['name'].upper())
-//cog.outl("#define __%s_H_" % service['name'].upper())
-//cog.outl("")
-//
-//}}
-#ifndef __EXAMPLE_H_ //do not edit, generated code
-#define __EXAMPLE_H_ //do not edit, generated code
-//{{end}}
-
-//TODO add needed includes
-
-//{{
-//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("")
-//cog.outl("struct %s_service {" % service['name'])
-//cog.outl("\tvoid *handle;")
-//}}
-#define BENCHMARK_SERVICE_NAME "benchmark_service"
-typedef struct benchmark_service *benchmark_service_pt;
-
-struct benchmark_service {
-        benchmark_handler_pt handler;
-//{{end}}}
-        void (*callService)(void *handle, void* data);
-
-//{{
-//cog.outl("};")
-//cog.outl("")
-//cog.outl("")
-//cog.outl("#endif /* __%s_H_ */" % service['name'])
-//}}
-};
-#endif /* BENCHMARK_SERVICE_H_ */
-//{{end}}

http://git-wip-us.apache.org/repos/asf/celix/blob/ae54519a/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
deleted file mode 100644
index 639b7ec..0000000
--- a/celix-bootstrap/celix/bootstrap/templates/project/CMakeLists.txt
+++ /dev/null
@@ -1,53 +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.
-#{{
-#import fnmatch
-#import os
-#import yaml
-#project = None 
-#with open(projectFile) as input :
-#	project = yaml.load(input)
-#}}
-#{{end}}
-
-cmake_minimum_required(VERSION 2.8)
-
-#{{
-#	cog.outl("project(%s C)" % project['name'])
-#}}
-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("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}}
-
-find_package(CELIX REQUIRED)
-include_directories(${CELIX_INCLUDE_DIRS})
-
-
-#{{
-#for root, dirs, filenames in os.walk('.'):
-#	for foundFile in fnmatch.filter(filenames, 'bundle.yaml'):
-#		cog.outl("add_subdirectory(%s)" % root)
-#}}
-#
-#{{end}}
-

http://git-wip-us.apache.org/repos/asf/celix/blob/ae54519a/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
deleted file mode 100644
index b2d49c5..0000000
--- a/celix-bootstrap/celix/bootstrap/templates/project/deploy.cmake
+++ /dev/null
@@ -1,44 +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.
-#{{
-#import fnmatch
-#import os
-#import yaml
-#
-#project = None 
-#bundle = None 
-#
-#with open(projectFile) as input :
-#	project = yaml.load(input)
-#
-#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")
-#
-#
-#for root, dirs, filenames in os.walk('.'):
-#	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'])
-#
-#cog.outl(")");
-#}}
-#{{end}}

http://git-wip-us.apache.org/repos/asf/celix/blob/ae54519a/celix-bootstrap/celix/bootstrap/templates/project/project.yaml
----------------------------------------------------------------------
diff --git a/celix-bootstrap/celix/bootstrap/templates/project/project.yaml b/celix-bootstrap/celix/bootstrap/templates/project/project.yaml
deleted file mode 100644
index c3969ea..0000000
--- a/celix-bootstrap/celix/bootstrap/templates/project/project.yaml
+++ /dev/null
@@ -1,35 +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.
-#{{
-#from celix.bootstrap.celix_utils import *
-#}}
-#{{end}}
-
-
-# {{ 
-# name = checkInput('\nPlease enter projectname', '([a-zA-Z_][a-zA-Z0-9_]*)', 'myproject')
-# cog.outl('name: \"%s\"' % name )
-# }}
-name: "myproject"
-# {{end}}
-
-# {{  
-# install = checkCelixInstallation()
-# cog.outl('celix_install_dir: \"%s\"' % install ) 
-# }}
-celix_install_dir: "/usr/local"
-# {{end}}

http://git-wip-us.apache.org/repos/asf/celix/blob/ae54519a/celix-bootstrap/scripts/celix-bootstrap
----------------------------------------------------------------------
diff --git a/celix-bootstrap/scripts/celix-bootstrap b/celix-bootstrap/scripts/celix-bootstrap
deleted file mode 100755
index 6720cdd..0000000
--- a/celix-bootstrap/scripts/celix-bootstrap
+++ /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.
-
-#!/usr/bin/env python
-
-import celix.bootstrap.argument_parser
-
-celix.bootstrap.argument_parser.main()

http://git-wip-us.apache.org/repos/asf/celix/blob/ae54519a/celix-bootstrap/setup.py
----------------------------------------------------------------------
diff --git a/celix-bootstrap/setup.py b/celix-bootstrap/setup.py
deleted file mode 100644
index 3952f05..0000000
--- a/celix-bootstrap/setup.py
+++ /dev/null
@@ -1,48 +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.
-#!/usr/bin/python
-
-""" Setup.py for Cog
-    http://nedbatchelder.com/code/cog
-
-    Copyright 2004-2015, Ned Batchelder.
-"""
-
-from distutils.core import setup
-
-setup(
-    name = 'celix-bootstrap',    
-    version = '0.1.0',
-    url = '',
-    author = '',
-    author_email = '',
-    description =
-        'celix-bootstrap: A code generator / project generator for Apache Celix.',
-
-    license = 'Apache License, Version 2.0',
-
-    packages = [
-        'celix',
-	'celix/bootstrap'
-        ],
-
-    scripts = [
-        'scripts/celix-bootstrap',
-        ],
-
-    package_data={'celix' : ['bootstrap/templates/**/*']},
-)

http://git-wip-us.apache.org/repos/asf/celix/blob/ae54519a/documents/getting_started/using_services_with_cxx.md
----------------------------------------------------------------------
diff --git a/documents/getting_started/using_services_with_cxx.md b/documents/getting_started/using_services_with_cxx.md
index df88075..3401d68 100644
--- a/documents/getting_started/using_services_with_cxx.md
+++ b/documents/getting_started/using_services_with_cxx.md
@@ -9,9 +9,8 @@ This example gives an overview for providing and using C and C++ services with A
 ### C++ Services
 To start of, C++ service in Celix are just (abstract) classes. 
 
-In the following example there also a projected default constructor to ensure no instantiation of the service is possible:
+In the following example there also a projected default constructor and destructor to ensure no instantiation / deletion of the service is possible:
 ```C++
-//IAnotherExample.h
 #ifndef IANOTHER_EXAMPLE_H
 #define IANOTHER_EXAMPLE_H
 
@@ -21,6 +20,7 @@ In the following example there also a projected default constructor to ensure no
 class IAnotherExample {
 protected:
     IAnotherExample() = default;
+    virtual ~IAnotherExample() = default;
 public:
     virtual double method(int arg1, double arg2) = 0;
 };

http://git-wip-us.apache.org/repos/asf/celix/blob/ae54519a/examples/services_example_cxx/api/IAnotherExample.h
----------------------------------------------------------------------
diff --git a/examples/services_example_cxx/api/IAnotherExample.h b/examples/services_example_cxx/api/IAnotherExample.h
index dfddb23..0cd6c22 100644
--- a/examples/services_example_cxx/api/IAnotherExample.h
+++ b/examples/services_example_cxx/api/IAnotherExample.h
@@ -26,6 +26,7 @@
 class IAnotherExample {
 protected:
     IAnotherExample() = default;
+    virtual ~IAnotherExample() = default;
 public:
     virtual double method(int arg1, double arg2) = 0;
 };


Mime
View raw message