BNM is not Maven.
BNM is rather a prof of possible enhancements to Maven.
Get the BNM launcher launcher-0.1.0.jar and unzip it int a new folder. You'l get a few files:
bnm the Unix shell file
bnm.bat the Windows batch file
BnmLauncher.class the bootstrap class which starts BNM
COPYING the GPL
src the source code for BnmLauncher.class
Then start bnm or bnm.bat (depending on your operation system).
It downloads the remaining required artifacts into your repository and relaunches BNM using the specified version.
Once the launcher got all required files, it never attempts to download the files again, until you switch to a newer version. Why? Because it doesn't use SNAPSHOT versions and thus the content won't change.
If there is a new version, you can manually edit the version in the launcher batch/script file, or download the most recent launcher package.
How good is BNM
BNM is able to build its own project tree and is more than 3 times faster than Maven 2. And it is still faster than Maven 3.
Not everything is implemented yet, but BNM can build itself :-)
|build tool||command line ||build time (best of 3 repeated runs)
|Maven 2 || mvn.bat clean install || -- failes to resolve org.eclipse versions
|Maven 3 || mvn.bat clean install || 25.8s
|Maven 3 || mvn.bat -T2 clean install || 17.7s
|BNM 0.1.0 || bnm clean install || 11.7s
Report bugs in bugzilla or use the forum.
There is also an eclipse integration using the BNM eclipse plugin. Please use the eclipse update site http://www.bebbosoft.de/plugins to install the feature.
Once installed learn how to use it [here].
Can I use existing pom.xml files?
Yes you can! Right now not all plugins are present. Since BNM does not use Maven plugins a replacement plugin must exist. Each replacement plugin maps itself to the maven id (ignoring the maven version). BNM runs its own plugins on your existing pom.xml files.
Since BNM is more a proof that Maven could be much faster, there is still hope that Maven will improve. Nevertheless it is futile to wait. The best way today is to use BNM and Maven in parallel:
- use BNM to compile/build during your development cycle
- use Maven for everything else
This also reduces the need for many plugins (deployment etc. pp).
Can I code own plugins?
Yes you can. And you don't need any special processing to create a plugin since BNM uses Java annotations to attach the pom.xml values to plugin instances.
Still be aware that BNM plugins must be thread safe! If your plugins hooks some third party stuff which isn't thread safe, synchronize the invokation in the plugins code.
Also checkout http://www.bebbosoft.de/bugs/ to enter bugs, requests and so on.
BNM is published under GPLv3. The sources are bundled into the JAR files.
If you need a commercial license feel free to contact us.
- BNM has a small launcher
- BNM is compact
- BNM works much faster than Maven
BNM is different / better?
- parallelizes downloads
- parallelizes the build process
BNM is more strict (maybe more precise!?)
- BNM performs no updates on final artifacts (non SNAPSHOT version)
- BNM performs no updates on SNAPSHOT version which are part of the current project tree.
Eclipse plugin for a new way of using Maven/BNM projects
- no support for version ranges since this breaks the build (You always get exactly the specified version)
- disallows variable usage in id, artifactId, groupId, version, scope and packaging fields.
- action to create the next SNAPSHOT version of an artifact and update all dependencies inside the project tree
- action to finalize an artifact and update all dependencies inside the project tree
- action to get a subproject as Eclipse project
- (unfinished) integrated builder to run 'bnm install' on changes for all dependent projects
- wizard to create project roots
- wizards to create projects inside the project tree
- final artifacts are made read only, thus requires a SNAPSHOT creation to modify
If you plan to use a tool like BNM it is important to know how everything works together.
First the ingredients:
- pom.xml - own, parent and included
Those are merged in this order to create a resolved pom (see below how merge works).
- included from root pom.xml
- root pom.xml
- included from first child pom.xml
- first child pom.xml
- included from artifact pom.xml
- artifact pom.xml
So how does this merge work? Once the resolved pom is created
- the active profiles of the resolved pom
- the active profiles of the settings.xml
are applied. And finally the properties are resolved which results into the effective pom.
The merge mechanism takes a parent pom.xml and a child pom.xml and performs the following steps:
- The elements
of the parent pom.xml are replaced with the values of the child pom.xml, even when null.
simple elements (String, URL, boolean, types) are replaced with the child value, if it is set. If the value is unset in the child, the parent value persists.
are merged by applying this algorithm to the elements recursively.
- list elements are merged by this algorithm:
map elements (like properties or configuration) are merged by these rules:
- parent list members having a field named inherited set to false are removed.
- if a list member contains the groupId, artifactId fields
- if the member has the type plugin, children of same groupId, artifactId, version are merged by applying this algorithm recursively. Plugins with different version coexists!
- otherwise child member with the same groupId, artifactId are replacing parent members (thus overriding the version!).
- if a list member contains an id field, child members with the same id are replacing parent members. Elements with different id are appended.
- otherwise all child members are appended to the parent list
- if the map key refers to a CTYPE (like properties), if a child value exists it replaces the parent value.
- if the key refers to elements all named identical, it is treated as a list. By default if a child list exists it replaces the parent list.
if the key refers to different named elements this map merge algorithm is applied recursively
- planned: modify the behaviour with attributes in the child list:
- mode="append" will result into appending the child list.
- mode="prepend" will result into prepending the child list.
- mode="merge" uses the list merge algorithm described above.