apache/incubator-brooklyn — pull request #175 by sjcorbett (2014-09-17 17:12:10+00:00)
Title: BROOKLYN-49: Catalogue persistence

Brooklyn persists catalogue entries and loads them when rebinding.
* Most interesting are the changes to `AbstractManagementContext`, `RebindManagerImpl` and `BasicBrooklynCatalog`.
* Catalogue persistence tests are in `RebindCatalogItemTest`.
* See the comments in 5212980 for the interesting bits.
* Catalog persistence is off by default and enabled with the `--persistCatalog` command line flag.
* There is not (currently) an option to enable catalogue persistence but to load the catalogue from a file. It would be fairly straightforward to add.

Note that most - maybe all - catalogues are currently written like:
```

file://~/.m2/repository/io/brooklyn/clocker/brooklyn-clocker-docker/0.6.0-SNAPSHOT/brooklyn-clocker-docker-0.6.0-SNAPSHOT.jar

...

```
The template will be persisted but the classpath will *not*, and thus it will not be possible to use such entries after Brooklyn has rebinded.

Entries must be written in this format instead:
```

```
I've tried to be as thorough as I can, but please review carefully!