your build.xml
copyright, licenses
vendor headers
repos for dependencies
plugins
etc, etc.
One of the golden rules in build is that you never repeat the same information and that all information is in the source control management system and NEVER in your IDE's preferences or home directory. Builds must be repeatable. So the cnf directory is an important cornerstone of bndtools.
That said, cnd is about the shared stuff which is NOT like the target environment. Bundles should imho not share a target environment because that forces you to update the build path for all projects whenever one changes. In bnd, the versions of the package you depend on are learned from the buildpath so this would automatically make all your projects depend on later versions for no reason whatsoever. Having each project its own buildpath creates a lot of stability and makes deployment so much easier because not every project always depends on the latest and greatest. See Bnd/Versioning
However, if you have certain dependencies you always want to have in each project (Junit for example), you can easily define macros in cnf that are used in your project. These macros must be defined in build.bnd but you can also put include files in cnf/ext that are automatically included.
You can only create one cnf directory because it represents the workspace and it must reside at the same level as the projects in the workspace. This is for simplicity, it allows everything to be adressed relatively so you do not start using absolute path names that are incredibly hard to maintain between different systems. It is not restrictive because you can easily use include files to include information from any place on your hard disk. You can include in the cnf/build.bnd files, the cnf/ext directory and in the project bnd.bnd files. If you really dislike the cnf directory you can actually replace it with a text file that contains the (relative) path to the shared directory. Leaving it out will also work I think but that is not recommended because it requires to enter the information in each project directory, which imho is very bad practice.
The deployment process depends very much on how you want to work. The bnd program can actually run the project or the bndrun files. In progress is currently a packager that creates a runnable JAR containing all your dependencies. The best part imho is the release bundle function. This will allow you to release the bundle to a repository; it will first diff the new bundle against the old bundle and verify versions of the packages and bundles. The context menu is on the bnd.bnd file.
About source and build paths, if you deviate from the defaults you can set the macros src and bin in the cnf/build.bnd directory:
src = source/main/java
bin = build
It would be nice if there was a GUI for this but for now the GUI is the text editor. However, I would suggest that you start using the defaults when you try a new tool. It is a lot easier to get things working with all defaults and then change to your settings from a working example than the other way around.
In bnd, all upper cased names in the cnf/build.bnd or bnd.bnd file are copied to the manifest. Macros can be used to remove redundancy. So where you put a header depends how you want to share. Imho good bundles specify Bundle-License, Bundle-Copyright, Bundle-DocURL, Bundle-Vendor in the cnf/build.bnd (they can always be overridden in bnd.bnd or a sub bundle descriptor.) Bundle-Name and other headers that require a specific project should be set in bnd.bnd file. Notice that bnd has some very reasonable defaults as its goal is to specify the absolute minimum. For example, the Bundle-SymbolicName is derived from the project name and if used, the sub bundle descriptor. Starting with defaults is usually a good way to start and then when something is really annoying find out how to change it. Though bndools is quite a new project it is based on bnd that is extensively used by some large builds so it usually can handle most needs. The biggest problem is the lack of documentation, it is running quite behind the functions that are available :-( The disadvantage of people not willing to pay for tools is that it is hard to invest in it ...
That said, don't fight it. bnd(tools) definitely has a bit of an attitude because we try to find a better way, which is not always the same as "mainstream". We try to make it easy to migrate to the model and offer quite a lot of help when features are needed in this model but compatibility with existing work flows is not that high on the list for me personally if it conflicts with the goal we're pursuing. Just to be honest :-)
Kind regards,
Peter Kriens
About the attitude. This is a path or journey that can be influenced by the people that use the tools. I think many existing tools have taken architectural short cuts to make the implementation simpler. In bnd(tools) we try to do it right even though that is harder. In this journey, we're completely open to different ideas. If there are really good practices out there that we need to adopt then we will adapt as long as it is right and does not violate the core concepts.
I agree that it is necessary to have more documentation but unfortunately there is no funding to this project. So it has to be done at odd hours and as part of other projects. This unfortunately means documentation takes the back burner. I hope we can scale this up in the near future but in a world where developers refuse to pay for tools it will be hard to do it the way I would like to do this :-(
Thanks for outlying your experiences, this is very valuable to me.
Kind regards,
Peter Kriens