<!DOCTYPE html>
<html lang="en">

{% include head.htm %}

<body>

	{% include nav.htm %}

	<div class=container12>
		<img span=12 src="{{ '/img/front-page.png' | prepend:site.baseurl }}">
	</div>

	<ul class=container12>
		<li span=4>
			<h1>What is bnd?</h1>
			<blockquote style='margin-top:20px'>“If you want to teach people a new way of thinking, don't bother trying to teach them. Instead, give them a tool, the use of which will lead to new ways of thinking.”
			<br><b>― R. Buckminster Fuller</b>
			</blockquote>
			<p>
				bnd is the engine behind a number of popular software development
				tools that support OSGi. It can be found in several maven plugins,
				ant, gradle, and of course Eclipse (<a href="https://bndtools.org">bndtools</a>).
				It actively seeks other build tool vendors to use bnd to improve the
				quality of the generated OSGi metadata.
			<p>bnd actually consists of 2 major parts, one part is really
				good in creating a JAR with OSGi meta data based on instructions and
				the information in the class files. Over time bnd has collected
				hundreds of heuristics that provide for good bundles. This part is
				therefore often used in build tools like maven or gradle that
				already generate JARs. They mainly use the manifest generation
				features of bnd.
			<p>The other part is a IDE/build tool independent model of a
				workspace with projects. This was the result of the frustration that
				certain things could be done very well in Eclipse but that other
				things are best done in a command line tool. Since IDEs are
				incremental and very event driven, command line tools tend to run
				everything from start to end. What was needed was an independent
				model that could work with Eclipse, maven, ant, gradle, and
				hopefully one day Intellij.
			<p>So to use bnd, look at the the descriptions of the tools that
				include bnd. Then when you want to find out what a certain command
				does, or how to call a macro, then use this manual.
		<li span=4>
			<h1>How to get started?</h1>
			<p>There are several different ways to get started with bnd. The most elegant
            one is to start with <a href="https://bndtools.org/">Bndtools Eclipse IDE</a>. There 
            are a number of <a href="workspace.html">videos</a> available that provide a gentle introduction. There is also an accompanying 
            <a href="https://bndtools.org/assets/osgi-starter-workspace.pdf">OSGi Starter</a> that provides a lot of detail
            how to use bnd for larger projects. It includes a Gradle plugin out of the box that
            will build the Bndtools workspace identical to how things are build inside Eclipse 
            for Continuous Integration with <a href="https://bndtools.org/workspace.html#github--actions">Github Actions</a> or other build servers.
            <p>
            If you insist on using Maven, then you can start with the  description of the 
            <a href="https://github.com/bndtools/bnd/tree/master/maven/bnd-maven-plugin">Maven plugins</a>.
            <p>
            There is also a Gradle plugin that is the preferred way to build OSGi bundles 
            with plain old vanilla Gradle. This is described in the <a href="https://github.com/bndtools/bnd/tree/master/gradle-plugins">Gradle Plugins 
            readme</a>.
            <p> 
            If you just want to figure out how different commands and macros work, the <a href="https://bnd.bndtools.org/chapters/400-commands.html">bnd commandline</a>
            is your friend. Especially the <code>shell</code> command is very useful exploring it. 
            <p>
            Last but not least, the whole source code is on GitHub. So feel
            free to explore it. And when you like, we&#39;re very actively taken outside PR&#39;s. There is a
            lot of activity going on.</p>
		<li span=4>
			<h1>Table of contents</h1>
			<ol>
				{% for chapter in site.chapters %}
				<li>
				<a href="{{ chapter.url | prepend: site.baseurl }}">{{chapter.title}}</a> {% endfor %}
			</ol>
	</ul>

	{% include footer.htm %}

</body>
</html>
