apache/incubator-brooklyn — pull request #100 by neykov (2014-07-28 16:09:10+00:00)
Title: [WIP] Refactoring camp dependencies

This is a work in progress, but it might be too controversial so I am posting it early to gather comments.
What I noticed while working on the camp/catalog tasks was that there was a lot of code repetition trying to create entities/specs from camp at various places in the code. That code also made core unnecessarily depend on camp-base using it just for intermediate results on the way to specs/entities. Here is an attempt to solve this by:
* changing brooklyn-core not to depend on camp-base. Instead plugins (in this case offered by brooklyn-camp) are responsible for parsing the input and creating EntitySpecs from it. The idea is to use the approach for different types of inputs, not just camp yaml, while avoiding pulling in dependencies into core.
* Extract all the code that uses PdpMatcher.parseDeploymentPlan + AssemblyTemplateSpecInstantiator.createSpec/instantiate pairs in a common place - a lot of code repetition

The changes pass a full build with tests and a simple catalog + app yaml instantiation, but are not yet thoroughly reviewed. Adding tests would be needed for the new funcitonality in brooklyn-camp.